Browse Source

bug修改

dev_DY_CC
lvzb 10 months ago
parent
commit
e6508b119b
  1. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs
  2. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs
  3. 6
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs
  4. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json
  5. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs
  6. 14
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json
  7. 10
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs
  8. 40
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
  9. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/EosAgentModule.cs

@ -166,7 +166,7 @@ public class EosAgentModule : AbpModule
{ {
context.AddBackgroundWorkerAsync<EosIncomingBackgroundWorker>(); context.AddBackgroundWorkerAsync<EosIncomingBackgroundWorker>();
context.AddBackgroundWorkerAsync<EosOutgoingBackgroundWorker>(); //context.AddBackgroundWorkerAsync<EosOutgoingBackgroundWorker>();
} }
} }

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/EosIncomingBackgroundWorker.cs

@ -62,7 +62,7 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
var shipHandleService = workerContext.ServiceProvider.GetRequiredService<ShipReader>(); var shipHandleService = workerContext.ServiceProvider.GetRequiredService<ShipReader>();
var shipConverter = workerContext.ServiceProvider.GetRequiredService<ShipConverter>(); var shipConverter = workerContext.ServiceProvider.GetRequiredService<ShipConverter>();
//读取并保持Ship //读取并保持Ship
var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false); var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false);
//转换Ship //转换Ship
await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false); await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"处理发货单【{shipsFromExternalList.Count}】条数据"); Logger.LogInformation($"处理发货单【{shipsFromExternalList.Count}】条数据");

6
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs

@ -82,17 +82,19 @@ public class PlanConverter : IIncomingConverter
{ {
var wmsPo = _objectMapper.Map<PurchaseOrderExchangeDto, PurchaseOrderEditInput>(exchangePo); var wmsPo = _objectMapper.Map<PurchaseOrderExchangeDto, PurchaseOrderEditInput>(exchangePo);
wmsPo.PoType = "2"; wmsPo.PoType = "采购订单";
wmsPo.IsConsignment = false; wmsPo.IsConsignment = false;
wmsPo.Version = ""; wmsPo.Version = "";
wmsPo.TaxRate = 0; wmsPo.TaxRate = 0;
wmsPo.Details = new List<PurchaseOrderDetailInput>(); wmsPo.Details = new List<PurchaseOrderDetailInput>();
int poline = 1;
foreach (var incomingFromExternal in group.ToList()) foreach (var incomingFromExternal in group.ToList())
{ {
var po = JsonSerializer.Deserialize<PurchaseOrderExchangeDto>(incomingFromExternal.DestinationDataContent); var po = JsonSerializer.Deserialize<PurchaseOrderExchangeDto>(incomingFromExternal.DestinationDataContent);
var wmsPoDetail = await BuildPurchaseOrderDetailInput(po).ConfigureAwait(false); var wmsPoDetail = await BuildPurchaseOrderDetailInput(po).ConfigureAwait(false);
wmsPoDetail.PoLine = poline.ToString();
wmsPo.Details.Add(wmsPoDetail); wmsPo.Details.Add(wmsPoDetail);
poline++;
} }
return wmsPo; return wmsPo;

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/appsettings.json

@ -28,7 +28,7 @@
"BaseUrl": "http://10.164.233.5:60084/" "BaseUrl": "http://10.164.233.5:60084/"
}, },
"Store": { "Store": {
"BaseUrl": "http://localhost:59095/" "BaseUrl": "http://10.164.233.5:60085/"
}, },
"Label": { "Label": {
"BaseUrl": "http://10.164.233.5:60082/" "BaseUrl": "http://10.164.233.5:60082/"

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs

@ -161,7 +161,7 @@ public class MesAgentModule : AbpModule
{ {
context.AddBackgroundWorkerAsync<MesIncomingBackgroundWorker>(); context.AddBackgroundWorkerAsync<MesIncomingBackgroundWorker>();
//context.AddBackgroundWorkerAsync<MesOutgoingBackgroundWorker>(); context.AddBackgroundWorkerAsync<MesOutgoingBackgroundWorker>();
} }
} }

14
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json

@ -1,12 +1,12 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false", "Default": "Server=10.164.233.6;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", "DataExchange": "Server=10.164.233.6;Database=WMS_DongYang_DataExchange_CC;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" "MES": "Server=10.164.233.7;Database=MES_JY;uid=sa;pwd=Asdf1234$;TrustServerCertificate=True;Encrypt=false"
}, },
"AuthServer": { "AuthServer": {
"Authority": "http://dev.ccwin-in.com:60083/", "Authority": "http://10.164.233.5:60083/",
"RequireHttpsMetadata": "false", "RequireHttpsMetadata": "false",
"SwaggerClientId": "admin", "SwaggerClientId": "admin",
"SwaggerClientSecret": "1q2w3E*", "SwaggerClientSecret": "1q2w3E*",
@ -24,13 +24,13 @@
"RemoteServices": { "RemoteServices": {
"BaseData": { "BaseData": {
"BaseUrl": "http://dev.ccwin-in.com:60084/" "BaseUrl": "http://10.164.233.5:60084/"
}, },
"Store": { "Store": {
"BaseUrl": "http://dev.ccwin-in.com:60085/" "BaseUrl": "http://10.164.233.5:60085/"
}, },
"Label": { "Label": {
"BaseUrl": "http://dev.ccwin-in.com:60082/" "BaseUrl": "http://10.164.233.5:60082/"
} }
}, },
@ -43,7 +43,7 @@
"RetryTimes": 3 "RetryTimes": 3
}, },
"OutgoingOptions": { "OutgoingOptions": {
"Active": true, "Active": false,
"PeriodSeconds": 10, "PeriodSeconds": 10,
"BatchSize": 10, "BatchSize": 10,
"MaxCount": 100, "MaxCount": 100,

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

@ -8,9 +8,9 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class DeliverRequestImportInput : SfsStoreImportInputBase public class DeliverRequestImportInput : SfsStoreImportInputBase
{ {
/// <summary> /// <summary>
/// 单据号 /// 单据号调拨单号
/// </summary> /// </summary>
[Display(Name = "单据号")] [Display(Name = "单据号调拨单号")]
[Required] [Required]
[Key] [Key]
public string Number { get; set; } public string Number { get; set; }
@ -30,9 +30,9 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase
public DateTime DeliverTime { get; set; } public DateTime DeliverTime { get; set; }
/// <summary> /// <summary>
/// 客户 /// 客户代码
/// </summary> /// </summary>
[Display(Name = "客户")] [Display(Name = "客户代码")]
[Required] [Required]
[Key] [Key]
public string CustomerCode { get; set; } public string CustomerCode { get; set; }
@ -67,14 +67,12 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase
/// Mes发货计划号 /// Mes发货计划号
/// </summary> /// </summary>
[Display(Name = "Mes发货计划号")] [Display(Name = "Mes发货计划号")]
[Required]
public string MesDeliveryPlan { get; set; } public string MesDeliveryPlan { get; set; }
/// <summary> /// <summary>
/// Mes器具号 /// Mes器具号
/// </summary> /// </summary>
[Display(Name = "Mes器具号")] [Display(Name = "Mes器具号")]
[Required]
public string MesDeliveryContainer { get; set; } public string MesDeliveryContainer { get; set; }
/// <summary> /// <summary>
/// Mes车牌号 /// Mes车牌号

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

@ -118,29 +118,29 @@ IItemBasicAppService itemBasicAppService)
if (model.DeliverRequestType == EnumDeliverRequestType.FIS) if (model.DeliverRequestType == EnumDeliverRequestType.FIS)
{ {
if (string.IsNullOrEmpty(model.IdentityNo)) //if (string.IsNullOrEmpty(model.IdentityNo))
{ //{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写底盘号", new string[] { "底盘号" })); // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写底盘号", new string[] { "底盘号" }));
} //}
if (string.IsNullOrEmpty(model.MesDeliveryContainer)) //if (string.IsNullOrEmpty(model.MesDeliveryContainer))
{ //{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写Mes器具号", new string[] { "Mes器具号" })); // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写Mes器具号", new string[] { "Mes器具号" }));
} //}
if (string.IsNullOrEmpty(model.MesDeliveryPlan)) //if (string.IsNullOrEmpty(model.MesDeliveryPlan))
{ //{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" })); // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" }));
} //}
} }
if (model.DeliverRequestType == EnumDeliverRequestType.Normal ) if (model.DeliverRequestType == EnumDeliverRequestType.Normal )
{ {
if (string.IsNullOrEmpty(model.MesDeliveryPlan)) //if (string.IsNullOrEmpty(model.MesDeliveryPlan))
{ //{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" })); // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" }));
} //}
if(!string.IsNullOrEmpty(model.IdentityNo)) //if(!string.IsNullOrEmpty(model.IdentityNo))
{ //{
validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货底盘号应该为空", new string[] { "底盘号"})); // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货底盘号应该为空", new string[] { "底盘号"}));
} //}
} }
var area = await _areaApp.GetByCodeAsync(model.AreaCode).ConfigureAwait(false); var area = await _areaApp.GetByCodeAsync(model.AreaCode).ConfigureAwait(false);

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs

@ -61,6 +61,12 @@ public class PurchaseOrderManager : SfsStoreManagerBase<PurchaseOrder, PurchaseO
public override async Task<PurchaseOrder> CreateAsync(PurchaseOrder purchaseOrder) public override async Task<PurchaseOrder> CreateAsync(PurchaseOrder purchaseOrder)
{ {
var supplier = await _supplierApp.GetByCodeAsync(purchaseOrder.SupplierCode).ConfigureAwait(false);
if (supplier != null)
{
purchaseOrder.SupplierAddress = supplier.Address;
purchaseOrder.SupplierName = supplier.Name;
}
//接收到新的采购订单时,更新无PO收货单的PoNumber //接收到新的采购订单时,更新无PO收货单的PoNumber
//await _purchaseReceiptNoteManager.AppendPoNumberAsync(purchaseOrder).ConfigureAwait(false); //await _purchaseReceiptNoteManager.AppendPoNumberAsync(purchaseOrder).ConfigureAwait(false);
purchaseOrder.SetIdAndNumberWithDetails(GuidGenerator, purchaseOrder.Number); purchaseOrder.SetIdAndNumberWithDetails(GuidGenerator, purchaseOrder.Number);

Loading…
Cancel
Save