diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json
index 3a989def..c71c6357 100644
--- a/.vs/VSWorkspaceState.json
+++ b/.vs/VSWorkspaceState.json
@@ -2,6 +2,6 @@
"ExpandedNodes": [
""
],
- "SelectedNode": "\\SettleAccount.sln (src\\SettleAccount.sln)",
+ "SelectedNode": "\\SmartFactorySuite.sln",
"PreviewInSolutionExplorer": false
}
\ No newline at end of file
diff --git a/.vs/pg/v17/.wsuo b/.vs/pg/v17/.wsuo
index 449874cc..669b15b3 100644
Binary files a/.vs/pg/v17/.wsuo and b/.vs/pg/v17/.wsuo differ
diff --git a/src/.vs/ProjectEvaluation/settleaccount.metadata.v6.1 b/src/.vs/ProjectEvaluation/settleaccount.metadata.v6.1
new file mode 100644
index 00000000..3e63b8c4
Binary files /dev/null and b/src/.vs/ProjectEvaluation/settleaccount.metadata.v6.1 differ
diff --git a/src/.vs/ProjectEvaluation/settleaccount.projects.v6.1 b/src/.vs/ProjectEvaluation/settleaccount.projects.v6.1
new file mode 100644
index 00000000..70ad2645
Binary files /dev/null and b/src/.vs/ProjectEvaluation/settleaccount.projects.v6.1 differ
diff --git a/src/.vs/ProjectEvaluation/smartfactorysuite.metadata.v6.1 b/src/.vs/ProjectEvaluation/smartfactorysuite.metadata.v6.1
new file mode 100644
index 00000000..8f97038c
Binary files /dev/null and b/src/.vs/ProjectEvaluation/smartfactorysuite.metadata.v6.1 differ
diff --git a/src/.vs/ProjectEvaluation/smartfactorysuite.projects.v6.1 b/src/.vs/ProjectEvaluation/smartfactorysuite.projects.v6.1
new file mode 100644
index 00000000..3c4fd9cc
Binary files /dev/null and b/src/.vs/ProjectEvaluation/smartfactorysuite.projects.v6.1 differ
diff --git a/src/.vs/SettleAccount/FileContentIndex/9779fa43-cbd0-44b2-a77d-654c2daac3e9.vsidx b/src/.vs/SettleAccount/FileContentIndex/9779fa43-cbd0-44b2-a77d-654c2daac3e9.vsidx
new file mode 100644
index 00000000..101ecf2b
Binary files /dev/null and b/src/.vs/SettleAccount/FileContentIndex/9779fa43-cbd0-44b2-a77d-654c2daac3e9.vsidx differ
diff --git a/src/.vs/SettleAccount/FileContentIndex/0a628f7c-a070-41c8-9de5-5749fa66e797.vsidx b/src/.vs/SettleAccount/FileContentIndex/97bbf6c0-0f79-4edd-966d-96f37179c401.vsidx
similarity index 80%
rename from src/.vs/SettleAccount/FileContentIndex/0a628f7c-a070-41c8-9de5-5749fa66e797.vsidx
rename to src/.vs/SettleAccount/FileContentIndex/97bbf6c0-0f79-4edd-966d-96f37179c401.vsidx
index ce3171a4..15abf7c6 100644
Binary files a/src/.vs/SettleAccount/FileContentIndex/0a628f7c-a070-41c8-9de5-5749fa66e797.vsidx and b/src/.vs/SettleAccount/FileContentIndex/97bbf6c0-0f79-4edd-966d-96f37179c401.vsidx differ
diff --git a/src/.vs/SettleAccount/FileContentIndex/b1f49bef-2ea8-44a3-9acf-e9a9b1f7583f.vsidx b/src/.vs/SettleAccount/FileContentIndex/b1f49bef-2ea8-44a3-9acf-e9a9b1f7583f.vsidx
deleted file mode 100644
index 043b41af..00000000
Binary files a/src/.vs/SettleAccount/FileContentIndex/b1f49bef-2ea8-44a3-9acf-e9a9b1f7583f.vsidx and /dev/null differ
diff --git a/src/.vs/SettleAccount/v17/.futdcache.v2 b/src/.vs/SettleAccount/v17/.futdcache.v2
new file mode 100644
index 00000000..8a880edf
Binary files /dev/null and b/src/.vs/SettleAccount/v17/.futdcache.v2 differ
diff --git a/src/.vs/SmartFactorySuite/FileContentIndex/585e27e2-91ed-4957-b12a-1b1000b36474.vsidx b/src/.vs/SmartFactorySuite/FileContentIndex/585e27e2-91ed-4957-b12a-1b1000b36474.vsidx
new file mode 100644
index 00000000..8ecebd08
Binary files /dev/null and b/src/.vs/SmartFactorySuite/FileContentIndex/585e27e2-91ed-4957-b12a-1b1000b36474.vsidx differ
diff --git a/src/.vs/SmartFactorySuite/FileContentIndex/80ca747a-3598-4bd7-9691-b47bf35c430f.vsidx b/src/.vs/SmartFactorySuite/FileContentIndex/80ca747a-3598-4bd7-9691-b47bf35c430f.vsidx
new file mode 100644
index 00000000..e436cf8b
Binary files /dev/null and b/src/.vs/SmartFactorySuite/FileContentIndex/80ca747a-3598-4bd7-9691-b47bf35c430f.vsidx differ
diff --git a/src/.vs/SmartFactorySuite/FileContentIndex/read.lock b/src/.vs/SmartFactorySuite/FileContentIndex/read.lock
new file mode 100644
index 00000000..e69de29b
diff --git a/src/.vs/SmartFactorySuite/config/applicationhost.config b/src/.vs/SmartFactorySuite/config/applicationhost.config
new file mode 100644
index 00000000..269dc55d
--- /dev/null
+++ b/src/.vs/SmartFactorySuite/config/applicationhost.config
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/.vs/SmartFactorySuite/v17/.futdcache.v2 b/src/.vs/SmartFactorySuite/v17/.futdcache.v2
new file mode 100644
index 00000000..98c3333b
Binary files /dev/null and b/src/.vs/SmartFactorySuite/v17/.futdcache.v2 differ
diff --git a/src/.vs/SmartFactorySuite/v17/.suo b/src/.vs/SmartFactorySuite/v17/.suo
new file mode 100644
index 00000000..00049410
Binary files /dev/null and b/src/.vs/SmartFactorySuite/v17/.suo differ
diff --git a/src/.vs/SmartFactorySuite/v17/HierarchyCache.v1.txt b/src/.vs/SmartFactorySuite/v17/HierarchyCache.v1.txt
new file mode 100644
index 00000000..51b1ea86
Binary files /dev/null and b/src/.vs/SmartFactorySuite/v17/HierarchyCache.v1.txt differ
diff --git a/src/.vs/SmartFactorySuite/v17/fileList.bin b/src/.vs/SmartFactorySuite/v17/fileList.bin
new file mode 100644
index 00000000..ac80799a
Binary files /dev/null and b/src/.vs/SmartFactorySuite/v17/fileList.bin differ
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
index 02cbfba3..ed26aecd 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
@@ -46,6 +46,8 @@ using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
+using Org.BouncyCastle.Bcpg.OpenPgp;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
@@ -572,9 +574,16 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[UnitOfWork(isTransactional: false)]
public async Task UPdateFisAsync()
{
- _repository.GetDbContext().Database.SetCommandTimeout(300);
+
+
+ string sql = string.Format(" EXEC [dbo].[sp_settle_fis_update] @Version = N'{0}' ");
+
await _repository.GetDbContext().Database.ExecuteSqlRawAsync(
- "EXEC sp_settle_fis_update"
+ $" EXEC sp_settle_fis_update "
+
+
+
+
);
return true;
@@ -584,4 +593,4 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
-}
\ No newline at end of file
+}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
index e012448d..2458a0cd 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
@@ -89,9 +89,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
WMSEfCoreRepository wmsefRespository,
WMSEfCoreRepository wmstbRespository,
IDistributedCache cache,
- ISnowflakeIdGenerator snowflakeIdGenerator,
- ICommonManager commonManager,
-
+ ISnowflakeIdGenerator snowflakeIdGenerator,
+ ICommonManager commonManager,
ErpPartDapperRepository repository,
TaskJobService service
@@ -513,7 +512,19 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
public async Task WmsJitOutPutPass(WmsJitRequestDto input)
{
- List customConditionList = new List();
+ var list= _wmsRepository.Where(p => p.BillNum == input.BillNum ).ToList();
+ var alreay=list.FirstOrDefault(p => p.BillNum == input.BillNum && p.State==1);
+ if (alreay.State == 1)
+ {
+ throw new UserFriendlyException("单据中有申请状态记录不能重复提交","8989");
+ }
+ var updatelist=list.Where(p => p.State != 4 && p.State != 2).ToList();
+ foreach (var itm in updatelist)
+ {
+ itm.State = 1;
+ }
+ await _wmsRepository.GetDbContext().BulkUpdateAsync(updatelist);
+ List customConditionList = new List();
customConditionList.Add(new CustomCondition() { Name = "BillNum", Value = input.BillNum ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Date", Value = input.AccountDate.ToString() });
var _taskid = await _service.ExportEnqueueAsync("准时化出库服务"+input.BillNum, ExportExtentsion.Excel, input.Version, string.Empty, CurrentUser, typeof(FisOutputService), customConditionList, (rs) =>
@@ -526,13 +537,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
// " @type = 0,\n" +
// " @date = N'{1}'\n"+
// "SELECT 'Return Value' = @return_value";
- // await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
+ // await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
// string.Format(sql,input.BillNum,input.AccountDate.ToShortDateString())
// );
-
-
-
-
return true;
}
@@ -715,4 +722,4 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
-}
\ No newline at end of file
+}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs
index 52d9267e..6d407b45 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs
@@ -42,14 +42,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
public FisUpdateDapperRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider)
{
-
+
}
[UnitOfWork(isTransactional: false)]
public virtual void UpdateFisSettle(string version)
{
-
- DbConnection.Execute(string.Format("EXEC sp_settle_fis_update N'{0}'", version), null, null, 1200, null);
-
+ DbConnection.ExecuteScalar(string.Format("EXEC [dbo].[sp_settle_fis_update] @Version = N'{0}'", version), null, null, 1200, null);
}
diff --git a/src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache b/src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache
index 6091fcc9..001f19e7 100644
Binary files a/src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache and b/src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache differ
diff --git a/src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.GeneratedMSBuildEditorConfig.editorconfig b/src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.GeneratedMSBuildEditorConfig.editorconfig
index 6f17514e..79c78321 100644
--- a/src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.GeneratedMSBuildEditorConfig.editorconfig
+++ b/src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.GeneratedMSBuildEditorConfig.editorconfig
@@ -8,4 +8,4 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Win.Utils
-build_property.ProjectDir = C:\Users\Administrator\source\repos\pg\src\Shared\Win.Utils\
+build_property.ProjectDir = C:\Users\Administrator\Source\Repos\pg\src\Shared\Win.Utils\