diff --git a/.gitignore b/.gitignore
index 934d3d589..75ffe36fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
**/node_modules/
/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile3.pubxml
+/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/.config
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs
index b2110b82f..6447cbe01 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/Qtyrfe.cs
@@ -8,7 +8,7 @@ public class Qtyrfe : Entity
/// 序号
///
[Key]
- public string mesout_qtyrfe_id { get; set; }
+ public int ID { get; set; }
///
/// 物料
///
@@ -40,7 +40,7 @@ public class Qtyrfe : Entity
public override object[] GetKeys()
{
- return new object[] { mesout_qtyrfe_id };
+ return new object[] { ID };
}
///
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs
index 9b1147dcb..bfc5a7384 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.Mes/Qtyrfe/QtyrfeManager.cs
@@ -21,8 +21,8 @@ public class QtyrfeManager : DomainService, IQtyrfeManager
}
public virtual async Task UpdateProcesseErrordListAsync(List entities)
{
- var ids = entities.Select(p => p.mesout_qtyrfe_id);
- var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_qtyrfe_id)).ConfigureAwait(false);
+ var ids = entities.Select(p => p.ID);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.ID)).ConfigureAwait(false);
plans.ForEach(p =>
{
p.Yl1 = 2;
@@ -32,8 +32,8 @@ public class QtyrfeManager : DomainService, IQtyrfeManager
}
public virtual async Task UpdateProcessedListAsync(List entities)
{
- var ids = entities.Select(p => p.mesout_qtyrfe_id);
- var plans = await _repository.GetListAsync(p => ids.Contains(p.mesout_qtyrfe_id)).ConfigureAwait(false);
+ var ids = entities.Select(p => p.ID);
+ var plans = await _repository.GetListAsync(p => ids.Contains(p.ID)).ConfigureAwait(false);
plans.ForEach(p =>
{
p.Yl1 = 1;
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs
index 1950bfa30..73aad5256 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore.Fawtyg.Mes/Qtyrfe/QtyrfeDbContextModelCreatingExtensions.cs
@@ -15,7 +15,7 @@ public static class QtyrfeDbContextModelCreatingExtensions
b.ConfigureByConvention();
//Properties
- b.Property(q => q.mesout_qtyrfe_id).HasMaxLength(20);
+ b.Property(q => q.ID);
b.Property(q => q.mesout_qtyrfe_part).HasMaxLength(20);
b.Property(q => q.mesout_qtyrfe_loc_from).HasMaxLength(10);
b.Property(q => q.mesout_qtyrfe_loc_to).HasMaxLength(10);
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..d1ed0e792 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
@@ -166,7 +166,7 @@ public class EosAgentModule : AbpModule
{
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 7b109e3fc..cfcb955d4 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
@@ -62,7 +62,7 @@ public class EosIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
var shipHandleService = workerContext.ServiceProvider.GetRequiredService();
var shipConverter = workerContext.ServiceProvider.GetRequiredService();
//读取并保持Ship
- var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false);
+ var shipsFromExternalList = await shipHandleService.ReadAsync().ConfigureAwait(false);
//转换Ship
await shipConverter.ConvertAsync(shipsFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"处理发货单【{shipsFromExternalList.Count}】条数据");
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs
index 689fe389b..00113ed79 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanConverter.cs
+++ b/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(exchangePo);
- wmsPo.PoType = "2";
+ wmsPo.PoType = "采购订单";
wmsPo.IsConsignment = false;
wmsPo.Version = "";
wmsPo.TaxRate = 0;
wmsPo.Details = new List();
+ int poline = 1;
foreach (var incomingFromExternal in group.ToList())
{
var po = JsonSerializer.Deserialize(incomingFromExternal.DestinationDataContent);
var wmsPoDetail = await BuildPurchaseOrderDetailInput(po).ConfigureAwait(false);
-
+ wmsPoDetail.PoLine = poline.ToString();
wmsPo.Details.Add(wmsPoDetail);
+ poline++;
}
return wmsPo;
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 889b25a6a..40a8fdd21 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
@@ -28,7 +28,7 @@
"BaseUrl": "http://10.164.233.5:60084/"
},
"Store": {
- "BaseUrl": "http://localhost:59095/"
+ "BaseUrl": "http://10.164.233.5:60085/"
},
"Label": {
"BaseUrl": "http://10.164.233.5:60082/"
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs
index a2e2e22d9..d6e265998 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/QtyrfeReader.cs
@@ -80,8 +80,8 @@ public class QtyrfeReader : IReader
DataType = EnumIncomingDataType.TransferNote.ToString(),
DataAction = EnumExchangeDataAction.Add,
SourceSystem = EnumSystemType.MES.ToString(),
- SourceDataId = Qtyrfe.mesout_qtyrfe_id.ToString(),
- SourceDataGroupCode = Qtyrfe.mesout_qtyrfe_id,
+ SourceDataId = Qtyrfe.ID.ToString(),
+ SourceDataGroupCode = Qtyrfe.ID.ToString(),
SourceDataDetailCode = Qtyrfe.mesout_qtyrfe_part,
SourceDataContent = JsonSerializer.Serialize(Qtyrfe),
WriteTime = DateTime.Now,
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs
index 62c920660..a503aee64 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/MesAgentModule.cs
@@ -161,7 +161,7 @@ public class MesAgentModule : AbpModule
{
context.AddBackgroundWorkerAsync();
- //context.AddBackgroundWorkerAsync();
+ context.AddBackgroundWorkerAsync();
}
}
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 b21a53442..299dee9ea 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/appsettings.json
@@ -1,12 +1,12 @@
{
"ConnectionStrings": {
- "Default": "Server=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",
+ "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",
"MES": "Server=10.164.233.7;Database=MES_JY;uid=sa;pwd=Asdf1234$;TrustServerCertificate=True;Encrypt=false"
},
"AuthServer": {
- "Authority": "http://dev.ccwin-in.com:60083/",
+ "Authority": "http://10.164.233.5:60083/",
"RequireHttpsMetadata": "false",
"SwaggerClientId": "admin",
"SwaggerClientSecret": "1q2w3E*",
@@ -24,13 +24,13 @@
"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/"
}
},
@@ -43,7 +43,7 @@
"RetryTimes": 3
},
"OutgoingOptions": {
- "Active": true,
+ "Active": false,
"PeriodSeconds": 10,
"BatchSize": 10,
"MaxCount": 100,
diff --git a/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Properties/PublishProfiles/FolderProfile.pubxml b/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Properties/PublishProfiles/FolderProfile.pubxml
index 9923964ab..dc7d24117 100644
--- a/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Properties/PublishProfiles/FolderProfile.pubxml
@@ -10,11 +10,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
Release
Any CPU
FileSystem
- .\..\..\..\..\OutPut\Auth\
+ D:\发布\WMS\auth
FileSystem
net6.0
fac54f6e-6418-429e-aceb-4eceaa9f649e
false
-
+
\ No newline at end of file
diff --git a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs
index 17c5abca4..261e5b3b4 100644
--- a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs
+++ b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs
@@ -1,4 +1,6 @@
+using System;
using System.IO;
+using System.Net.Http;
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Server.Kestrel.Core;
@@ -98,6 +100,11 @@ public class StoreHttpApiHostModule : ModuleBase
protected override void ConfigureHttpClientProxies()
{
+ ServiceConfigurationContext.Services.AddHttpClient("Label", (HttpClient client) =>
+ {
+ client.Timeout = TimeSpan.FromSeconds(300);
+ });
+
ServiceConfigurationContext.Services.AddHttpClientProxies(
typeof(BasedataApplicationContractsModule).Assembly,
"BaseData"
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemController.cs
index 96798ce4c..d8131accc 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/ItemController.cs
@@ -1,8 +1,10 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
+using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas;
@@ -55,4 +57,30 @@ public class ItemController : AbpController
return dtos;
}
+ ///
+ /// 按零件号模糊查询
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("get-fuzzy")]
+ public virtual async Task> GetListAsync( string itemCode, int pageSize,int pageIndex,string sortBy)
+ {
+ var input = new SfsBaseDataRequestInputBase
+ {
+ MaxResultCount = pageSize,
+ SkipCount = (pageIndex - 1) * pageSize,
+ Sorting = sortBy,
+ Condition = new Condition { Filters = new List() }
+ };
+ if (!string.IsNullOrWhiteSpace(itemCode))
+ {
+ input.Condition.Filters.Add(new Filter("Code", itemCode, EnumFilterAction.Like.ToString()));
+ }
+ var itemDTOs = await _itemBasicAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false);
+
+ return itemDTOs;
+ }
}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SplitPackingRecController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SplitPackingRecController.cs
index ac4e65b16..b2d9850d6 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SplitPackingRecController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/BaseDatas/SplitPackingRecController.cs
@@ -1,11 +1,13 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Json;
using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Basedata.Commons;
using Win_in.Sfs.Basedata.Domain;
namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas;
@@ -63,4 +65,89 @@ public class SplitPackingRecController : AbpController
return await _splitPackingRecApp.GetSamePoNumberListByToPackingCode(toPackingCode).ConfigureAwait(false);
}
+ [HttpPost("batch-insert-test")]
+ public async Task BatchInsertTestAsync(List inputs, int recordCount, int pageSize = 50)
+ {
+ Stopwatch sw = new Stopwatch();
+ sw.Start();
+ List operLst = new List();
+ var firstObj = inputs[0];
+ for (int i = 1; i <= recordCount; i++)
+ {
+ var newObj = CloneSplitPackingRec(firstObj);
+ operLst.Add(newObj);
+ }
+
+ //分页
+ int pageTotal = PageHelper.GetTotalPages(operLst.Count, pageSize);
+ for (int i = 1; i <= pageTotal; i++)
+ {
+ var curPage = PageHelper.GetPage(operLst, i, pageSize);
+ bool ret = await _splitPackingRecApp.BatchInsertTestAsync(curPage).ConfigureAwait(false);
+ }
+ sw.Stop();
+ Console.WriteLine($"执行时间 = {sw.ElapsedMilliseconds} ms");
+ return true;
+ }
+
+ private static SplitPackingRecEditInput CloneSplitPackingRec(SplitPackingRecEditInput input)
+ {
+ SplitPackingRecEditInput entity = new SplitPackingRecEditInput();
+ entity.OprType = input.OprType;
+ entity.FromPackingCode = input.FromPackingCode;
+ //entity.FromTopPackingCode = input.FromTopPackingCode;
+ entity.FromStdPackQty = input.FromStdPackQty;
+ entity.FromUom = input.FromUom;
+ entity.FromQty = input.FromQty;
+ entity.ToPackingCode = input.ToPackingCode;
+ //entity.ToTopPackingCode = input.ToTopPackingCode;
+ entity.ToStdPackQty = input.ToStdPackQty;
+ entity.ToUom = input.ToUom;
+ entity.ToQty = input.ToQty;
+ entity.ItemCode = input.ItemCode;
+ entity.ItemName = input.ItemName;
+ entity.ItemDesc1 = input.ItemDesc1;
+ entity.ItemDesc2 = input.ItemDesc2;
+ entity.FromLot = input.FromLot;
+ entity.ToLot = input.ToLot;
+ entity.PurchaseInfo_PoNumber = input.PurchaseInfo_PoNumber;
+ entity.PurchaseInfo_AsnNumber = input.PurchaseInfo_AsnNumber;
+ entity.ArrivalNoticNumber = input.ArrivalNoticNumber;
+ entity.TaskOrderNumber = input.TaskOrderNumber;
+ entity.ReceiptRecNumber = input.ReceiptRecNumber;
+ entity.PutOnShelfNumber = input.PutOnShelfNumber;
+ entity.LabelType = input.LabelType;
+ //entity.CreationTime = input.CreationTime;
+ //entity.CreatorId = input.CreatorId;
+ //entity.LastModificationTime = input.LastModificationTime;
+ //entity.LastModifierId = input.LastModifierId;
+ entity.Remark = input.Remark;
+
+ entity.ArriveDate = input.ArriveDate;
+ //entity.ContainerCode = input.ContainerCode;
+ entity.ExpireDate = input.ExpireDate;
+ entity.FullBarcodeString = input.FullBarcodeString;
+ entity.LabelStatus = input.LabelStatus;
+ entity.LocationErpCode = input.LocationErpCode;
+ entity.PlanArriveDate = input.PlanArriveDate;
+ entity.ProduceDate = input.ProduceDate;
+ //entity.ProdLine = input.ProdLine;
+ //entity.Shift = input.Shift;
+ //entity.Team = input.Team;
+ entity.RpNumber = input.RpNumber;
+ entity.SupplierCode = input.SupplierCode;
+ //entity.QLevel = input.QLevel;
+ //entity.QualityFile = input.QualityFile;
+ entity.RecommendLocationCode = input.RecommendLocationCode;
+ //entity.Specifications = input.Specifications;
+ entity.SupplierBatch = input.SupplierBatch;
+ entity.SupplierItemCode = input.SupplierItemCode;
+ entity.SupplierItemName = input.SupplierItemName;
+ entity.SupplierName = input.SupplierName;
+ entity.SupplierSimpleName = input.SupplierSimpleName;
+ return entity;
+ }
+
+
+
}
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 2b2b079ee..8c6d4242d 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
@@ -137,8 +137,8 @@ public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase
///
/// 供应商代码
///
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string PurchaseInfo_SupplierCode { get; set; }
+ //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
+ //public string PurchaseInfo_SupplierCode { get; set; }
///
/// 到货通知
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 95d6ed088..f6b6676e6 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
@@ -69,7 +69,7 @@ public class PositionCodeAppService
Check.NotNull(itemBasic, "ERP料号", $"物品 {input.PartCode} 不存在");
input.PartName = itemBasic.Name;
input.PartDesc = itemBasic.Desc1;
-
+ input.BasicUom = itemBasic.BasicUom;
var location = await LocationAppService.GetByCodeAsync(input.LocationCode).ConfigureAwait(false);
Check.NotNull(location, "库位代码", $"库位 {input.LocationCode} 不存在");
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAppService.cs
index 9202fe372..a280684f7 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAppService.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAppService.cs
@@ -151,7 +151,6 @@ public class SplitPackingRecAppService :
}
[HttpPost("batch-insert-test")]
- [UnitOfWork(IsDisabled =true)]
public async Task BatchInsertTestAsync(List inputs)
{
List lst = ObjectMapper.Map, List>(inputs);
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 b86ca0360..c636e43a2 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
@@ -46,12 +46,18 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
}
#endregion
//缓存数据
- var query = await _repository.GetQueryableAsync().ConfigureAwait(false);
- var fromPackCodeLst = input.Select(itm => itm.FromPackingCode).ToList();
- var toPackCodeLst = input.Select(itm => itm.ToPackingCode).ToList();
- var historyLst = await query.Where(itm => fromPackCodeLst.Contains(itm.ToPackingCode) && (itm.OprType == OprTypeEnum.SplitBox || itm.OprType == OprTypeEnum.MergeBox)).ToListAsync().ConfigureAwait(false); //取顶级箱码时用到
- var hisLst2 = await query.Where(itm => fromPackCodeLst.Contains(itm.FromPackingCode)).ToListAsync().ConfigureAwait(false);
- Dictionary hisLst3 = await query.Where(itm => toPackCodeLst.Contains(itm.FromPackingCode) && itm.OprType == OprTypeEnum.Other).ToDictionaryAsync(itm => itm.FromPackingCode, it2 => it2).ConfigureAwait(false);
+ List historyLst = new List();
+ List hisLst2 = new List();
+ Dictionary hisLst3 = new Dictionary();
+ if (input.Any(itm => itm.OprType == OprTypeEnum.SplitBox || itm.OprType == OprTypeEnum.MergeBox))
+ {
+ var query = await _repository.GetQueryableAsync().ConfigureAwait(false);
+ var fromPackCodeLst = input.Select(itm => itm.FromPackingCode).ToList();
+ var toPackCodeLst = input.Select(itm => itm.ToPackingCode).ToList();
+ historyLst = await query.Where(itm => fromPackCodeLst.Contains(itm.ToPackingCode) && (itm.OprType == OprTypeEnum.SplitBox || itm.OprType == OprTypeEnum.MergeBox)).ToListAsync().ConfigureAwait(false); //取顶级箱码时用到
+ hisLst2 = await query.Where(itm => fromPackCodeLst.Contains(itm.FromPackingCode)).ToListAsync().ConfigureAwait(false);
+ hisLst3 = await query.Where(itm => toPackCodeLst.Contains(itm.FromPackingCode) && itm.OprType == OprTypeEnum.Other).ToDictionaryAsync(itm => itm.FromPackingCode, it2 => it2).ConfigureAwait(false);
+ }
//遍历、批量插入
List operLst = new List();
@@ -76,8 +82,6 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
//拆箱时,如果目标箱不存在,插入目标箱(两个箱码相同)
if (hisLst3.ContainsKey(item.ToPackingCode) == false)
{
- //SplitPackingRec newObj = CommonHelper.CloneObj(item);
- //SplitPackingRec newObj = ExpressionGenericMapper.Trans(item);
SplitPackingRec newObj = CloneSplitPackingRec(item);
newObj.SetId(GuidGenerator.Create());
newObj.OprType = OprTypeEnum.Other;
@@ -94,8 +98,6 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
//if (toHis == null)
//{
//}
- //SplitPackingRec newEntity = CommonHelper.CloneObj(item);
- //SplitPackingRec newEntity = ExpressionGenericMapper.Trans(item);
SplitPackingRec newEntity = CloneSplitPackingRec(item);
newEntity.SetId(GuidGenerator.Create());
@@ -113,8 +115,6 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
{
item.ToTopPackingCode = item.FromPackingCode;
}
- //SplitPackingRec newEntity = CommonHelper.CloneObj(item);
- //SplitPackingRec newEntity = ExpressionGenericMapper.Trans(item);
SplitPackingRec newEntity = CloneSplitPackingRec(item);
newEntity.SetId(GuidGenerator.Create());
//var ret = await _repository.InsertAsync(newEntity, false).ConfigureAwait(false);
@@ -408,28 +408,38 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
public async Task BatchInsertTestAsync(List input)
{
- List operLst = new List();
- var firstObj = input[0];
- int cnt = (int)(firstObj.FromStdPackQty);
- for (int i = 1; i <= cnt; i++)
- {
- var newObj = CloneSplitPackingRec(firstObj);
- newObj.SetId(this.GuidGenerator.Create());
- newObj.FromTopPackingCode = newObj.FromPackingCode;
- newObj.ToTopPackingCode = newObj.ToPackingCode;
- operLst.Add(newObj);
- }
+ //List operLst = new List();
+ //var firstObj = input[0];
+ //int cnt = (int)(firstObj.FromStdPackQty);
+ //for (int i = 1; i <= cnt; i++)
+ //{
+ // var newObj = CloneSplitPackingRec(firstObj);
+ // newObj.SetId(this.GuidGenerator.Create());
+ // newObj.FromTopPackingCode = newObj.FromPackingCode;
+ // newObj.ToTopPackingCode = newObj.ToPackingCode;
+ // operLst.Add(newObj);
+ //}
- //分页
- int pageSize = 50;
- int pageTotal = PageHelper.GetTotalPages(operLst.Count, pageSize);
- for (int i = 1; i <= pageTotal; i++)
+ ////分页
+ //int pageSize = 50;
+ //int pageTotal = PageHelper.GetTotalPages(operLst.Count, pageSize);
+ //for (int i = 1; i <= pageTotal; i++)
+ //{
+ // var curPage = PageHelper.GetPage(operLst, i, pageSize);
+ // bool autoSave = false;
+ // await _repository.InsertManyAsync(curPage, autoSave).ConfigureAwait(false);
+ //}
+
+ foreach(var item in input)
{
- var curPage = PageHelper.GetPage(operLst, i, pageSize);
- bool autoSave = false;
- await _repository.InsertManyAsync(curPage, autoSave).ConfigureAwait(false);
-
+ item.SetId(this.GuidGenerator.Create());
+ item.FromTopPackingCode = item.FromPackingCode;
+ item.ToTopPackingCode = item.ToPackingCode;
}
+
+ bool autoSave = false;
+ await _repository.InsertManyAsync(input, autoSave).ConfigureAwait(false);
+
return true;
}
diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs
index db2f45689..d2098cd56 100644
--- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs
+++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs
@@ -190,7 +190,7 @@ public class InventoryLabelAppService
packRec.ToLot = inputObj.Lot;
packRec.PurchaseInfo_PoNumber = inputObj.PoNumber; // 采购订单
packRec.PurchaseInfo_AsnNumber = inputObj.AsnNumber; //供应商发货单
- packRec.PurchaseInfo_SupplierCode = inputObj.SupplierCode; //供应商发货单
+ //packRec.PurchaseInfo_SupplierCode = inputObj.SupplierCode; //供应商发货单
packRec.ArrivalNoticNumber = null; //到货通知
packRec.TaskOrderNumber = null; //任务单
packRec.ReceiptRecNumber = null; //收货记录单
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs
index 84afa8dc4..453c323d6 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs
@@ -8,9 +8,9 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class DeliverRequestImportInput : SfsStoreImportInputBase
{
///
- /// 单据号
+ /// 单据号调拨单号
///
- [Display(Name = "单据号")]
+ [Display(Name = "单据号调拨单号")]
[Required]
[Key]
public string Number { get; set; }
@@ -30,9 +30,9 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase
public DateTime DeliverTime { get; set; }
///
- /// 客户
+ /// 客户代码
///
- [Display(Name = "客户")]
+ [Display(Name = "客户代码")]
[Required]
[Key]
public string CustomerCode { get; set; }
@@ -67,14 +67,12 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase
/// Mes发货计划号
///
[Display(Name = "Mes发货计划号")]
- [Required]
public string MesDeliveryPlan { get; set; }
///
/// Mes器具号
///
[Display(Name = "Mes器具号")]
- [Required]
public string MesDeliveryContainer { get; set; }
///
/// Mes车牌号
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs
index 5df4a8596..d98040ce0 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs
@@ -43,16 +43,16 @@ public class InspectJobAppService
{
var entity = ObjectMapper.Map(input);
- if (_currentUser != null)
- {
- foreach (var item in entity.SummaryDetails)
- {
- if (item.InspectUser.IsNullOrEmpty())
- {
- item.InspectUser = _currentUser.UserName;
- }
- }
- }
+ //if (_currentUser != null)
+ //{
+ // foreach (var item in entity.SummaryDetails)
+ // {
+ // if (item.InspectUser.IsNullOrEmpty())
+ // {
+ // item.InspectUser = _currentUser.UserName;
+ // }
+ // }
+ //}
var result = await _inspectJobManager.AddAsync(entity).ConfigureAwait(false);
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs
index 154c3813b..9788188ed 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs
@@ -474,7 +474,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
{
packRec.PurchaseInfo_PoNumber = inventoryLabelDto.PoNumber;
packRec.PurchaseInfo_AsnNumber = inventoryLabelDto.AsnNumber;
- packRec.PurchaseInfo_SupplierCode = inventoryLabelDto.SupplierCode;
+ //packRec.PurchaseInfo_SupplierCode = inventoryLabelDto.SupplierCode;
#region InventoryLabel兼容成员
var inputObj = inventoryLabelDto;
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
index 95a7034ba..79afa8653 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
@@ -118,29 +118,29 @@ IItemBasicAppService itemBasicAppService)
if (model.DeliverRequestType == EnumDeliverRequestType.FIS)
{
- if (string.IsNullOrEmpty(model.IdentityNo))
- {
- validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写底盘号", new string[] { "底盘号" }));
- }
- if (string.IsNullOrEmpty(model.MesDeliveryContainer))
- {
- validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写Mes器具号", new string[] { "Mes器具号" }));
- }
- if (string.IsNullOrEmpty(model.MesDeliveryPlan))
- {
- validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" }));
- }
+ //if (string.IsNullOrEmpty(model.IdentityNo))
+ //{
+ // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写底盘号", new string[] { "底盘号" }));
+ //}
+ //if (string.IsNullOrEmpty(model.MesDeliveryContainer))
+ //{
+ // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为FIS发货必须填写Mes器具号", new string[] { "Mes器具号" }));
+ //}
+ //if (string.IsNullOrEmpty(model.MesDeliveryPlan))
+ //{
+ // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" }));
+ //}
}
if (model.DeliverRequestType == EnumDeliverRequestType.Normal )
{
- if (string.IsNullOrEmpty(model.MesDeliveryPlan))
- {
- validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" }));
- }
- if(!string.IsNullOrEmpty(model.IdentityNo))
- {
- validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货底盘号应该为空", new string[] { "底盘号"}));
- }
+ //if (string.IsNullOrEmpty(model.MesDeliveryPlan))
+ //{
+ // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货必须填写MES发货计划单号", new string[] { "MES发货计划单号" }));
+ //}
+ //if(!string.IsNullOrEmpty(model.IdentityNo))
+ //{
+ // validationRresult.Add(new ValidationResult($"ERP料号{model.ItemCode}为看板发货底盘号应该为空", new string[] { "底盘号"}));
+ //}
}
var area = await _areaApp.GetByCodeAsync(model.AreaCode).ConfigureAwait(false);
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs
index 2c3081d5b..8fa5d5f80 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs
@@ -158,8 +158,8 @@ public class InspectJobManager : SfsJobManagerBase
//获取 汇总详情
var summaryDetailEntity = jobEntity.SummaryDetails.Find(p => p.Id == summaryDetailId);
- var itemQuality =
- await _itemQualityAclService.GetByItemCodeAsync(summaryDetailEntity.ItemCode, jobEntity.SupplierCode);
+ var itemQuality = await _itemQualityAclService.GetByItemCodeAsync(summaryDetailEntity.ItemCode, jobEntity.SupplierCode).ConfigureAwait(false);
+
if (itemQuality.InspectType != EnumInspectType.Exempt)
{
//获取质检标准
@@ -175,6 +175,10 @@ public class InspectJobManager : SfsJobManagerBase
//构造 汇总详情
await BuildInspectJobSummaryDetailAsync(input, summaryDetailEntity).ConfigureAwait(false);
+ if (summaryDetailEntity.InspectUser.IsNullOrEmpty())
+ {
+ summaryDetailEntity.InspectUser = currentUser.UserName; //lyt at 2024-07-17 未质检 不显示检验人; 质检完成 显示检验人
+ }
//判断 汇总详情是否全部执行完毕
if (jobEntity.SummaryDetails.All(p => p.SummaryInspectStatus != EnumSummaryInspectStatus.NotInspect))
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs
index a37a2f692..c6bbd24e6 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs
@@ -61,6 +61,12 @@ public class PurchaseOrderManager : SfsStoreManagerBase 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
//await _purchaseReceiptNoteManager.AppendPoNumberAsync(purchaseOrder).ConfigureAwait(false);
purchaseOrder.SetIdAndNumberWithDetails(GuidGenerator, purchaseOrder.Number);
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/PurchaseReceiptRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/PurchaseReceiptRequestEventHandler.cs
index b2d0d8dbd..bdd0c4a7a 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/PurchaseReceiptRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/PurchaseReceiptRequestEventHandler.cs
@@ -67,6 +67,13 @@ public class PurchaseReceiptRequestEventHandler
private async Task CreatePurchaseReceiptJob(PurchaseReceiptRequest purchaseReceiptRequest)
{
var createInput = await BuildPurchaseReceiptJobCreateInputAsync(purchaseReceiptRequest).ConfigureAwait(false);
+ foreach (var item in createInput)
+ {
+ if (string.IsNullOrEmpty(item.Worker))
+ {
+ item.Worker = "admin!";
+ }
+ }
await _purchaseReceiptJobAppService.CreateManyAsync(createInput).ConfigureAwait(false);
}