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 de58a3987..426a5e92f 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
@@ -13,7 +13,7 @@ public class MesOut : Entity
///
/// 条码号(20240430添加)
///
- public string Mesout_barcode { get; set; }
+ // public string Mesout_barcode { get; set; }
///
/// 调出储位
///
@@ -58,7 +58,7 @@ public class MesOut : Entity
/// 返线数量
///
public decimal Mesout_bad { get; set; }
- //public string Mes_Barcode { get; set; }
+ public string Mes_Barcode { get; set; }
public override object[] GetKeys()
{
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 0b8bdd2ff..4257c5181 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,7 +17,7 @@ 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_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);
@@ -30,7 +30,7 @@ public static class MesOutDbContextModelCreatingExtensions
b.Property(q => q.refno).HasMaxLength(45);
b.Property(q => q.Mesout_bad).HasPrecision(18, 2);
b.Property(q => q.Yl1);
- //b.Property(q => q.Mes_Barcode).HasMaxLength(50);
+ b.Property(q => q.Mes_Barcode).HasMaxLength(50);
});
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs
index 43fc043db..8d4989e44 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs
@@ -165,8 +165,8 @@ public class EosAgentModule : AbpModule
ApplicationInitializationContext context)
{
- context.AddBackgroundWorkerAsync();
- context.AddBackgroundWorkerAsync();
+ //context.AddBackgroundWorkerAsync();
+ context.AddBackgroundWorkerAsync();
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs
index 3835ef772..b3a743d81 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs
@@ -11,7 +11,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent;
public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
{
- private readonly string Incoming = "EOS Incoming";
+ private readonly string Incoming = "EOS接收";
private readonly IOptions _options;
@@ -28,10 +28,10 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
[UnitOfWork]
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
- Logger.LogInformation($"Starting: Handling {Incoming}");
+ Logger.LogInformation($"开始: 执行 {Incoming}");
if (!_options.Value.IncomingOptions.Active)
{
- Logger.LogInformation($"{Incoming} is not active!");
+ Logger.LogInformation($"{Incoming} 已关闭没有执行!");
return;
}
@@ -42,6 +42,7 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
var plansFromExternalList = await planReader.ReadAsync().ConfigureAwait(false);
//转换Plan
await planConverter.ConvertAsync(plansFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理采购订单【{plansFromExternalList.Count}】条数据");
Logger.LogInformation($"读取 发货单");
var shipHandleService = workerContext.ServiceProvider.GetRequiredService();
@@ -50,6 +51,7 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false);
//转换Ship
await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理发货单【{shipsFromExternalList.Count}】条数据");
Logger.LogInformation($"读取 产品");
var productHandleService = workerContext.ServiceProvider.GetRequiredService();
@@ -58,8 +60,9 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
var productsFromExternalList = await productHandleService.ReadAsync().ConfigureAwait(false);
// 转换Product
await productConverter.ConvertAsync(productsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理产品【{productsFromExternalList.Count}】条数据");
- Logger.LogInformation($"Completed: Handling {Incoming}");
+ Logger.LogInformation($"提交: 执行 {Incoming}");
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs
index 0d9bc033f..174b6bce0 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs
@@ -111,6 +111,7 @@ public class PlanReader : IReader
{
0 => EnumExchangeDataAction.Add,
1 => EnumExchangeDataAction.Delete,
+ 2=> EnumExchangeDataAction.Modify,
_ => throw new ArgumentOutOfRangeException()
},
SourceSystem = EnumSystemType.SCP.ToString(),
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipConverter.cs
index 28f70da1d..caad0a376 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/ShipConverter.cs
@@ -118,7 +118,7 @@ public class ShipConverter : IIncomingConverter
purchaseLabel.LabelType = EnumLabelType.PurchaseLabel;
var supplierDto = await _supplierAppService.GetByCodeAsync(exchangeAsn.SupplierCode).ConfigureAwait(false);
purchaseLabel.SupplierCode = exchangeAsn.SupplierCode;
- purchaseLabel.PoNumber = exchangeAsn.Number;
+ purchaseLabel.PoNumber = exchangeAsn.PoNumber;
purchaseLabel.Qty = exchangeAsn.Detail.Qty;
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs
index 989eb2391..496e2efdc 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs
@@ -114,7 +114,7 @@ public class ArriveConverter : IOutgoingConverter
PlanBillNo = detail.PoNumber,
ShipBillNo = detail.AsnNumber,
DocNo = exchangeReceipt.Number,
- DetailMatNo = detail.ToPackingCode,
+ DetailMatNo =string.IsNullOrEmpty(detail.Remark) ? detail.ToPackingCode: detail.Remark,
ERP = detail.ItemCode,
Qty = detail.Qty,
HgQty = detail.Qty,
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/EosOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/EosOutgoingBackgroundWorker.cs
index 9ec0587a6..677a44fa8 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/EosOutgoingBackgroundWorker.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/EosOutgoingBackgroundWorker.cs
@@ -10,7 +10,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent;
public class EosOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
{
- private readonly string Outgoing = "EOS Outgoing";
+ private readonly string Outgoing = "EOS发送";
private readonly IOptions _options;
@@ -28,10 +28,10 @@ public class EosOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
[UnitOfWork]
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
- Logger.LogInformation($"Starting: Handling {Outgoing}");
+ Logger.LogInformation($"开始: 执行 {Outgoing}");
if (!_options.Value.IncomingOptions.Active)
{
- Logger.LogInformation($"{Outgoing} is not active!");
+ Logger.LogInformation($"{Outgoing} 已关闭没有执行!");
return;
}
@@ -40,14 +40,16 @@ public class EosOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
var arriveNoteList = await arriveConvert.ConvertAsync().ConfigureAwait(false);
var arriveWriter = workerContext.ServiceProvider.GetRequiredService();
await arriveWriter.WriteAsync(arriveNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"处理采购上架单【{arriveNoteList.Count}】条数据");
Logger.LogInformation($"传出 采购退货单");
var returnConvert = workerContext.ServiceProvider.GetRequiredService();
var returnNoteList = await returnConvert.ConvertAsync().ConfigureAwait(false);
var returnWriter = workerContext.ServiceProvider.GetRequiredService();
await returnWriter.WriteAsync(returnNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"处理采购退货单【{returnNoteList.Count}】条数据");
- Logger.LogInformation($"Completed: Handling {Outgoing}");
+ Logger.LogInformation($"提交: 执行 {Outgoing}");
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs
index cef94089a..058748ba5 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs
@@ -80,7 +80,7 @@ public class ReturnConverter : IOutgoingConverter
PlanBillNo = exchangeReturn.PoNumber,
ShipBillNo = exchangeReturn.AsnNumber,
DocNo = exchangeReturn.Number,
- DetailMatNo = detail.PackingCode,
+ DetailMatNo = string.IsNullOrEmpty(detail.Remark)? detail.PackingCode: detail.Remark,
ERP = detail.ItemCode,
RtQty = detail.Qty,
RtSon = detail.Reason,
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json
index 59ec16e21..f369aa71f 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/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",
- "DataExchange": "Server=10.164.113.32,1818\\SHDB;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True",
- "EOS": "Server=61.139.155.47;Database=EOSSH;Uid=wms;Pwd=1;TrustServerCertificate=True"
+ "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",
+ "EOS": "Server=10.164.0.224;Database=EOSNEV;Uid=wms;Pwd=1;TrustServerCertificate=True"
},
"AuthServer": {
- "Authority": "http://10.164.113.31:60083/",
+ "Authority": "http://dev.ccwin-in.com:60083/",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "admin",
"SwaggerClientSecret": "1q2w3E*",
@@ -25,13 +25,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/"
}
},
"EosOptions": {
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
index dfe3dc659..d4aaa87d0 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
@@ -67,13 +67,13 @@
"InjectionMoldingTaskOptions": {
"AutoRemote": {
- "IpAddress": "http://localhost:59094/",
+ "IpAddress": "http://10.164.227.103:30000/",
"UserName": "",
"Password": "",
"Token": "",
"AreaIDs": "1",
- "Interval" : "3", // interval
- "TimeCycle" :"5"
+ "Interval": "3", // interval
+ "TimeCycle": "5"
},
"IncomingOptions": {
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 7f5cc4065..e5fd5ef17 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
@@ -250,7 +250,6 @@ public class FawtygAutoMapperProfile : Profile
.Ignore(x => x.StdPackQty);
CreateMap()
- .Ignore(x => x.DeliverPlanNumber)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.Details)
.Ignore(x => x.CustomerAddressCode)
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs
index 6a5238413..8a6db9768 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs
@@ -82,7 +82,8 @@ public class DeliveryReader : IReader
DataAction = EnumExchangeDataAction.Add,
SourceSystem = EnumSystemType.MES.ToString(),
SourceDataId = Delivery.mesout_delivery_id.ToString(),
- SourceDataGroupCode =Delivery.mesout_delivery_type=="0"? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan,
+ // SourceDataGroupCode =Delivery.mesout_delivery_type=="0"? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan,
+ SourceDataGroupCode = Delivery.mesout_delivery_plan,
SourceDataDetailCode = Delivery.mesout_delivery_customer,
SourceDataContent = JsonSerializer.Serialize(Delivery),
WriteTime = DateTime.Now,
@@ -98,20 +99,24 @@ public class DeliveryReader : IReader
var mesRequest = new DeliverRequestExchangeDto()
{
DeliverRequestType = Delivery.mesout_delivery_type == "0" ? EnumDeliverRequestType.FIS : EnumDeliverRequestType.Normal,
+ //DeliverPlanNumber= Delivery.mesout_delivery_type == "0" ? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan,
+ DeliverPlanNumber =Delivery.mesout_delivery_plan,
CustomerCode = Delivery.mesout_delivery_customer,
Number = Delivery.mesout_delivery_no,
Worker = "MESFY",
ActiveDate = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime) ? dateTime : DateTime.Now,
- DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now
+ DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now,
+ MesTruckNumber="",
};
var mesRequestDetail = new DeliverRequestDetailExchangeDto()
{
ItemCode = Delivery.mesout_delivery_part,
Qty = Delivery.mesout_delivery_num,
AreaCode = Delivery.mesout_delivery_loc,
- MesDeliveryNo=Delivery.mesout_delivery_no,
+ //MesDeliveryNo=Delivery.mesout_delivery_no,
MesDeliveryPlan = Delivery.mesout_delivery_plan,
- IdentityNo =Delivery.mesout_delivery_identity_no
+ IdentityNo =Delivery.mesout_delivery_identity_no,
+ MesDeliveryContainer= Delivery.mesout_delivery_container
};
mesRequest.Detail = mesRequestDetail;
return mesRequest;
diff --git a/be/DataExchange/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 3a919536a..3824bb5e3 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
@@ -14,7 +14,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
{
- private readonly string Incoming = "MES Incoming";
+ private readonly string Incoming = "MES接收";
private readonly IOptions _options;
@@ -31,10 +31,10 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
[UnitOfWork]
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
- Logger.LogInformation($"Starting: Handling {Incoming}");
+ Logger.LogInformation($"开始: 执行 {Incoming}");
if (!_options.Value.IncomingOptions.Active)
{
- Logger.LogInformation($"{Incoming} is not active!");
+ Logger.LogInformation($"{Incoming} 已关闭没有执行!");
return;
}
@@ -45,7 +45,8 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
return;
}
- Logger.LogInformation($"Read MesOut");//缴库
+ #region 缴库 MesOut
+ Logger.LogInformation($"读取缴库(MesOut)");//缴库
var mesOutReader = workerContext.ServiceProvider.GetRequiredService();
var mesOutConverter = workerContext.ServiceProvider.GetRequiredService();
var TransferNoteConverter = workerContext.ServiceProvider.GetRequiredService();
@@ -59,74 +60,92 @@ public class MesIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
{
await TransferNoteConverter.ConvertAsync(mesOutsFromExternalList_TransferNote).ConfigureAwait(false);
}
+ Logger.LogInformation($"处理完工收货(缴库)【{mesOutsFromExternalList_ProductReceipt.Count}】条数据");
+ Logger.LogInformation($"处理储位调拨【{mesOutsFromExternalList_TransferNote.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read Scrap");//报废
+ #region 报废 Scrap
+ Logger.LogInformation($"读取报废(Scrap)");//报废
var scrapReader = workerContext.ServiceProvider.GetRequiredService();
var scrapConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存Scrap
var scrapsFromExternalList = await scrapReader.ReadAsync().ConfigureAwait(false);
//转换Scrap
await scrapConverter.ConvertAsync(scrapsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理报废【{scrapsFromExternalList.Count}】条数据");
+ #endregion
-
- Logger.LogInformation($"Read BackFlush");//耗用单
+ #region 耗用单 BackFlush
+ Logger.LogInformation($"读取耗用单 (BackFlush)");//耗用单
var BackFlushReader = workerContext.ServiceProvider.GetRequiredService();
var BackFlushConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存BackFlush
var backFlushsFromExternalList = await BackFlushReader.ReadAsync().ConfigureAwait(false);
//转换BackFlush
await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理耗用单【{backFlushsFromExternalList.Count}】条数据");
+ #endregion
-
- Logger.LogInformation($"Read TransferNote");//储位调拨
+ #region 储位调拨 TransferNote
+ Logger.LogInformation($"读取储位调拨 (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($"处理储位调拨【{transferNoteFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read Frozen");//冻结解冻
+ #region 冻结解冻 Frozen
+ Logger.LogInformation($"读取冻结解冻 (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($"处理冻结解冻【{mesNoteFromExternalList.Count}】条数据");
+ #endregion
-
- Logger.LogInformation($"Read Delivery");//成品发运
+ #region 成品发运 Delivery
+ Logger.LogInformation($"读取成品发运 (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($"处理成品发运【{deliveryNoteFromExternalList.Count}】条数据");
+ #endregion
+ #region 自动叫料 CallMtl
-
- Logger.LogInformation($"Read CallMtl");//自动叫料
+ Logger.LogInformation($"读取自动叫料 (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($"处理自动叫料【{callMtlFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Completed: Handling {Incoming}");
+ Logger.LogInformation($"提交: 执行 {Incoming}");
#region 未启用接口启用时需要看逻辑修改
//上海和安徽无此接口
- //Logger.LogInformation($"Read PullTask");//拉动任务
+ //Logger.LogInformation($"读取拉动任务 (PullTask)");//拉动任务
//var pullTaskReader = workerContext.ServiceProvider.GetRequiredService();
//var pullTaskConverter = workerContext.ServiceProvider.GetRequiredService();
////读取并保存PullTask
//var pullTaskFromExternalList = await pullTaskReader.ReadAsync().ConfigureAwait(false);
////转换PullTask
//await pullTaskConverter.ConvertAsync(pullTaskFromExternalList).ConfigureAwait(false);
+ // Logger.LogInformation($"处理拉动任务【{pullTaskFromExternalList.Count}】条数据");
//上海和安徽无此接口
- //Logger.LogInformation($"Read Issue");
+ //Logger.LogInformation($"Read (Issue)");
//var pckHandleService = workerContext.ServiceProvider.GetRequiredService();
//var pckConverter = workerContext.ServiceProvider.GetRequiredService();
////读取并保持Pck
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 97782c728..5a6894e6d 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
@@ -167,7 +167,7 @@ public class MesOutReader : IReader
LocationErpCode = mesOut.Mesout_loc,
Remark = mesOut.memo,
ReturnQty = mesOut.Mesout_bad,
- MesBarCode = mesOut.Mesout_barcode,
+ MesBarCode = mesOut.Mes_Barcode,
MesQuality = mesOut.Mesout_quality
};
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 b3b640492..b21a53442 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
@@ -2,7 +2,7 @@
"ConnectionStrings": {
"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"
+ "MES": "Server=10.164.233.7;Database=MES_JY;uid=sa;pwd=Asdf1234$;TrustServerCertificate=True;Encrypt=false"
},
"AuthServer": {
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/FawtygAutoMapperProfile.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/FawtygAutoMapperProfile.cs
index 8cbc197bb..b83e2409d 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/FawtygAutoMapperProfile.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/FawtygAutoMapperProfile.cs
@@ -12,6 +12,8 @@ using Win_in.Sfs.Wms.DataExchange.WMS.CustomerReturnNote;
using Win_in.Sfs.Wms.DataExchange.WMS.DeliverNote;
using Win_in.Sfs.Wms.DataExchange.WMS.Deparment;
using Win_in.Sfs.Wms.DataExchange.WMS.Dict;
+using Win_in.Sfs.Wms.DataExchange.WMS.ErpLocation;
+using Win_in.Sfs.Wms.DataExchange.WMS.ErpLocationItem;
using Win_in.Sfs.Wms.DataExchange.WMS.InterfaceCalendar;
using Win_in.Sfs.Wms.DataExchange.WMS.ItemBasic;
using Win_in.Sfs.Wms.DataExchange.WMS.ItemTransformNote;
@@ -123,5 +125,7 @@ public class FawtygAutoMapperProfile : Profile
CreateMap();
CreateMap();
CreateMap();
+ CreateMap();
+ CreateMap();
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs
index ecab2e62a..0ec4789e7 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs
@@ -127,7 +127,7 @@ public class ItemBasicReader : IReader
Code = product.mes_product_part,
Name = product.mes_product_part_ser,
Desc1 = product.mes_product_desc,
- //Desc2=product.mes_product_fih_factory,//目前没有这个字段
+ Desc2=product.mes_product_fih_factory,//NEV新加字段,正厂编码
Status = product.mes_product_active == "Y" ? EnumItemStatus.Active : EnumItemStatus.Disable,
#region 制造类别
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs
index 1f186a5c6..e1cb31cb6 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs
@@ -14,7 +14,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent;
public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
{
- private readonly string Incoming = "TYRP Incoming";
+ private readonly string Incoming = "TYRP接收";
private readonly IOptions _options;
@@ -33,10 +33,10 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
[UnitOfWork]
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
- Logger.LogInformation($"Starting: Handling {Incoming}");
+ Logger.LogInformation($"开始: 执行 {Incoming}");
if (!_options.Value.IncomingOptions.Active)
{
- Logger.LogInformation($"{Incoming} is not active!");
+ Logger.LogInformation($"{Incoming} 已关闭没有执行!");
return;
}
@@ -59,15 +59,20 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
common.updatedt = DateTime.Now;
common.isupdate = false;
- Logger.LogInformation($"Read ItemBasic");//物品
+ #region 物品 ItemBasic
+
+ Logger.LogInformation($"读取物品 ItemBasic");//物品
var itemBasicReader = workerContext.ServiceProvider.GetRequiredService();
var itemBasicConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存itemBasic
var itemBasicOutsFromExternalList = await itemBasicReader.ReadAsync().ConfigureAwait(false);
//转换itemBasic
await itemBasicConverter.ConvertAsync(itemBasicOutsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理物品【{itemBasicOutsFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read User");//用户和部门
+ #region 用户和部门 User
+ Logger.LogInformation($"读取用户和部门 User");//用户和部门
var userReader = workerContext.ServiceProvider.GetRequiredService();
var userConverter = workerContext.ServiceProvider.GetRequiredService();
var departmentConverter = workerContext.ServiceProvider.GetRequiredService();
@@ -79,86 +84,129 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
await userConverter.ConvertAsync(userOutsFromExternalList).ConfigureAwait(false);
//转换department
await departmentConverter.ConvertAsync(departmentOutsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理用户【{userOutsFromExternalList.Count}】条数据");
+ Logger.LogInformation($"处理部门【{departmentOutsFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read InterfaceCalendar");//账期
+ #region 账期 InterfaceCalendar
+ Logger.LogInformation($"读取账期 InterfaceCalendar");//账期
var interfaceCalendarReader = workerContext.ServiceProvider.GetRequiredService();
var interfaceCalendarConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存InterfaceCalendar
var interfaceCalendarOutsFromExternalList = await interfaceCalendarReader.ReadAsync().ConfigureAwait(false);
//转换InterfaceCalendar
await interfaceCalendarConverter.ConvertAsync(interfaceCalendarOutsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理账期【{interfaceCalendarOutsFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read Dict");//系统代码
+ #region 系统代码 Dict
+ Logger.LogInformation($"读取系统代码 Dict");//系统代码
var dictReader = workerContext.ServiceProvider.GetRequiredService();
var dictConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存Dict
var dictOutsFromExternalList = await dictReader.ReadAsync().ConfigureAwait(false);
//转换Dict
await dictConverter.ConvertAsync(dictOutsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理系统代码【{dictOutsFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read Bom");
+ #region Bom
+ Logger.LogInformation($"读取报目 Bom");
var BomReader = workerContext.ServiceProvider.GetRequiredService();
var BomConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存Bom
var bomsFromExternalList = await BomReader.ReadAsync().ConfigureAwait(false);
//转换Bom
await BomConverter.ConvertAsync(bomsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理Bom【{bomsFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read Supplier");//供应商
+ #region 供应商 Supplier
+ Logger.LogInformation($"读取供应商 Supplier");//供应商
var SupplierReader = workerContext.ServiceProvider.GetRequiredService();
var SupplierConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存Supplier
var suppliersFromExternalList = await SupplierReader.ReadAsync().ConfigureAwait(false);
//转换Supplier
await SupplierConverter.ConvertAsync(suppliersFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理供应商【{suppliersFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read Dictpj");//专案代码
+ #region 专案代码 Dictpj
+ Logger.LogInformation($"读取专案代码 Dictpj");//专案代码
var DictpjReader = workerContext.ServiceProvider.GetRequiredService();
//读取并保存Dictpj
var dictpjOutsFromExternalList = await DictpjReader.ReadAsync().ConfigureAwait(false);
//转换Dictpj
await dictConverter.ConvertAsync(dictpjOutsFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理专案代码【{dictpjOutsFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read Customer");//客户资料
+ #region ERP库位 ErpLocation
+ Logger.LogInformation($"读取ERP库位 ErpLocation");//ERP库位
+ var ErpLocationReader = workerContext.ServiceProvider.GetRequiredService();
+ var ErpLocationConverter = workerContext.ServiceProvider.GetRequiredService();
+ //读取并保存ErpLocationItem
+ var erpLocationFromExternalList = await ErpLocationReader.ReadAsync().ConfigureAwait(false);
+ //转换ErpLocationItem
+ await ErpLocationConverter.ConvertAsync(erpLocationFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理ERP库位【{erpLocationFromExternalList.Count}】条数据");
+ #endregion
+
+ #region 客户资料 Customer
+ Logger.LogInformation($"读取客户资料 Customer");//客户资料
var CustomerReader = workerContext.ServiceProvider.GetRequiredService();
var CustomerConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存Customer
var customersFromExternalList = await CustomerReader.ReadAsync().ConfigureAwait(false);
//转换Customer
await CustomerConverter.ConvertAsync(customersFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理客户资料【{customersFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read ErpLocationItem");//储位与物品对应关系(开账)
+ #region 储位与物品对应关系(开账) ErpLocationItem
+ Logger.LogInformation($"读取储位与物品对应关系(开账) ErpLocationItem");//储位与物品对应关系(开账)
var ErpLocationItemReader = workerContext.ServiceProvider.GetRequiredService();
var ErpLocationItemConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存ErpLocationItem
var erpLocationItemFromExternalList = await ErpLocationItemReader.ReadAsync().ConfigureAwait(false);
//转换ErpLocationItem
await ErpLocationItemConverter.ConvertAsync(erpLocationItemFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理开账【{erpLocationItemFromExternalList.Count}】条数据");
+ #endregion
-
- Logger.LogInformation($"Read PurchasePrice");//采购价格
+ #region 采购价格 PurchasePrice
+ Logger.LogInformation($"读取采购价格 PurchasePrice");//采购价格
var PurchasePriceReader = workerContext.ServiceProvider.GetRequiredService();
var PurchasePriceConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存PurchasePrice
var purchasePriceFromExternalList = await PurchasePriceReader.ReadAsync().ConfigureAwait(false);
//转换PurchasePrice
await PurchasePriceConverter.ConvertAsync(purchasePriceFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理采购价格【{purchasePriceFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read SalePrice");//销售价格
+ #region 销售价格 SalePrice
+ Logger.LogInformation($"读取销售价格 SalePrice");//销售价格
var SalePriceReader = workerContext.ServiceProvider.GetRequiredService();
var SalePriceConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存SalePrice
var salePriceFromExternalList = await SalePriceReader.ReadAsync().ConfigureAwait(false);
//转换SalePrice
await SalePriceConverter.ConvertAsync(salePriceFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理销售价格【{salePriceFromExternalList.Count}】条数据");
+ #endregion
- Logger.LogInformation($"Read StdCostPrice");//标准成本价格
+ #region 标准成本价格 StdCostPrice
+ Logger.LogInformation($"读取标准成本价格 StdCostPrice");//标准成本价格
var StdCostPriceReader = workerContext.ServiceProvider.GetRequiredService();
var StdCostPriceConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保存StdCostPrice
var stdCostPriceFromExternalList = await StdCostPriceReader.ReadAsync().ConfigureAwait(false);
//转换StdCostPrice
await StdCostPriceConverter.ConvertAsync(stdCostPriceFromExternalList).ConfigureAwait(false);
+ Logger.LogInformation($"处理标准成本价格【{stdCostPriceFromExternalList.Count}】条数据");
+ #endregion
}
else
{
@@ -174,7 +222,7 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
////转换Customer
//await BackFlushConverter.ConvertAsync(backFlushsFromExternalList).ConfigureAwait(false);
- Logger.LogInformation($"Completed: Handling {Incoming}");
+ Logger.LogInformation($"提交: 执行 {Incoming}");
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs
index 17c559965..2dcee1142 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs
@@ -41,7 +41,7 @@ public class CustomerReturnNoteConverter : IOutgoingConverter
{
var outgoingToExternalList = new List();
//获取要同步得数据
- var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.UnplannedReceipt, EnumSystemType.ERP).ConfigureAwait(false);
+ var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.CustomerReturn, EnumSystemType.ERP).ConfigureAwait(false);
foreach (var outgoingFromWms in outgoingFromWmsList)
{
#region 主表
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs
index 038899008..bba3b1d39 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs
@@ -14,7 +14,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent;
public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
{
- private readonly string Outgoing = "TYRP Outgoing";
+ private readonly string Outgoing = "TYRP发送";
private readonly IOptions _options;
@@ -32,11 +32,11 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
[UnitOfWork(true, isolationLevel: IsolationLevel.ReadUncommitted, 50)]
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
- Logger.LogInformation($"Starting: Handling {Outgoing}");
+ Logger.LogInformation($"开始: 执行 {Outgoing}");
if (!_options.Value.OutgoingOptions.Active)
{
- Logger.LogInformation($"{Outgoing} is not active!");
+ Logger.LogInformation($"{Outgoing} 已关闭没有执行!");
return;
}
var scontrolWriter = workerContext.ServiceProvider.GetRequiredService();//scontrol中间表服务
@@ -47,93 +47,93 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
int mesout_asd_count = 0; //mesout_asd插入条数
#region 采购单 PurchaseOrder scontrol
- Logger.LogInformation($"Write PurchaseOrder");//采购单
+ Logger.LogInformation($"传出采购单 PurchaseOrder");//采购单
var purchaseOrderConvert = workerContext.ServiceProvider.GetRequiredService();
var purchaseOrderList = await purchaseOrderConvert.ConvertAsync().ConfigureAwait(false);
await scontrolWriter.WriteAsync(purchaseOrderList).ConfigureAwait(false);
+ Logger.LogInformation($"采购单-PurchaseOrder处理{purchaseOrderList.Count}条");
if (purchaseOrderList.Count > 0)
- {
- Logger.LogInformation($"采购单-PurchaseOrder处理{purchaseOrderList.Count}条");
+ {
scontrol_count += purchaseOrderList.Count;
}
#endregion
#region 采购退货单 PurchaseReturn scontrol
- Logger.LogInformation($"Write PurchaseReturn");//采购退货单(汇总)
+ Logger.LogInformation($"传出采购退货单 PurchaseReturn");//采购退货单(汇总)
var purchaseReturnConvert = workerContext.ServiceProvider.GetRequiredService();
var purchaseReturnList = await purchaseReturnConvert.ConvertAsync().ConfigureAwait(false);
await scontrolWriter.WriteAsync(purchaseReturnList).ConfigureAwait(false);
+ Logger.LogInformation($"采购退货单-PurchaseReturn处理{purchaseReturnList.Count}条");
if (purchaseReturnList.Count > 0)
- {
- Logger.LogInformation($"采购退货单-PurchaseReturn处理{purchaseReturnList.Count}条");
+ {
scontrol_count += purchaseReturnList.Count;
}
#endregion
#region 验收单 Putaway scontrol
- Logger.LogInformation($"Write PutawayNote");//验收单(汇总)
+ Logger.LogInformation($"传出验收单 PutawayNote");//验收单(汇总)
var putawayNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var putawayNoteList = await putawayNoteConvert.ConvertAsync().ConfigureAwait(false);
await scontrolWriter.WriteAsync(putawayNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"验收单-Putaway处理{putawayNoteList.Count}条");
if (putawayNoteList.Count > 0)
- {
- Logger.LogInformation($"验收单-Putaway处理{putawayNoteList.Count}条");
+ {
scontrol_count += putawayNoteList.Count;
}
#endregion
#region 线边仓领料单 Issue scontrol
- Logger.LogInformation($"Write IssueNote");//线边仓领料单(汇总)
+ Logger.LogInformation($"传出线边仓领料单 IssueNote");//线边仓领料单(汇总)
var issueNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var issueNoteList = await issueNoteConvert.ConvertAsync().ConfigureAwait(false);
await scontrolWriter.WriteAsync(issueNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"线边仓领料单-Issue处理{issueNoteList.Count}条");
if (issueNoteList.Count > 0)
{
- Logger.LogInformation($"线边仓领料单-Issue处理{issueNoteList.Count}条");
scontrol_count += issueNoteList.Count;
}
#endregion
#region 线边仓退料单 ProductionReturn scontrol
- Logger.LogInformation($"Write ProductionReturnNote");//线边仓退料单(汇总)
+ Logger.LogInformation($"传出线边仓退料单 ProductionReturnNote");//线边仓退料单(汇总)
var productionReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var productionReturnNoteList = await productionReturnNoteConvert.ConvertAsync().ConfigureAwait(false);
await scontrolWriter.WriteAsync(productionReturnNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"线边仓退料单-ProductionReturn处理{productionReturnNoteList.Count}条");
if (productionReturnNoteList.Count > 0)
{
- Logger.LogInformation($"线边仓退料单-ProductionReturn处理{productionReturnNoteList.Count}条");
scontrol_count += productionReturnNoteList.Count;
}
#endregion
#region 半成品上架 SemiPutaway scontrol
- Logger.LogInformation($"Write SemiPutawayNote");//半成品上架
+ Logger.LogInformation($"传出半成品上架 SemiPutawayNote");//半成品上架
var semiPutawayNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var semiPutawayNoteList = await semiPutawayNoteConvert.ConvertAsync().ConfigureAwait(false);
await scontrolWriter.WriteAsync(semiPutawayNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"半成品上架-SemiPutaway处理{semiPutawayNoteList.Count}条");
if (semiPutawayNoteList.Count > 0)
- {
- Logger.LogInformation($"半成品上架-SemiPutaway处理{semiPutawayNoteList.Count}条");
+ {
scontrol_count += semiPutawayNoteList.Count;
}
#endregion
#region 储位、线边仓调拨单 和 客户储位调拨单 Transfer scontrol
- Logger.LogInformation($"Write TransferNote");//储位、线边仓调拨单 和 客户储位调拨单(汇总)
+ Logger.LogInformation($"传出储位、线边仓调拨单 和 客户储位调拨单 TransferNote");//储位、线边仓调拨单 和 客户储位调拨单(汇总)
var transferNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var transferNoteList = await transferNoteConvert.ConvertAsync().ConfigureAwait(false);
var transferNoteForErpList = transferNoteList.Where(r => r.DataType == EnumOutgoingDataType.TransferForErp.ToString()).ToList();//储位、线边仓调拨单
var transferNoteForCustomList = transferNoteList.Where(r => r.DataType == EnumOutgoingDataType.TransferForCustom.ToString()).ToList();//客户储位调拨单
await scontrolWriter.WriteAsync(transferNoteForErpList).ConfigureAwait(false);
await wmsoutmWriter.WriteAsync(transferNoteForCustomList).ConfigureAwait(false);
+ Logger.LogInformation($"储位、线边仓调拨单-Transfer处理{transferNoteForErpList.Count}条");
+ Logger.LogInformation($"客户储位调拨单-Transfer处理{transferNoteForCustomList.Count}条");
if (transferNoteForErpList.Count > 0)
- {
- Logger.LogInformation($"储位、线边仓调拨单-Transfer处理{transferNoteForErpList.Count}条");
+ {
scontrol_count += transferNoteForErpList.Count;
}
if (transferNoteForCustomList.Count > 0)
- {
- Logger.LogInformation($"客户储位调拨单-Transfer处理{transferNoteForCustomList.Count}条");
+ {
wmsoutm_count += transferNoteForCustomList.Count;
}
#endregion
@@ -145,69 +145,73 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
}
#region 出货单 Deliver wmsoutm
- Logger.LogInformation($"Write DeliverNote");//出货单(汇总)
+ Logger.LogInformation($"传出出货单 DeliverNote");//出货单(汇总)
var deliverNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var deliverNoteList = await deliverNoteConvert.ConvertAsync().ConfigureAwait(false);
await wmsoutmWriter.WriteAsync(deliverNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"出货单-Deliver处理{deliverNoteList.Count}条");
if (deliverNoteList.Count > 0)
- {
- Logger.LogInformation($"出货单-Deliver处理{deliverNoteList.Count}条");
+ {
wmsoutm_count += deliverNoteList.Count;
}
#endregion
- #region --接口以关闭-- 退货单 UnplannedReceipt wmsoutm
- //暂无此接口
- //Logger.LogInformation($"Write CustomerReturnNote");//退货单
- //var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService();
- //var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false);
- //await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false);
+ #region 客户退货单 CustomerReturn wmsoutm
+ Logger.LogInformation($"传出退货单 CustomerReturnNote");//退货单
+ var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService();
+ var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false);
+ await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"退货单-CustomerReturn处理{customerReturnNoteList.Count}条");
+ if (customerReturnNoteList.Count > 0)
+ {
+ wmsoutm_count += customerReturnNoteList.Count;
+ }
#endregion
#region 非生产领料单 UnplannedIssue wmsoutm
- Logger.LogInformation($"Write UnplannedIssueNote");//非生产领料单(汇总)
+ Logger.LogInformation($"传出非生产领料单 UnplannedIssueNote");//非生产领料单(汇总)
var unplannedIssueNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var unplannedIssueNoteNoteList = await unplannedIssueNoteConvert.ConvertAsync().ConfigureAwait(false);
await wmsoutmWriter.WriteAsync(unplannedIssueNoteNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"非生产领料单-UnplannedIssue处理{unplannedIssueNoteNoteList.Count}条");
if (unplannedIssueNoteNoteList.Count > 0)
{
- Logger.LogInformation($"非生产领料单-UnplannedIssue处理{unplannedIssueNoteNoteList.Count}条");
wmsoutm_count += unplannedIssueNoteNoteList.Count;
}
#endregion
#region 非生产退料 UnplannedReceipt wmsoutm
- Logger.LogInformation($"Write UnplannedReceiptNote");//非生产退料(汇总)
+ Logger.LogInformation($"传出非生产退料 UnplannedReceiptNote");//非生产退料(汇总)
var unplannedReceiptNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var unplannedReceiptNoteList = await unplannedReceiptNoteConvert.ConvertAsync().ConfigureAwait(false);
await wmsoutmWriter.WriteAsync(unplannedReceiptNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"非生产退料-UnplannedReceipt处理{unplannedReceiptNoteList.Count}条");
if (unplannedReceiptNoteList.Count > 0)
- {
- Logger.LogInformation($"非生产退料-UnplannedReceipt处理{unplannedReceiptNoteList.Count}条");
+ {
wmsoutm_count += unplannedReceiptNoteList.Count;
}
#endregion
#region 回收料入库单 RecycledMaterialReceipt wmsoutm
- Logger.LogInformation($"Write RecycledMaterialReceiptNote");//回收料入库单
+ Logger.LogInformation($"传出回收料入库单 RecycledMaterialReceiptNote");//回收料入库单
var recycledMaterialReceiptNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var recycledMaterialReceiptNoteList = await recycledMaterialReceiptNoteConvert.ConvertAsync().ConfigureAwait(false);
await wmsoutmWriter.WriteAsync(recycledMaterialReceiptNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"回收料入库单-RecycledMaterialReceipt处理{recycledMaterialReceiptNoteList.Count}条");
if (recycledMaterialReceiptNoteList.Count > 0)
- {
- Logger.LogInformation($"回收料入库单-RecycledMaterialReceipt处理{recycledMaterialReceiptNoteList.Count}条");
+ {
wmsoutm_count += recycledMaterialReceiptNoteList.Count;
}
#endregion
#region 退拆单 ProductRecycle wmsoutm
- Logger.LogInformation($"Write BackFlushNote");//退拆单
+ Logger.LogInformation($"传出退拆单 BackFlushNote");//退拆单
var productRecycleNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var productRecycleNoteList = await productRecycleNoteConvert.ConvertAsync().ConfigureAwait(false);
await wmsoutmWriter.WriteAsync(productRecycleNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"退拆单-ProductRecycle处理{productRecycleNoteList.Count}条");
if (productRecycleNoteList.Count > 0)
- {
- Logger.LogInformation($"退拆单-ProductRecycle处理{productRecycleNoteList.Count}条");
+ {
wmsoutm_count += productRecycleNoteList.Count;
}
#endregion
@@ -220,44 +224,44 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
#region --接口以关闭-- 盘点调整单 CountAdjust mesout_asd
//东阳上海和安徽暂时关闭此接口
- //Logger.LogInformation($"Write CountAdjusNote");//盘点调整单
+ //Logger.LogInformation($"传出 CountAdjusNote");//盘点调整单
//var countadjustNoteConvert = workerContext.ServiceProvider.GetRequiredService();
//var countadjustNoteList = await countadjustNoteConvert.ConvertAsync().ConfigureAwait(false);
//await countadjustWriter.WriteAsync(countadjustNoteList).ConfigureAwait(false);
#endregion
#region 线边仓调整单 WIPAdjust mesout_asd
- Logger.LogInformation($"Write WIPAdjusNote");//线边仓调整单(汇总)
+ Logger.LogInformation($"传出线边仓调整单 WIPAdjusNote");//线边仓调整单(汇总)
var wipAdjustNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var wipAdjustNoteList = await wipAdjustNoteConvert.ConvertAsync().ConfigureAwait(false);
await countadjustWriter.WriteAsync(wipAdjustNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"线边仓调整单-WIPAdjust处理{wipAdjustNoteList.Count}条");
if (wipAdjustNoteList.Count > 0)
{
- Logger.LogInformation($"线边仓调整单-WIPAdjust处理{wipAdjustNoteList.Count}条");
mesout_asd_count += wipAdjustNoteList.Count;
}
#endregion
#region 回收料调整单 Item_Transform mesout_asd
- Logger.LogInformation($"Write ItemTransformNote");//回收料调整单(汇总)
+ Logger.LogInformation($"传出回收料调整单 ItemTransformNote");//回收料调整单(汇总)
var ItemTransformNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var ItemTransformNoteList = await ItemTransformNoteConvert.ConvertAsync().ConfigureAwait(false);
await countadjustWriter.WriteAsync(ItemTransformNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"回收料调整单-Item_Transform处理{ItemTransformNoteList.Count}条");
if (ItemTransformNoteList.Count > 0)
- {
- Logger.LogInformation($"回收料调整单-Item_Transform处理{ItemTransformNoteList.Count}条");
+ {
mesout_asd_count += ItemTransformNoteList.Count;
}
#endregion
#region 报废单、线边仓报废单 Scrap mesout_asd
- Logger.LogInformation($"Write ScrapNote");//报废单、线边仓报废单
+ Logger.LogInformation($"传出报废单、线边仓报废单 ScrapNote");//报废单、线边仓报废单
var scrapNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var scrapNoteList = await scrapNoteConvert.ConvertAsync().ConfigureAwait(false);
await countadjustWriter.WriteAsync(scrapNoteList).ConfigureAwait(false);
+ Logger.LogInformation($"报废单、线边仓报废单-Scrap处理{scrapNoteList.Count}条");
if (scrapNoteList.Count > 0)
{
- Logger.LogInformation($"报废单、线边仓报废单-Scrap处理{scrapNoteList.Count}条");
mesout_asd_count += scrapNoteList.Count;
}
#endregion
@@ -269,18 +273,16 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
}
#region 缴库单 ProductReceipt mesout
- Logger.LogInformation($"Write ProductReceiptNote");//缴库单
+ Logger.LogInformation($"传出缴库单 ProductReceiptNote");//缴库单
var productReceiptNoteConvert = workerContext.ServiceProvider.GetRequiredService();
var productReceiptNoteList = await productReceiptNoteConvert.ConvertAsync().ConfigureAwait(false);
var productReceiptNoteWriter = workerContext.ServiceProvider.GetRequiredService();//mesout中间表的服务
await productReceiptNoteWriter.WriteAsync(productReceiptNoteList).ConfigureAwait(false);
- if (productReceiptNoteList.Count > 0)
- {
- Logger.LogInformation($"缴库单-ProductReceipt处理{productReceiptNoteList.Count}条");
- }
+ Logger.LogInformation($"缴库单-ProductReceipt处理{productReceiptNoteList.Count}条");
+
#endregion
- Logger.LogInformation($"Completed: Handling {Outgoing}");
+ Logger.LogInformation($"提交: 执行 {Outgoing}");
}
}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json
index 5fc6279cf..dafba97f2 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json
@@ -1,13 +1,13 @@
{
"ConnectionStrings": {
- "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",
- "TYRP": "Server=dev.ccwin-in.com,13319;Database=TYRP_CC;Uid=ccwin-in;Pwd=Microsoft@2022;TrustServerCertificate=True",
+ "Default": "Server=10.164.233.6;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false",
+ "DataExchange": "Server=10.164.233.6;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false",
+ "TYRP": "Server=10.164.233.6;Database=TYRP_CC;Uid=ccwin-in;Pwd=Microsoft@2022;TrustServerCertificate=True",
"SYBASE_TYRP": "Data Source=10.164.233.4; Port=5000; Database=mesdb; Uid=sa; Pwd=dawning;Charset=cp850;" //iso_1
},
"AuthServer": {
- "Authority": "http://dev.ccwin-in.com:60083/",
+ "Authority": "http://10.164.233.5:60083/",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "admin",
"SwaggerClientSecret": "1q2w3E*",
@@ -26,16 +26,16 @@
"RemoteServices": {
"BaseData": {
- "BaseUrl": "http://dev.ccwin-in.com:60084/"
+ "BaseUrl": "http://10.164.233.5:60084/"
},
"Store": {
- "BaseUrl": "http://dev.ccwin-in.com:60085/"
+ "BaseUrl": "http://10.164.233.5:60085/"
},
"Label": {
- "BaseUrl": "http://dev.ccwin-in.com:60082/"
+ "BaseUrl": "http://10.164.233.5:60082/"
},
"Auth": {
- "BaseUrl": "http://dev.ccwin-in.com:60083/"
+ "BaseUrl": "http://10.164.233.5:60083/"
}
},
"TyrpOptions": {
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs
index 59cf323ef..28aa02cc5 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/AgentModule.cs
@@ -150,6 +150,6 @@ public class AgentModule : AbpModule
ApplicationInitializationContext context)
{
context.AddBackgroundWorkerAsync();
- // context.AddBackgroundWorkerAsync();
+ context.AddBackgroundWorkerAsync();
}
}
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 6c7ca0d7a..5f5c36cc9 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
@@ -85,9 +85,9 @@ public static class IncomingToWmsExtensions
}
public static async Task HandleErpLocationItemsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
{
- //var erpLocationItem = JsonSerializer.Deserialize(incomingConverted.DataContent);
- //var erpLocationItemAppService = workerContext.ServiceProvider.GetRequiredService();
- //await erpLocationItemAppService.UpsertAsync(erpLocationItem).ConfigureAwait(false);
+ var erpLocationItem = JsonSerializer.Deserialize(incomingConverted.DataContent);
+ var erpLocationItemAppService = workerContext.ServiceProvider.GetRequiredService();
+ await erpLocationItemAppService.UpsertAsync(erpLocationItem).ConfigureAwait(false);
}
public static async Task HandleErpLocationsAsync(this IncomingToWms incomingConverted, PeriodicBackgroundWorkerContext workerContext)
{
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs
index 6c156c33b..bafe08f81 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/OutgoingFromWmsWorker.cs
@@ -1,6 +1,8 @@
+using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.Threading;
@@ -54,10 +56,9 @@ public class OutgoingFromWmsWorker : AsyncPeriodicBackgroundWorkerBase
await outgoingFromWmsManager.CreateManyAsync(outgoingFromWmsList).ConfigureAwait(false);
await exchangeDataAppService.UpdateManyAsync(exchangeDataList).ConfigureAwait(false);
}
- catch (System.Exception ex)
+ catch (Exception ex)
{
-
- throw ex;
+ Logger.LogInformation(ex.Message+ex?.InnerException.Message);
}
}
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Program.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Program.cs
index f8458799e..f9e6bd999 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Program.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Program.cs
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
+using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
@@ -11,18 +12,25 @@ public class Program
{
public static async Task Main(string[] args)
{
+ // Log.Logger = new LoggerConfiguration()
+ //#if DEBUG
+ // .MinimumLevel.Debug()
+ //#else
+ // .MinimumLevel.Information()
+ //#endif
+ // .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
+ // .Enrich.FromLogContext()
+ // .WriteTo.Async(c => c.File("Logs/logs.txt"))
+ // .WriteTo.Async(c => c.Console())
+ // .CreateLogger();
+ IConfigurationRoot configuration =
+ new ConfigurationBuilder()
+ .AddJsonFile("serilogsettings.json", false, true)
+ .Build();
+
Log.Logger = new LoggerConfiguration()
-#if DEBUG
- .MinimumLevel.Debug()
-#else
- .MinimumLevel.Information()
-#endif
- .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
- .Enrich.FromLogContext()
- .WriteTo.Async(c => c.File("Logs/logs.txt"))
- .WriteTo.Async(c => c.Console())
+ .ReadFrom.Configuration(configuration)
.CreateLogger();
-
try
{
Log.Information("Starting console host.");
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Win_in.Sfs.Wms.DataExchange.Agent.csproj b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Win_in.Sfs.Wms.DataExchange.Agent.csproj
index 484c87c87..321251d4b 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Win_in.Sfs.Wms.DataExchange.Agent.csproj
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Win_in.Sfs.Wms.DataExchange.Agent.csproj
@@ -11,10 +11,12 @@
+
+
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 0f8bdf492..649886482 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=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"
+ "Default": "Server=10.164.233.6;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True",
+ "DataExchange": "Server=10.164.233.6;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True"
},
"AuthServer": {
- "Authority": "http://dev.ccwin-in.com:60083/",
+ "Authority": "http://10.164.233.5:60083/",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "admin",
"SwaggerClientSecret": "1q2w3E*",
@@ -26,16 +26,16 @@
"RemoteServices": {
"BaseData": {
- "BaseUrl": "http://dev.ccwin-in.com:60084/"
+ "BaseUrl": "http://10.164.233.5:60084/"
},
"Store": {
- "BaseUrl": "http://dev.ccwin-in.com:60085/"
+ "BaseUrl": "http://10.164.233.5:60085/"
},
"Label": {
- "BaseUrl": "http://dev.ccwin-in.com:60082/"
+ "BaseUrl": "http://10.164.233.5:60082/"
},
"Auth": {
- "BaseUrl": "http://dev.ccwin-in.com:60083/"
+ "BaseUrl": "http://10.164.233.5:60083/"
}
},
"DataExchangeOptions": {
@@ -44,7 +44,7 @@
"PeriodSeconds": 10,
"RetryTimes": 1,
"BatchSize": 100,
- "apiUrl": "http://dev.ccwin-in.com:60085/"
+ "apiUrl": "http://10.164.233.5:60085/"
},
"OutgoingOptions": {
"Active": false,
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/serilogsettings.json b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/serilogsettings.json
new file mode 100644
index 000000000..228c61a68
--- /dev/null
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/serilogsettings.json
@@ -0,0 +1,39 @@
+{
+ "Serilog": {
+ "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Async", "Serilog.Sinks.Console", "Serilog.Sinks.MSSqlServer" ],
+ "MinimumLevel": {
+ "Default": "Debug",
+ "Override": {
+ "Microsoft": "Information",
+ "Microsoft.EntityFrameworkCore": "Warning"
+ }
+ },
+ "WriteTo": [
+ {
+ "Name": "Async",
+ "Args": {
+ "configure": [
+ {
+ "Name": "File",
+ "Args": {
+ "path": "..//Logs//WmsAgent//WmsAgent_.log",
+ "rollingInterval": "Day",
+ "fileSizeLimitBytes": "52428800",
+ "rollOnFileSizeLimit": "true",
+ "restrictedToMinimumLevel": "Debug"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "Name": "Console",
+ "Args": {
+ "restrictedToMinimumLevel": "Debug",
+ "outputTemplate": "{Timestamp:HH:mm:ss.fff} [{Level:u3}] {Message} {NewLine}{Exception}"
+ }
+ }
+ ],
+ "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ]
+ }
+}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs
index cda6687aa..00539feda 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverNote/DeliverNoteDetailExchangeDto.cs
@@ -26,11 +26,11 @@ public class DeliverNoteDetailExchangeDto
///
[Display(Name = "数量")]
public decimal Qty { get; set; }
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -41,4 +41,9 @@ public class DeliverNoteDetailExchangeDto
///
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs
index 3f76b5d9b..37cb3275a 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestDetailExchangeDto.cs
@@ -25,11 +25,11 @@ public class DeliverRequestDetailExchangeDto
///
[Display(Name = "数量")]
public decimal Qty { get; set; }
- ///
- /// Mes发货单号
- ///
- [Display(Name = "Mes发货单号")]
- public string MesDeliveryNo { get; set; }
+ /////
+ ///// Mes发货单号
+ /////
+ //[Display(Name = "Mes发货单号")]
+ //public string MesDeliveryNo { get; set; }
///
/// Mes发货计划号
///
@@ -40,4 +40,9 @@ public class DeliverRequestDetailExchangeDto
///
[Display(Name = "底盘号")]
public string IdentityNo { get; set; }
+ ///
+ /// 底盘号
+ ///
+ [Display(Name = "Mes器具号")]
+ public string MesDeliveryContainer { get; set; }
}
diff --git a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs
index 7273c7ce0..d98237813 100644
--- 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
@@ -27,7 +27,14 @@ public class DeliverRequestExchangeDto
/// 发货类型
///
public EnumDeliverRequestType DeliverRequestType { get; set; }
-
+ ///
+ /// 看板件发货计划单号/JIS发货单号
+ ///
+ public string DeliverPlanNumber { get; set; }
+ ///
+ /// Mes车牌号
+ ///
+ public string MesTruckNumber { 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 0799d6c0e..bd66333af 100644
--- a/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml
+++ b/be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml
@@ -531,11 +531,6 @@
数量
-
-
- Mes发货单号
-
-
Mes发货计划号
@@ -546,6 +541,11 @@
底盘号
+
+
+ 底盘号
+
+
单据号
@@ -586,11 +586,6 @@
数量
-
-
- Mes发货单号
-
-
Mes发货计划号
@@ -601,6 +596,11 @@
底盘号
+
+
+ 底盘号
+
+
单据号
@@ -626,6 +626,16 @@
发货类型
+
+
+ 看板件发货计划单号/JIS发货单号
+
+
+
+
+ Mes车牌号
+
+
客户
diff --git a/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml b/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml
index 5eeeba510..df0967a6b 100644
--- a/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml
@@ -4,17 +4,17 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
- true
+ false
false
true
Release
Any CPU
FileSystem
- .\..\..\..\OutPut\Core\
+ D:\发布\WMS\core
FileSystem
net6.0
230d2ddc-4797-4c9b-a84c-9eb57aa16297
false
-
+
\ No newline at end of file
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
index e3fb58d14..20ca5a718 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
@@ -303,7 +303,7 @@ public class BalanceController : AbpController
}
///
- /// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次
+ /// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次(无箱码)
///
///
///
@@ -333,10 +333,10 @@ public class BalanceController : AbpController
input.Condition.Filters.Add(new Filter("Lot", listInput.lot));
}
- if (!string.IsNullOrWhiteSpace(listInput.packingCode))
- {
+ //if (!string.IsNullOrWhiteSpace(listInput.packingCode))
+ //{
input.Condition.Filters.Add(new Filter("PackingCode", listInput.packingCode));
- }
+ //}
if (!string.IsNullOrWhiteSpace(listInput.containerCode))
{
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs
index a671ec107..82750ac6a 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs
@@ -35,24 +35,31 @@ public class AssembleIssueJobsController : AbpController
///
///
///
- ///
+ ///
///
[HttpPost("list")]
- public virtual async Task> GetListAsync(int pageSize, int pageIndex,
- bool isFinished)
+ public virtual async Task> GetListAsync(int pageSize, int pageIndex, string jobStatus)
{
var status = new List();
- if (isFinished)
- {
- status.Add((int)EnumJobStatus.Done);
- }
- else
+ if (jobStatus == "ALL")
{
status.Add((int)EnumJobStatus.Open);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
+ else if (jobStatus == "Open")
+ {
+ status.Add((int)EnumJobStatus.Open);
+ }
+ else if (jobStatus == "Wait")
+ {
+ status.Add((int)EnumJobStatus.Wait);
+ }
+ else
+ {
+ status.Add((int)EnumJobStatus.Done);
+ }
var jsonStatus = JsonSerializer.Serialize(status);
@@ -60,10 +67,10 @@ public class AssembleIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
- Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
+ Sorting = $"{nameof(AssembleIssueJobDTO.JobStatus)} ASC,{nameof(AssembleIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
- Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
+ Filters = new List { new(nameof(AssembleIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs
index e51636f82..cf7f0d047 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs
@@ -35,24 +35,31 @@ public class CoatingIssueJobsController : AbpController
///
///
///
- ///
+ ///
///
[HttpPost("list")]
- public virtual async Task> GetListAsync(int pageSize, int pageIndex,
- bool isFinished)
+ public virtual async Task> GetListAsync(int pageSize, int pageIndex, string jobStatus)
{
var status = new List();
- if (isFinished)
- {
- status.Add((int)EnumJobStatus.Done);
- }
- else
+ if (jobStatus == "ALL")
{
status.Add((int)EnumJobStatus.Open);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
+ else if (jobStatus == "Open")
+ {
+ status.Add((int)EnumJobStatus.Open);
+ }
+ else if (jobStatus == "Wait")
+ {
+ status.Add((int)EnumJobStatus.Wait);
+ }
+ else
+ {
+ status.Add((int)EnumJobStatus.Done);
+ }
var jsonStatus = JsonSerializer.Serialize(status);
@@ -60,10 +67,10 @@ public class CoatingIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
- Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
+ Sorting = $"{nameof(CoatingIssueJobDTO.JobStatus)} ASC,{nameof(CoatingIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
- Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
+ Filters = new List { new(nameof(CoatingIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs
index b9f0dc3f8..59ab445ea 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs
@@ -35,24 +35,31 @@ public class InjectionIssueJobsController : AbpController
///
///
///
- ///
+ ///
///
[HttpPost("list")]
- public virtual async Task> GetListAsync(int pageSize, int pageIndex,
- bool isFinished)
+ public virtual async Task> GetListAsync(int pageSize, int pageIndex, string jobStatus)
{
var status = new List();
- if (isFinished)
- {
- status.Add((int)EnumJobStatus.Done);
- }
- else
+ if (jobStatus == "ALL")
{
status.Add((int)EnumJobStatus.Open);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
+ else if (jobStatus == "Open")
+ {
+ status.Add((int)EnumJobStatus.Open);
+ }
+ else if (jobStatus == "Wait")
+ {
+ status.Add((int)EnumJobStatus.Wait);
+ }
+ else
+ {
+ status.Add((int)EnumJobStatus.Done);
+ }
var jsonStatus = JsonSerializer.Serialize(status);
@@ -60,10 +67,10 @@ public class InjectionIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
- Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
+ Sorting = $"{nameof(InjectionIssueJobDTO.JobStatus)} ASC,{nameof(InjectionIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
- Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
+ Filters = new List { new(nameof(InjectionIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};
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
index 7ce5bb355..799e9e24b 100644
--- 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
@@ -35,24 +35,31 @@ public class KittingIssueJobsController : AbpController
///
///
///
- ///
+ ///
///
[HttpPost("list")]
- public virtual async Task> GetListAsync(int pageSize, int pageIndex,
- bool isFinished)
+ public virtual async Task> GetListAsync(int pageSize, int pageIndex, string jobStatus)
{
var status = new List();
- if (isFinished)
- {
- status.Add((int)EnumJobStatus.Done);
- }
- else
+ if (jobStatus=="ALL")
{
status.Add((int)EnumJobStatus.Open);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
+ else if(jobStatus == "Open")
+ {
+ status.Add((int)EnumJobStatus.Open);
+ }
+ else if(jobStatus == "Wait")
+ {
+ status.Add((int)EnumJobStatus.Wait);
+ }
+ else
+ {
+ status.Add((int)EnumJobStatus.Done);
+ }
var jsonStatus = JsonSerializer.Serialize(status);
@@ -60,10 +67,10 @@ public class KittingIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
- Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
+ Sorting = $"{nameof(KittingIssueJobDTO.JobStatus)} ASC,{nameof(KittingIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
- Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
+ Filters = new List { new(nameof(KittingIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs
index fe5ac52ef..66cbe7fae 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs
@@ -35,24 +35,31 @@ public class SparePartIssueJobsController : AbpController
///
///
///
- ///
+ ///
///
[HttpPost("list")]
- public virtual async Task> GetListAsync(int pageSize, int pageIndex,
- bool isFinished)
+ public virtual async Task> GetListAsync(int pageSize, int pageIndex, string jobStatus)
{
var status = new List();
- if (isFinished)
- {
- status.Add((int)EnumJobStatus.Done);
- }
- else
+ if (jobStatus == "ALL")
{
status.Add((int)EnumJobStatus.Open);
status.Add((int)EnumJobStatus.Wait);
status.Add((int)EnumJobStatus.Doing);
status.Add((int)EnumJobStatus.Partial);
}
+ else if (jobStatus == "Open")
+ {
+ status.Add((int)EnumJobStatus.Open);
+ }
+ else if (jobStatus == "Wait")
+ {
+ status.Add((int)EnumJobStatus.Wait);
+ }
+ else
+ {
+ status.Add((int)EnumJobStatus.Done);
+ }
var jsonStatus = JsonSerializer.Serialize(status);
@@ -60,10 +67,10 @@ public class SparePartIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
- Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
+ Sorting = $"{nameof(SparePartIssueJobDTO.JobStatus)} ASC,{nameof(SparePartIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
- Filters = new List { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
+ Filters = new List { new(nameof(SparePartIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs
index 9889b2a87..1e427b46f 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs
@@ -133,7 +133,7 @@ public class JobController : AbpController
}
}
}).ConfigureAwait(false);
- list.Add(new JobCountDto { JobType = EnumJobType.CountJob_ByPackingCode, Count = countJobs_ByErpItemCode });
+ list.Add(new JobCountDto { JobType = EnumJobType.CountJob_ByErpItemCode, Count = countJobs_ByErpItemCode });
//成品发运
var deliverJobs = await _deliverJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase
{
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
index 2c1ed7bb4..0f008282f 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
@@ -15,6 +15,7 @@ using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
+using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs;
@@ -47,27 +48,27 @@ public class ThirdLocationJobController : AbpController
}
///
- /// 获取任务详情
+ /// 执行任务明细
///
- ///
///
- [HttpGet("{id}")]
- public virtual async Task> GetAsync(Guid id)
+ [HttpPost("ExecuteDetail")]
+ public virtual async Task ExecuteDetailAsync(List detailDtoList)
{
- var result = await _thirdLocationJobAppService.GetAsync(id).ConfigureAwait(false);
- return Ok(result);
+ return await _thirdLocationJobAppService.ExecuteDetailAsync(detailDtoList).ConfigureAwait(false);
+ //return await _thirdLocationJobAppService.ExecuteDetail2Async(detailDtoList).ConfigureAwait(false);
}
///
- /// 获取列表 筛选
+ /// 获取上架任务详情
///
- ///
+ ///
///
- [HttpPost("list")]
- public virtual async Task> GetListAsync(SfsJobRequestInputBase sfsRequestDTO)
+ [HttpGet("{id}")]
+
+ public virtual async Task> GetAsync(Guid id)
{
- var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false);
- return list;
+ var result = await _thirdLocationJobAppService.GetAsync(id).ConfigureAwait(false);
+ return Ok(result);
}
///
@@ -79,53 +80,41 @@ public class ThirdLocationJobController : AbpController
[HttpGet("list")]
public virtual async Task> GetListAsync(int pageSize, int pageIndex)
{
- var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial };
+ var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
+ //var jsonCodes = JsonSerializer.Serialize(wlgCodes);
+
+ var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing ,(int)EnumJobStatus.Partial};
var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
- Sorting = $"{nameof(ThirdLocationJobDTO.CreationTime)} ASC",
+ Sorting = $"{nameof(ThirdLocationJobDTO.Priority)} ASC",
Condition = new Condition
{
Filters = new List
- {
- new(nameof(IssueJobDTO.JobStatus),jsonStatus,"In")
+ {
+ //new(nameof(ThirdLocationJobDTO.WorkGroupCode),jsonCodes,"In"),
+ new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In")
}
}
-
};
var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);
-
-
return list;
}
///
- /// 根据Job Number 获取任务列表
+ /// 获取列表 筛选
///
- ///
+ ///
///
- [HttpGet("by-number/{jobNumber}")]
- public virtual async Task> GetByNumberAsync(string jobNumber)
+ [HttpPost("list")]
+ public virtual async Task> GetListAsync(SfsJobRequestInputBase sfsRequestDTO)
{
- var jobDto = await _thirdLocationJobAppService.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;
+ var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false);
+ return list;
}
///
@@ -138,7 +127,7 @@ public class ThirdLocationJobController : AbpController
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
var jsonCodes = JsonSerializer.Serialize(wlgCodes);
- var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial };
+ var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing ,(int)EnumJobStatus.Partial};
var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase
@@ -182,25 +171,13 @@ public class ThirdLocationJobController : AbpController
}
///
- /// 关闭任务
- ///
- ///
- ///
- [HttpPost("close-job/{id}")]
- public virtual async Task CloseJobAsync(Guid id)
- {
- await _thirdLocationJobAppService.CloseJobAsync(id).ConfigureAwait(false);
- }
-
- ///
- /// 执行任务
+ /// 完成任务
///
///
- ///
///
- [HttpPost("finish/{id}")]
- public virtual async Task FinishAsync(Guid id, [FromBody] ThirdLocationJobDTO dto)
+ [HttpPost("Complete/{id}")]
+ public async Task CompleteAsync(Guid id)
{
- await _thirdLocationJobAppService.CompleteAsync(id, dto).ConfigureAwait(false);
+ await _thirdLocationJobAppService.CompleteAsync(id).ConfigureAwait(false);
}
}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs
index 5c6aed4cb..d1e770fac 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/TransferLibJobController.cs
@@ -15,7 +15,7 @@ namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
///
///
[ApiController]
-[Route($"{PdaHostConst.ROOT_ROUTE}store/transferlib-job")]
+[Route($"{PdaHostConst.ROOT_ROUTE}store/transferlib-job")] //??store应该改成job
public class TransferLibJobController : AbpController
{
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs
index 904a3f8ed..f37f32737 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
@@ -16,14 +17,16 @@ namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
public class InjectionPlanRequestController : AbpController
{
private readonly IInjectionPlanRequestAppService _injectionRequestAppService;
+ private readonly IItemContainerAppService _itemContainerAppService;
///
///
///
///
- public InjectionPlanRequestController(IInjectionPlanRequestAppService InjectionPlanRequestAppService)
+ public InjectionPlanRequestController(IInjectionPlanRequestAppService InjectionPlanRequestAppService, IItemContainerAppService itemContainerAppService)
{
_injectionRequestAppService = InjectionPlanRequestAppService;
+ _itemContainerAppService = itemContainerAppService;
}
///
@@ -34,7 +37,7 @@ public class InjectionPlanRequestController : AbpController
[HttpPost("")]
public virtual async Task> CreateAsync(InjectionPlanRequestEditInput input)
{
- var result = await _injectionRequestAppService.CreateAsync(input).ConfigureAwait(false);
+ var result = await _injectionRequestAppService.CreateAndHandleAsync(input).ConfigureAwait(false);
return Ok(result);
}
@@ -52,16 +55,46 @@ public class InjectionPlanRequestController : AbpController
}
///
- /// 获取物品类别列表
+ /// 获取物品类别名称
+ ///
+ ///
+ [HttpGet("item-category-name")]
+ public virtual async Task> GetItemCategoryNameAsync()
+ {
+ var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false);
+ var categoryNames = entities.Select(p => p.Category).Distinct().ToList();
+
+ return categoryNames;
+ }
+
+ ///
+ /// 根据类别名称获取物品类别列表
///
- ///
+ ///
///
[HttpGet("list/item-category")]
- public virtual async Task> GetItemCategoryListAsync()
+ public virtual async Task> GetItemCategoryListAsync(string categoryName)
{
var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false);
- return entities;
+ var itemEntities = entities.Where(p => p.Category == categoryName).ToList();
+ foreach (var item in itemEntities)
+ {
+ var itemContainerDto = await _itemContainerAppService.GetByItemCodeAsync(item.Code).ConfigureAwait(false);
+
+ if(itemContainerDto != null)
+ {
+ item.StdPackQty = itemContainerDto.Qty;
+ item.BasicUom = itemContainerDto.BasicUom;
+ }
+ else
+ {
+ item.StdPackQty = 1;
+ }
+
+ }
+
+ return itemEntities;
}
}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs
index d04c8024e..ae2a27efc 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs
@@ -35,7 +35,7 @@ public class InjectionRequestController : AbpController
}
///
- /// Kitting叫料申请
+ /// 注塑叫料申请
///
///
///
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs
index b7cdd062a..4de253506 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs
@@ -48,4 +48,19 @@ public class PurchaseReceiptRequestController : AbpController
{
return await _purchaseReceiptRequestAppService.GetDetailByItemAndPackingAsync(itemCode, packingCode).ConfigureAwait(false);
}
+
+ ///
+ /// 【获取】【收货记录详情】根据 物品 传入箱码的根箱码
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("detail-by-item-and-rootpacking")]
+ public virtual async Task GetDetailByItemAndRootPackingAsync(string itemCode,
+ string packingCode)
+ {
+ return await _purchaseReceiptRequestAppService.GetDetailByItemAndRootPackingAsync(itemCode, packingCode).ConfigureAwait(false);
+ }
+
+
}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs
index 1b5403630..fea073acd 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs
@@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Domain.Entities.Auditing;
+using Volo.Abp.Users;
using Win_in.Sfs.Label.Application.Contracts;
using Win_in.Sfs.Label.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@@ -39,8 +40,8 @@ public class PurchaseReturnNoteController : AbpController
public PurchaseReturnNoteController(IPurchaseReturnNoteAppService noteAppService,
IInventoryLabelAppService labelAppService,
IBalanceAppService balanceAppService,
- IPurchaseOrderAppService purchaseOrderAppService
- )
+ IPurchaseOrderAppService purchaseOrderAppService
+ )
{
_noteAppService = noteAppService;
this._labelAppService = labelAppService;
@@ -70,7 +71,6 @@ public class PurchaseReturnNoteController : AbpController
// await this.SetDetailPoNumberAsync(input.Details);
var noteCreateInputs = await BuildNoteCreateInputsAsync(input, EnumPurchaseReturnType.BeforePuton).ConfigureAwait(false);
-
foreach (var noteCreateInput in noteCreateInputs)
{
await _noteAppService.CreateAsync(noteCreateInput).ConfigureAwait(false);
@@ -141,14 +141,13 @@ public class PurchaseReturnNoteController : AbpController
createInputs.Add(returnNoteEditInput);
}
-
return createInputs;
}
private async Task SetDetailByPoAsync(string poNumber, PurchaseReturnNoteDetailInput createInputDetail)
{
var po = await _purchaseOrderAppService.GetListByNumberAndItemCodeAsync(poNumber, createInputDetail.ItemCode).ConfigureAwait(false);
Check.NotNull(po, nameof(PurchaseOrderDTO));
- var detail = po.Details.FirstOrDefault(r => r.ItemCode == createInputDetail.ItemCode);
+ var detail = po.Details.FirstOrDefault(r => r.ItemCode == createInputDetail.ItemCode && r.Lot== createInputDetail.Lot);
Check.NotNull(detail, nameof(PurchaseOrderDetailDTO));
createInputDetail.PoLine = detail.PoLine;
}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs
index 781dae313..9c52d5757 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs
@@ -35,7 +35,7 @@ public class PurchaseReturnRequestController : AbpController
/// 创建退货申请
///
[HttpPost("create-many")]
- public virtual async Task CreateManyAsync(List input)
+ public virtual async Task> CreateManyAsync(List input)
{
List entitys = new List();
var groups = input.GroupBy(r => r.AsnNumber).ToList();
@@ -57,8 +57,7 @@ public class PurchaseReturnRequestController : AbpController
}
entitys.Add(entity);
}
- await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false);
- return Ok();
+ return await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false);
}
///
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationNoteController.cs
index 0e6e03ead..d40da917e 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationNoteController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationNoteController.cs
@@ -24,15 +24,4 @@ public class ThirdLocationNoteController : AbpController
_thirdLocationNoteAppService = thirdLocationNoteAppService;
}
- ///
- /// 创建三方库转移记录
- ///
- /// CreateInput
- ///
- [HttpPost("")]
- public virtual async Task CreateAsync(ThirdLocationNoteEditInput input)
- {
- await _thirdLocationNoteAppService.CreateAsync(input).ConfigureAwait(false);
- }
-
}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs
index 9c5a29854..373071d48 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs
@@ -109,4 +109,15 @@ public class ThirdLocationRequestController : AbpController
return Ok(result);
}
+ ///
+ /// 完成三方库请求
+ ///
+ ///
+ ///
+ [HttpPost("complete/{id}")]
+ public virtual async Task> CompleteAsync(Guid id)
+ {
+ var result = await _thirdLocationRequestAppService.CompleteAsync(id).ConfigureAwait(false);
+ return Ok(result);
+ }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDTO.cs
index ccdbdcaf8..76218bb62 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDTO.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDTO.cs
@@ -19,6 +19,12 @@ public class KittingDTO : EntityDto, IHasCode, IHasName
[Display(Name = "底盘打包数量")]
public decimal ChassisQty { get; set; }
+ [Display(Name = "备注")]
+ public string Remark { get; set; }
+ [Display(Name = "创建时间")]
+ public virtual DateTime CreationTime { get; set; }
+ [Display(Name = "最后修改时间")]
+ public virtual DateTime? LastModificationTime { get; set; }
[Display(Name = "明细")]
public List Details { set; get; }= new List();
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDetailDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDetailDTO.cs
index 694434bdb..c2440820e 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDetailDTO.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/DTOs/KittingDetailDTO.cs
@@ -46,11 +46,6 @@ public class KittingDetailDTO: AuditedEntityDto, IMultiTenant, IRemark
[Display(Name = "包装数量")]
public decimal Qty { set; get; }
- ///
- /// 配置
- ///
- [Display(Name = "配置")]
- public string Conf { set; get; }
[Display(Name = "配置")]
public string Configuration { get; set; }
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingDetailInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingDetailInput.cs
index 1e036718a..d674666bd 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingDetailInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingDetailInput.cs
@@ -47,11 +47,6 @@ public class KittingDetailInput: EntityDto, IMultiTenant, IRemark
///
[Display(Name = "包装数量")]
public decimal Qty { set; get; }
- ///
- /// 配置
- ///
- [Display(Name = "配置")]
- public string Conf { set; get; }
[Display(Name = "租户ID")]
public Guid? TenantId { set; get;
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingImportInput.cs
index 4130690bf..7a9783df7 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingImportInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Kittings/Inputs/KittingImportInput.cs
@@ -22,6 +22,7 @@ public class KittingImportInput : SfsBaseDataImportInputBase
///
[Display(Name = "物料编码")]
+ [Required(ErrorMessage = "{0}是必填项")]
public string ItemCode { set; get; }
///
/// 描述1
@@ -51,12 +52,10 @@ public class KittingImportInput : SfsBaseDataImportInputBase
[Required(ErrorMessage = "{0}是必填项")]
public decimal Qty { set; get; }
- ///
- /// 配置
- ///
- [Display(Name = "配置")]
- public string Conf { set; get; }
-
[Display(Name = "底盘打包数量")]
+ [Required(ErrorMessage = "{0}是必填项")]
public decimal ChassisQty { get; set; }
+
+ [Display(Name = "备注")]
+ public string Remark { get; set; }
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs
index 7f7c482c6..ff1e1c503 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs
@@ -11,6 +11,10 @@ using Win_in.Sfs.Basedata.Domain.Shared;
namespace Win_in.Sfs.Basedata.Application.Contracts;
public class SplitPackingRecDTO : SfsBaseDataDTOBase
+ //, IHasPurchaseInfoDto
+ //, IHasProductionInfoDto
+ //, IHasQualityInfoDto
+
{
///
/// 操作类型
@@ -156,5 +160,163 @@ public class SplitPackingRecDTO : SfsBaseDataDTOBase
[Display(Name = "标签类型")]
public EnumLabelType LabelType { get; set; }
+
+
+
+
+ #region InventoryLabel兼容成员
+
+ ///
+ /// 完整条码文本
+ ///
+ [Display(Name = "完整条码文本")]
+ public string FullBarcodeString { get; set; }
+
+ ///
+ /// 供应商批次
+ ///
+ [Display(Name = "供应商批次")]
+ public string SupplierBatch { get; set; }
+
+ ///
+ /// 到货时间
+ ///
+ [Display(Name = "summary")]
+ public DateTime ArriveDate { get; set; }
+
+ ///
+ /// 生产时间
+ ///
+ [Display(Name = "生产时间")]
+ public DateTime ProduceDate { get; set; }
+
+ ///
+ /// 过期时间
+ ///
+ [Display(Name = "过期时间")]
+ public DateTime ExpireDate { get; set; }
+
+ ///
+ /// 标签状态
+ ///
+ [Display(Name = "标签状态")]
+ public LabelStatus LabelStatus { get; set; }
+
+ ///
+ /// 建议库位
+ ///
+ [Display(Name = "建议库位")]
+ public string RecommendLocationCode { get; set; }
+
+ ///
+ /// 目标ERP库位
+ ///
+ [Display(Name = "目标ERP库位")]
+ public string LocationErpCode { get; set; }
+
+ ///
+ /// 托标签号
+ ///
+ [Display(Name = "托标签号")]
+ public string ContainerCode { get; set; }
+
+ #region 三个子实体成员
+ //-----------------------QualityInfo
+ ///
+ /// 质量级别
+ ///
+ [Display(Name = "质量级别")]
+ public string QLevel { get; set; }
+
+ ///
+ /// 质检文件
+ ///
+ [Display(Name = "质检文件")]
+ public string QualityFile { get; set; }
+
+ //----------------------PurchaseInfo
+ ///
+ /// 供应商代码
+ ///
+ [Display(Name = "供应商代码")]
+ public string SupplierCode { get; set; }
+
+ ///
+ /// 订单号
+ ///
+ //[Display(Name = "订单号")]
+ //public string PoNumber { get; set; }
+
+ ///
+ /// 要货看板号
+ ///
+ [Display(Name = "要货看板号")]
+ public string RpNumber { get; set; }
+
+ ///
+ /// 发货单号
+ ///
+ //[Display(Name = "发货单号")]
+ //public string AsnNumber { get; set; }
+
+ //--------------------------------ProductionInfo
+ ///
+ /// 生产线
+ ///
+ [Display(Name = "生产线")]
+ public string ProdLine { get; set; }
+
+ ///
+ /// 班组
+ ///
+ [Display(Name = "班组")]
+ public string Team { get; set; }
+
+ ///
+ /// 班次
+ ///
+ [Display(Name = "班次")]
+ public string Shift { get; set; }
+
+ #endregion
+
+ ///
+ /// 规格
+ ///
+ [Display(Name = "规格")]
+ public string Specifications { get; set; }
+
+ ///
+ /// 供应商名称
+ ///
+ [Display(Name = "供应商名称")]
+ public string SupplierName { get; set; }
+
+ ///
+ /// 供应商简称
+ ///
+ [Display(Name = "供应商简称")]
+ public string SupplierSimpleName { get; set; }
+
+ ///
+ /// 供应商ERP料号
+ ///
+ [Display(Name = "供应商ERP料号")]
+ public string SupplierItemCode { get; set; }
+
+ ///
+ /// 供应商物品名
+ ///
+ [Display(Name = "供应商物品名")]
+ public string SupplierItemName { get; set; }
+
+ ///
+ /// 要求到货时间
+ ///
+ [Display(Name = "要求到货时间")]
+ [Required(ErrorMessage = "{0}是必填项")]
+ public DateTime PlanArriveDate { get; set; }
+ #endregion
+
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs
index 98fa3b255..4ba841877 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs
@@ -30,6 +30,13 @@ public interface ISplitPackingRecAppService
Task GetSplitPackingCode(string toPackingCode);
Task> GetFirstOrDefaultPackingCode(List toPackingCodeList);
+ ///
+ /// 根据to箱码取所有具有相同箱码的拆箱记录
+ ///
+ ///
+ ///
+ Task> GetSamePoNumberListByToPackingCode(string toPackingCode);
+
///
///
///
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs
index 1715995bc..b12998e90 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs
@@ -13,6 +13,9 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase
+ //, IHasPurchaseInfoDto
+ , IHasProductionInfoDto
+ , IHasQualityInfoDto
{
///
/// 操作类型
@@ -131,6 +134,12 @@ public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string PurchaseInfo_AsnNumber { get; set; }
+ ///
+ /// 供应商代码
+ ///
+ [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
+ public string PurchaseInfo_SupplierCode { get; set; }
+
///
/// 到货通知
///
@@ -159,4 +168,162 @@ public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase
/// 标签类型
///
public EnumLabelType LabelType { get; set; }
+
+
+
+
+ #region InventoryLabel兼容成员
+
+ ///
+ /// 完整条码文本
+ ///
+ [Display(Name = "完整条码文本")]
+ public string FullBarcodeString { get; set; }
+
+ ///
+ /// 供应商批次
+ ///
+ [Display(Name = "供应商批次")]
+ public string SupplierBatch { get; set; }
+
+ ///
+ /// 到货时间
+ ///
+ [Display(Name = "summary")]
+ public DateTime ArriveDate { get; set; }
+
+ ///
+ /// 生产时间
+ ///
+ [Display(Name = "生产时间")]
+ public DateTime ProduceDate { get; set; }
+
+ ///
+ /// 过期时间
+ ///
+ [Display(Name = "过期时间")]
+ public DateTime ExpireDate { get; set; }
+
+ ///
+ /// 标签状态
+ ///
+ [Display(Name = "标签状态")]
+ public LabelStatus LabelStatus { get; set; }
+
+ ///
+ /// 建议库位
+ ///
+ [Display(Name = "建议库位")]
+ public string RecommendLocationCode { get; set; }
+
+ ///
+ /// 目标ERP库位
+ ///
+ [Display(Name = "目标ERP库位")]
+ public string LocationErpCode { get; set; }
+
+ ///
+ /// 托标签号
+ ///
+ [Display(Name = "托标签号")]
+ public string ContainerCode { get; set; }
+
+ #region 三个子实体成员
+ //-----------------------QualityInfo
+ ///
+ /// 质量级别
+ ///
+ [Display(Name = "质量级别")]
+ public string QLevel { get; set; }
+
+ ///
+ /// 质检文件
+ ///
+ [Display(Name = "质检文件")]
+ public string QualityFile { get; set; }
+
+ //----------------------PurchaseInfo
+ ///
+ /// 供应商代码
+ ///
+ [Display(Name = "供应商代码")]
+ public string SupplierCode { get; set; }
+
+ ///
+ /// 订单号
+ ///
+ //[Display(Name = "订单号")]
+ //public string PoNumber { get; set; }
+
+ ///
+ /// 要货看板号
+ ///
+ [Display(Name = "要货看板号")]
+ public string RpNumber { get; set; }
+
+ ///
+ /// 发货单号
+ ///
+ //[Display(Name = "发货单号")]
+ //public string AsnNumber { get; set; }
+
+ //--------------------------------ProductionInfo
+ ///
+ /// 生产线
+ ///
+ [Display(Name = "生产线")]
+ public string ProdLine { get; set; }
+
+ ///
+ /// 班组
+ ///
+ [Display(Name = "班组")]
+ public string Team { get; set; }
+
+ ///
+ /// 班次
+ ///
+ [Display(Name = "班次")]
+ public string Shift { get; set; }
+
+ #endregion
+
+ ///
+ /// 规格
+ ///
+ [Display(Name = "规格")]
+ public string Specifications { get; set; }
+
+ ///
+ /// 供应商名称
+ ///
+ [Display(Name = "供应商名称")]
+ public string SupplierName { get; set; }
+
+ ///
+ /// 供应商简称
+ ///
+ [Display(Name = "供应商简称")]
+ public string SupplierSimpleName { get; set; }
+
+ ///
+ /// 供应商ERP料号
+ ///
+ [Display(Name = "供应商ERP料号")]
+ public string SupplierItemCode { get; set; }
+
+ ///
+ /// 供应商物品名
+ ///
+ [Display(Name = "供应商物品名")]
+ public string SupplierItemName { get; set; }
+
+ ///
+ /// 要求到货时间
+ ///
+ [Display(Name = "要求到货时间")]
+ [Required(ErrorMessage = "{0}是必填项")]
+ public DateTime PlanArriveDate { get; set; }
+ #endregion
+
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs
index 828a8bba0..67c7941df 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs
@@ -17,6 +17,7 @@ using System.Text;
using DocumentFormat.OpenXml.Office2010.ExcelAc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
+using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Win_in.Sfs.Shared;
@@ -60,9 +61,17 @@ public class DictAppService : SfsBaseDataWithCodeAppServiceBase UpdateAsync(Guid id, DictEditInput input)
+ public override async Task UpdateAsync(Guid id, DictEditInput input)
{
- return base.UpdateAsync(id, input);
+ //return await base.UpdateAsync(id, input).ConfigureAwait(false); //lyf at 0621, 更新报错所以注释
+ var entity = await _repository.GetAsync(id).ConfigureAwait(false);
+ if (entity == null)
+ {
+ throw new UserFriendlyException($"根据Id取字典表为空:{id}");
+ }
+ ObjectMapper.Map(input, entity);
+ await _repository.UpdateAsync(entity, true).ConfigureAwait(false);
+ return ObjectMapper.Map(entity);
}
[HttpPost("update")]
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAppService.cs
index df6e5544c..77dbbbde3 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Kittings/KittingAppService.cs
@@ -108,23 +108,9 @@ public class KittingAppService : SfsBaseDataWithCodeAppServiceBase UpdateAsync(Guid id, KittingEditInput input)
+ public override async Task UpdateAsync(Guid id, KittingEditInput input)
{
- //var detailquery = _repository.WithDetails();
- //var first = detailquery.FirstOrDefault(p => p.Id == id);
- //var ids=input.Details.Select(p => p.Id);
- //first.Details.Where(p =>ids.Contains(p.Id));
-
- return base.UpdateAsync(id, input);
-
- //var entity = ObjectMapper.Map(input);
- ////entity.SetId(id);
- ////entity.Code = first.Code;
- //await _repository.UpsertAsync(entity).ConfigureAwait(false);
- //var firstEntity = detailquery.FirstOrDefault(p => p.Id == id);
- //return ObjectMapper.Map(first);
-
-
+ return await base.UpdateAsync(id, input).ConfigureAwait(false);
}
[HttpPost("update")]
@@ -260,7 +246,7 @@ public class KittingAppService : SfsBaseDataWithCodeAppServiceBase x.Details)
.Ignore(x => x.TenantId)
.Ignore(x => x.ExtraProperties)
- .Ignore(x => x.Remark)
.Ignore(x => x.ConcurrencyStamp)
.Ignore(x => x.Id);
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 d4390441c..4365fbf6c 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
@@ -56,14 +56,14 @@ public class PositionCodeAppService
var existEntity = await GetByCodeAsync(input.Code).ConfigureAwait(false);
if (existEntity != null)
{
- throw new UserFriendlyException($"{input.Code} 已存在");
+ throw new UserFriendlyException($"位置码{input.Code} 已存在!");
}
- var itemEntity = await _repository.FirstOrDefaultAsync(p => p.PartCode == input.PartCode).ConfigureAwait(false);
- if(itemEntity != null)
- {
- throw new UserFriendlyException($"{input.PartCode} 物品已存在");
- }
+ //var itemEntity = await _repository.FirstOrDefaultAsync(p => p.LocationCode == input.LocationCode && p.PartCode == input.PartCode && p.Type == input.Type).ConfigureAwait(false);
+ //if (itemEntity != null)
+ //{
+ // throw new UserFriendlyException($"类型{input.Type.ToString()}物品{input.PartCode}目标库位{input.LocationCode}已存在!");
+ //}
var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false);
Check.NotNull(itemBasic, "ERP料号", $"物品 {input.PartCode} 不存在");
@@ -142,8 +142,24 @@ public class PositionCodeAppService
var itemBasic = await ItemBasicAppService.GetByCodeAsync(positionCode.PartCode).ConfigureAwait(false);
positionCode.PartName = itemBasic.Name;
positionCode.PartDesc = itemBasic.Desc1;
-
- positionCode.Code = positionCode.Type + positionCode.Code;
+ switch (positionCode.Type)
+ {
+ case EnumPositionCodeType.InjectionIssue:
+ positionCode.Code = "S"+ positionCode.Code;
+ break;
+ case EnumPositionCodeType.CoatingIssue:
+ positionCode.Code = "P" + positionCode.Code;
+ break;
+ case EnumPositionCodeType.AssembleIssue:
+ positionCode.Code = "Z" + positionCode.Code;
+ break;
+ case EnumPositionCodeType.KITTING:
+ positionCode.Code = "K" + positionCode.Code;
+ break;
+ default:
+ positionCode.Code = positionCode.Type + positionCode.Code;
+ break;
+ }
positionCode.CreatorId= CurrentUser.Id;
var location = await LocationAppService.GetByCodeAsync(positionCode.LocationCode).ConfigureAwait(false);
positionCode.LocationName = location.Name;
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 ff783d133..ea7be1738 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
@@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.Caching;
+using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
@@ -29,8 +30,9 @@ public class ProductionLineItemAppService :
{
private readonly IProductionLineAppService _productionLineAppService ;
private readonly ILocationAppService _locationAppService ;
+ private readonly IItemBasicAppService _itemBasicAppService;
public ProductionLineItemAppService(
- IProductionLineItemRepository repository, IDistributedCache cache, IProductionLineAppService productionLineAppService, ILocationAppService locationAppService
+ IProductionLineItemRepository repository, IDistributedCache cache, IProductionLineAppService productionLineAppService, ILocationAppService locationAppService, IItemBasicAppService itemBasicAppService
) : base(repository, cache)
{
base.CreatePolicyName = ProductionLineItemPermissions.Create;
@@ -38,6 +40,7 @@ public class ProductionLineItemAppService :
base.DeletePolicyName = ProductionLineItemPermissions.Delete;
_productionLineAppService = productionLineAppService;
_locationAppService = locationAppService;
+ _itemBasicAppService= itemBasicAppService;
}
[HttpPost("upsert")]
@@ -73,6 +76,10 @@ public class ProductionLineItemAppService :
var wiplocationcodelist = list.WipLocationCodeListJson.Split(",");
list.WipLocationCodeListJson = JsonSerializer.Serialize(wiplocationcodelist);
}
+ var baseItem= await _itemBasicAppService.GetByCodeAsync(list.ItemCode).ConfigureAwait(false);
+ list.ItemName = baseItem?.Name;
+ list.ItemDesc1 = baseItem?.Desc1;
+ list.ItemDesc2 = baseItem?.Desc2;
}
return dictionary;
}
@@ -82,11 +89,21 @@ public class ProductionLineItemAppService :
await base.ValidateImportModelAsync(importInput, validationRresult).ConfigureAwait(false);
await CheckItemBasicItemCodeAsync(importInput.ItemCode, validationRresult).ConfigureAwait(false);
await CheckProductionLineProdLineCodeAsync(importInput.ProdLineCode, validationRresult).ConfigureAwait(false);
+ await CheckSameItem(importInput.ProdLineCode, importInput.ItemCode, validationRresult).ConfigureAwait(false);
CheckProductionLineProdLineCodeJsonAsync(importInput.RawLocationCodeListJson, validationRresult);
CheckProductionLineProdLineCodeJsonAsync(importInput.ProductLocationCodeListJson, validationRresult);
CheckProductionLineProdLineCodeJsonAsync(importInput.WipLocationCodeListJson, validationRresult);
+
}
+ private async Task CheckSameItem(string ProdLineCode,string ItemCode, List validationRresult)
+ {
+ var item =await _repository.FirstOrDefaultAsync(r=>r.ProdLineCode== ProdLineCode&&r.ItemCode==ItemCode).ConfigureAwait(false);
+ if (item!=null)
+ {
+ validationRresult.Add(new ValidationResult($"生产线{ProdLineCode}物料号{ItemCode}已存在", new string[] { "生产线", "物料号" }));
+ }
+ }
private void CheckProductionLineProdLineCodeJsonAsync(string locationCodeList, List validationRresult)
{
if(!string.IsNullOrEmpty(locationCodeList))
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs
index dc89749ef..9cbdc0677 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs
@@ -10,7 +10,14 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SplitPackingRecAutoMapperProfile()
{
CreateMap();
+ //.MapPurchaseInfo()
+ //.MapProductionInfo()
+ //.MapQualityInfo();
+
CreateMap()
+ //.MapQualityInfoDto()
+ //.MapPurchaseInfoDto()
+ //.MapProductionInfoDto()
.Ignore(t => t.FromTopPackingCode)
.Ignore(t => t.ToTopPackingCode)
.Ignore(t => t.LastModificationTime)
@@ -19,5 +26,75 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
.Ignore(t => t.CreatorId)
.Ignore(t => t.ConcurrencyStamp)
.Ignore(t => t.Id);
+
}
}
+
+//public static class LabelCommonMapperExtensions
+//{
+// public static IMappingExpression MapPurchaseInfo(
+// this IMappingExpression m)
+// where TSource : IHasPurchaseInfo
+// where TDestination : IHasPurchaseInfoDto
+// {
+// return m
+// .ForMember(dest => dest.SupplierCode, opts => opts.MapFrom(src => src.PurchaseInfo.SupplierCode))
+// .ForMember(dest => dest.PoNumber, opts => opts.MapFrom(src => src.PurchaseInfo.PoNumber))
+// .ForMember(dest => dest.RpNumber, opts => opts.MapFrom(src => src.PurchaseInfo.RpNumber))
+// .ForMember(dest => dest.AsnNumber, opts => opts.MapFrom(src => src.PurchaseInfo.AsnNumber))
+// ;
+// }
+
+// public static IMappingExpression MapProductionInfo(
+// this IMappingExpression m)
+// where TSource : IHasProductionInfo
+// where TDestination : IHasProductionInfoDto
+// {
+// return m
+// .ForMember(dest => dest.ProdLine, opts => opts.MapFrom(src => src.ProductionInfo.ProdLine))
+// .ForMember(dest => dest.Team, opts => opts.MapFrom(src => src.ProductionInfo.Team))
+// .ForMember(dest => dest.Shift, opts => opts.MapFrom(src => src.ProductionInfo.Shift))
+// ;
+// }
+
+// public static IMappingExpression MapPurchaseInfoDto(
+// this IMappingExpression m)
+// where TSource : IHasPurchaseInfoDto
+// where TDestination : IHasPurchaseInfo
+// {
+// return m
+// .ForMember(dest => dest.PurchaseInfo, opts => opts.MapFrom(src => new PurchaseInfo(src.SupplierCode, src.PoNumber, src.RpNumber, src.AsnNumber)))
+// ;
+// }
+
+// public static IMappingExpression MapProductionInfoDto(
+// this IMappingExpression m)
+// where TSource : IHasProductionInfoDto
+// where TDestination : IHasProductionInfo
+// {
+// return m
+// .ForMember(dest => dest.ProductionInfo, opts => opts.MapFrom(src => new ProductionInfo(src.ProdLine, src.Team, src.Shift)))
+// ;
+// }
+
+// public static IMappingExpression MapQualityInfo(
+// this IMappingExpression m)
+// where TSource : IHasQualityInfo
+// where TDestination : IHasQualityInfoDto
+// {
+// return m
+// .ForMember(dest => dest.QLevel, opts => opts.MapFrom(src => src.QualityInfo.QLevel))
+// .ForMember(dest => dest.QualityFile, opts => opts.MapFrom(src => src.QualityInfo.QualityFile))
+// ;
+// }
+
+// public static IMappingExpression MapQualityInfoDto(
+// this IMappingExpression m)
+// where TSource : IHasQualityInfoDto
+// where TDestination : IHasQualityInfo
+// {
+// return m
+// .ForMember(dest => dest.QualityInfo, opts => opts.MapFrom(src => new QualityInfo(src.QLevel, src.QualityFile)))
+// ;
+// }
+//}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/IHasPurchaseInfo.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/IHasPurchaseInfo.cs
new file mode 100644
index 000000000..11123aeb6
--- /dev/null
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/IHasPurchaseInfo.cs
@@ -0,0 +1,272 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.Domain.Values;
+using Win_in.Sfs.Shared.Domain;
+
+namespace Win_in.Sfs.Basedata;
+#region 枚举及实体
+///
+/// 标签类别
+///
+public enum EnumLabelType
+{
+ ///
+ /// 空枚举
+ ///
+ [Display(Name = "未定义")]
+ None = 0,
+
+ ///
+ /// 采购标签
+ ///
+ [Display(Name = "采购标签")]
+ PurchaseLabel = 1,
+
+ ///
+ /// 生产标签
+ ///
+ [Display(Name = "生产标签")]
+ ProductionLabel = 2,
+
+ ///
+ /// 销售标签
+ ///
+ [Display(Name = "销售标签")]
+ SaleLabel = 3,
+
+ ///
+ /// 托盘标签
+ ///
+ [Display(Name = "托盘标签")]
+ PalletLabel = 4,
+
+ ///
+ /// 盘点标签
+ ///
+ [Display(Name = "盘点标签")]
+ CountLabel = 5,
+}
+
+public enum LabelStatus
+{
+ ///
+ /// 未定义
+ ///
+ [Display(Name = "未定义")]
+ None = 0,
+
+ ///
+ /// 有效
+ ///
+ [Display(Name = "有效")]
+ Enable = 1,
+
+ ///
+ /// 无效
+ ///
+ [Display(Name = "无效")]
+ Disable = 2
+}
+
+///
+/// 质量信息
+///
+public class QualityInfo : ValueObject
+{
+
+ ///
+ /// 质量等级
+ ///
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string QLevel { get; set; }
+
+ ///
+ /// 质检文件
+ ///
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string QualityFile { get; set; }
+
+ protected override IEnumerable
public decimal Qty { set; get; }
- ///
- /// 配置
- ///
- public string Conf { set; get; }
-
public Guid? TenantId { set; get; }
public string Remark { get; set; }
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs
index 7a3f427cd..7d6d6923e 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs
@@ -1,6 +1,9 @@
using System;
+using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.Domain.Values;
using Win_in.Sfs.Basedata.Domain.Shared;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@@ -12,6 +15,9 @@ namespace Win_in.Sfs.Basedata.Domain;
///
public class SplitPackingRec : SfsBaseDataAggregateRootBase
, IHasItem
+ //, IHasPurchaseInfo
+ //, IHasQualityInfo
+ //, IHasProductionInfo
{
///
/// 操作类型
@@ -141,46 +147,150 @@ public class SplitPackingRec : SfsBaseDataAggregateRootBase
public string PutOnShelfNumber { get; set; }
public EnumLabelType LabelType { get; set; }
-}
-///
-/// 标签类别
-///
-public enum EnumLabelType
-{
+
+
+ #region InventoryLabel兼容成员
+
+ ///
+ /// 完整条码文本
+ ///
+ public string FullBarcodeString { get; set; }
+
+ ///
+ /// 供应商批次
+ ///
+ public string SupplierBatch { get; set; }
+
+ ///
+ /// 到货时间
+ ///
+ public DateTime ArriveDate { get; set; }
+
+ ///
+ /// 生产时间
+ ///
+ public DateTime ProduceDate { get; set; }
+
+ ///
+ /// 过期时间
+ ///
+ public DateTime ExpireDate { get; set; }
+
+ ///
+ /// 标签状态
+ ///
+ public LabelStatus LabelStatus { get; set; }
+
+ ///
+ /// 建议库位
+ ///
+ public string RecommendLocationCode { get; set; }
+
+ ///
+ /// 目标ERP库位
+ ///
+ public string LocationErpCode { get; set; }
+
+ ///
+ /// 托标签号
+ ///
+ public string ContainerCode { get; set; }
+
+ ///
+ /// 质量信息
+ ///
+ //public QualityInfo QualityInfo { get; set; } = new();
+
+ ///
+ /// 质量等级
+ ///
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string QLevel { get; set; }
+
+ ///
+ /// 质检文件
+ ///
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string QualityFile { get; set; }
+
+
+ ///
+ /// 采购信息
+ ///
+ //public PurchaseInfo PurchaseInfo { get; set; } = new();
+
+ ///
+ /// 供应商代码
+ ///
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string SupplierCode { get; set; }
+
///
- /// 空枚举
+ /// 要货计划号
///
- [Display(Name = "未定义")]
- None = 0,
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string RpNumber { get; set; }
///
- /// 采购标签
+ /// 生产信息
///
- [Display(Name = "采购标签")]
- PurchaseLabel = 1,
+ //public ProductionInfo ProductionInfo { get; set; } = new();
///
- /// 生产标签
+ /// 生产线
///
- [Display(Name = "生产标签")]
- ProductionLabel = 2,
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string ProdLine { get; set; }
///
- /// 销售标签
+ /// 班组
///
- [Display(Name = "销售标签")]
- SaleLabel = 3,
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string Team { get; set; }
///
- /// 托盘标签
+ /// 班次
///
- [Display(Name = "托盘标签")]
- PalletLabel = 4,
+ [MaxLength(SfsEfCorePropertyConst.CodeLength)]
+ public string Shift { get; set; }
///
- /// 盘点标签
+ /// 规格
///
- [Display(Name = "盘点标签")]
- CountLabel = 5,
+ [Display(Name = "规格")]
+ public string Specifications { get; set; }
+
+ ///
+ /// 供应商名称
+ ///
+ [Display(Name = "供应商名称")]
+ public string SupplierName { get; set; }
+
+ ///
+ /// 供应商简称
+ ///
+ [Display(Name = "供应商简称")]
+ public string SupplierSimpleName { get; set; }
+
+ ///
+ /// 供应商ERP料号
+ ///
+ [Display(Name = "供应商ERP料号")]
+ public string SupplierItemCode { get; set; }
+
+ ///
+ /// 供应商物品名
+ ///
+ [Display(Name = "供应商物品名")]
+ public string SupplierItemName { get; set; }
+
+ ///
+ /// 要求到货时间
+ ///
+ [Display(Name = "要求到货时间")]
+ [Required(ErrorMessage = "{0}是必填项")]
+ public DateTime PlanArriveDate { get; set; }
+ #endregion
}
+
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs
index 04916ad6d..a4564026f 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs
@@ -42,22 +42,14 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
{
throw new UserFriendlyException("操作类型不是拆箱或合箱状态,源箱码和目标箱码必须相同!");
}
- if (item.FromTopPackingCode.IsNullOrEmpty())
- {
- item.FromTopPackingCode = item.FromPackingCode;
- }
- if (item.ToTopPackingCode.IsNullOrEmpty())
- {
- item.ToTopPackingCode = item.FromPackingCode;// ToPackingCode;
- }
}
#endregion
if (item.OprType == OprTypeEnum.SplitBox || item.OprType == OprTypeEnum.MergeBox)
{
//设置顶级箱码
- item.FromTopPackingCode = GetTopPackingCode(query, item.FromPackingCode);
- item.ToTopPackingCode = GetTopPackingCode(query, item.FromPackingCode); //ToPackingCode
+ item.FromTopPackingCode = CalcuTopPackingCode(query, item.FromPackingCode);
+ item.ToTopPackingCode = CalcuTopPackingCode(query, item.FromPackingCode); //ToPackingCode
if (item.FromTopPackingCode.IsNullOrEmpty())
{
item.FromTopPackingCode = item.FromPackingCode;
@@ -91,6 +83,14 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
}
else
{
+ if (item.FromTopPackingCode.IsNullOrEmpty())
+ {
+ item.FromTopPackingCode = item.FromPackingCode;
+ }
+ if (item.ToTopPackingCode.IsNullOrEmpty())
+ {
+ item.ToTopPackingCode = item.FromPackingCode;// ToPackingCode;
+ }
SplitPackingRec newEntity = CommonHelper.CloneObj(item);
newEntity.SetId(GuidGenerator.Create());
var ret = await _repository.InsertAsync(newEntity, true).ConfigureAwait(false);
@@ -202,24 +202,42 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
/// 取顶级箱码
///
/// 箱码历史
- /// 当前箱码
+ /// 箱码,from to时都传入from
///
- private static string GetTopPackingCode(IQueryable historyQuery, string packingCode)
+ private static string CalcuTopPackingCode(IQueryable historyQuery, string packingCode)
{
- var historyRec = historyQuery.Where(itm => itm.FromPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault();
- if (historyRec != null)
- {
- return historyRec.FromTopPackingCode;
- }
- else
+ var qry = historyQuery.Where(itm => itm.OprType == OprTypeEnum.SplitBox || itm.OprType == OprTypeEnum.MergeBox);
+ string ret = null;
+ SplitPackingRec? firstObj = null;
+ string toCode = packingCode;
+ while (1 == 1)
{
- historyRec = historyQuery.Where(itm => itm.ToPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault();
- if (historyRec != null)
+ firstObj = qry.FirstOrDefault(itm => itm.ToPackingCode == toCode);
+ if (firstObj == null)
+ {
+ ret = toCode;
+ break;
+ }
+ else
{
- return historyRec.ToTopPackingCode;
+ toCode = firstObj.FromPackingCode;
}
}
- return null;
+ return ret;
+ //var historyRec = historyQuery.Where(itm => itm.FromPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault();
+ //if (historyRec != null)
+ //{
+ // return historyRec.FromTopPackingCode;
+ //}
+ //else
+ //{
+ // historyRec = historyQuery.Where(itm => itm.ToPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault();
+ // if (historyRec != null)
+ // {
+ // return historyRec.ToTopPackingCode;
+ // }
+ //}
+ //return null;
}
private static void SetBillNumber(IQueryable historyQuery, SplitPackingRec obj)
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.Designer.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.Designer.cs
new file mode 100644
index 000000000..6d2384fca
--- /dev/null
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.Designer.cs
@@ -0,0 +1,4443 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Basedata.EntityFrameworkCore;
+
+#nullable disable
+
+namespace Win_in.Sfs.Basedata.Migrations
+{
+ [DbContext(typeof(BasedataDbContext))]
+ [Migration("20240624071015_BaseData")]
+ partial class BaseData
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "6.0.13")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
+
+ modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.AQL", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AbcClass")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CeilingQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("FloorQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("IsUsePercent")
+ .HasColumnType("bit");
+
+ b.Property("ItemCode")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("SamplePercent")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("SampleQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("SupplierCode")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SupplierCode", "ItemCode", "FloorQty")
+ .IsUnique();
+
+ b.ToTable("Basedata_AQL", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AreaType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("Description")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsFunctional")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("WarehouseCode")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code")
+ .IsUnique();
+
+ b.ToTable("Basedata_Area", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BeginTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Component")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ComponentQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("ComponentUom")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DistributionType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ERPOp")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("EndTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Layer")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(64)
+ .HasColumnType("int")
+ .HasDefaultValue(1);
+
+ b.Property("MFGOp")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PlannedSplitRule")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Product")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TruncType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Product", "Component")
+ .IsUnique();
+
+ b.ToTable("Basedata_Bom", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BeginTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EndTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Module")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Module")
+ .IsUnique()
+ .HasFilter("[Module] IS NOT NULL");
+
+ b.ToTable("Basedata_Calendar", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("Description")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code")
+ .IsUnique();
+
+ b.ToTable("Basedata_Category", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("Description")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsBasicCurrency")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code")
+ .IsUnique();
+
+ b.ToTable("Basedata_Currency", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BasicCurrencyId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("CurrencyId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EfficetiveTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExpireTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Rate")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CurrencyId", "BasicCurrencyId")
+ .IsUnique();
+
+ b.ToTable("Basedata_CurrencyExchange", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Address")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("City")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("Contacts")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Country")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property