Add shared ERP sync core and Optima adapter

This commit is contained in:
2026-09-08 02:07:42 +00:00
parent a040a91d1f
commit 6c4e50f7a6
366 changed files with 4707 additions and 478 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
release-enova/Sentry.dll Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,13 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
release-enova/WampSharp.dll Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,27 @@
{
"portal": "demo",
"wamp": {
"serverUrl": "ws://wamp.smartb2b.eu:8080/",
"reconnectDelaySeconds": 10
},
"enova": {
"installationPath": "C:\\Program Files (x86)\\Soneta\\enova365 2604.4.4",
"database": "Firma demo",
"operator": "Administrator",
"password": "<hasło operatora>",
"documentDefinition": "ZO",
"defaultWarehouseCode": null,
"saveMode": "Buffer"
},
"sql": {
"connectionString": "Server=...;Database=...;User ID=...;Password=...;TrustServerCertificate=True",
"commandTimeoutSeconds": 30
},
"sentry": {
"dsn": "https://9ae7cbe5e29f4a85b2a748a78e55a868@glitchtip.glebocka.synology.me/10"
},
"diagnostics": {
"logDirectory": "daemon",
"logPrefix": "smartb2bsync-enova"
}
}

View File

@@ -0,0 +1,24 @@
@echo off
setlocal
cd /d "%~dp0"
if not exist "smartb2bsync-enova.exe" (
echo Brak smartb2bsync-enova.exe. Najpierw uruchom publish-enova.ps1.
exit /b 1
)
if not exist "..\config" mkdir "..\config"
if not exist "..\config\enova.json" (
if not exist "..\config\enova.json.sample" (
echo Brak ..\config\enova.json.sample.
exit /b 1
)
copy /Y "..\config\enova.json.sample" "..\config\enova.json" >nul
echo Utworzono lokalna konfiguracje ..\config\enova.json.
)
smartb2bsync-enova.exe install
if errorlevel 1 exit /b %errorlevel%
smartb2bsync-enova.exe start
exit /b %errorlevel%

Binary file not shown.

View File

@@ -0,0 +1,94 @@
<service>
<id>smartb2bsync-enova</id>
<name>SmartB2B SYNC - enova365</name>
<description>Synchronizuje enova365 z portalem SmartB2B.</description>
<executable>%BASE%\..\SmartB2B.Enova.Service.exe</executable>
<workingdirectory>%BASE%\..</workingdirectory>
<!-- Odkomentuj, aby włączyć logowanie etapów Enovy i diagnostykę Sentry. -->
<!-- <arguments>/verbose</arguments> -->
<stoptimeout>30sec</stoptimeout>
<log mode="roll-by-time">
<pattern>yyyyMMdd</pattern>
</log>
<onfailure action="restart" delay="10 sec" />
<delayedAutoStart />
<!--
WinSW pobiera te pliki przed uruchomieniem usługi. Lokalny plik
config\enova.json nie jest aktualizowany; odświeżany jest wyłącznie wzorzec.
smartb2bsync-enova.exe jest programem rozruchowym WinSW i nie może nadpisać
samego siebie podczas pracy.
-->
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/daemon/smartb2bsync-enova.xml" to="%BASE%\smartb2bsync-enova.xml" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/daemon/install.cmd" to="%BASE%\install.cmd" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/daemon/uninstall.cmd" to="%BASE%\uninstall.cmd" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Enova.Service.exe" to="%BASE%\..\SmartB2B.Enova.Service.exe" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Enova.Service.dll" to="%BASE%\..\SmartB2B.Enova.Service.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Enova.Service.deps.json" to="%BASE%\..\SmartB2B.Enova.Service.deps.json" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Enova.Service.runtimeconfig.json" to="%BASE%\..\SmartB2B.Enova.Service.runtimeconfig.json" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Enova.Service.pdb" to="%BASE%\..\SmartB2B.Enova.Service.pdb" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Sync.Contracts.dll" to="%BASE%\..\SmartB2B.Sync.Contracts.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Sync.Contracts.pdb" to="%BASE%\..\SmartB2B.Sync.Contracts.pdb" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Sync.Service.dll" to="%BASE%\..\SmartB2B.Sync.Service.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/SmartB2B.Sync.Service.pdb" to="%BASE%\..\SmartB2B.Sync.Service.pdb" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/adapters/SmartB2B.Enova.Adapter.dll" to="%BASE%\..\adapters\SmartB2B.Enova.Adapter.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Azure.Core.dll" to="%BASE%\..\Azure.Core.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Azure.Identity.dll" to="%BASE%\..\Azure.Identity.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.Bcl.AsyncInterfaces.dll" to="%BASE%\..\Microsoft.Bcl.AsyncInterfaces.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.Bcl.Memory.dll" to="%BASE%\..\Microsoft.Bcl.Memory.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.Data.SqlClient.dll" to="%BASE%\..\Microsoft.Data.SqlClient.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.Extensions.DependencyInjection.Abstractions.dll" to="%BASE%\..\Microsoft.Extensions.DependencyInjection.Abstractions.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.Extensions.Logging.Abstractions.dll" to="%BASE%\..\Microsoft.Extensions.Logging.Abstractions.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.Identity.Client.dll" to="%BASE%\..\Microsoft.Identity.Client.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.Identity.Client.Extensions.Msal.dll" to="%BASE%\..\Microsoft.Identity.Client.Extensions.Msal.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.IdentityModel.Abstractions.dll" to="%BASE%\..\Microsoft.IdentityModel.Abstractions.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.IdentityModel.JsonWebTokens.dll" to="%BASE%\..\Microsoft.IdentityModel.JsonWebTokens.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.IdentityModel.Logging.dll" to="%BASE%\..\Microsoft.IdentityModel.Logging.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.IdentityModel.Protocols.dll" to="%BASE%\..\Microsoft.IdentityModel.Protocols.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll" to="%BASE%\..\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.IdentityModel.Tokens.dll" to="%BASE%\..\Microsoft.IdentityModel.Tokens.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Microsoft.SqlServer.Server.dll" to="%BASE%\..\Microsoft.SqlServer.Server.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.ClientModel.dll" to="%BASE%\..\System.ClientModel.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.Configuration.ConfigurationManager.dll" to="%BASE%\..\System.Configuration.ConfigurationManager.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.Diagnostics.EventLog.dll" to="%BASE%\..\System.Diagnostics.EventLog.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.IdentityModel.Tokens.Jwt.dll" to="%BASE%\..\System.IdentityModel.Tokens.Jwt.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.Memory.Data.dll" to="%BASE%\..\System.Memory.Data.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.Runtime.Caching.dll" to="%BASE%\..\System.Runtime.Caching.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.Security.Cryptography.ProtectedData.dll" to="%BASE%\..\System.Security.Cryptography.ProtectedData.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/de/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\de\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/es/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\es\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/fr/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\fr\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/it/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\it\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/ja/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\ja\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/ko/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\ko\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/pt-BR/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\pt-BR\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/ru/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\ru\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/zh-Hans/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\zh-Hans\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/zh-Hant/Microsoft.Data.SqlClient.resources.dll" to="%BASE%\..\zh-Hant\Microsoft.Data.SqlClient.resources.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/unix/lib/net8.0/Microsoft.Data.SqlClient.dll" to="%BASE%\..\runtimes\unix\lib\net8.0\Microsoft.Data.SqlClient.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/win/lib/net8.0/Microsoft.Data.SqlClient.dll" to="%BASE%\..\runtimes\win\lib\net8.0\Microsoft.Data.SqlClient.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/win/lib/net8.0/System.Diagnostics.EventLog.dll" to="%BASE%\..\runtimes\win\lib\net8.0\System.Diagnostics.EventLog.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/win/lib/net8.0/System.Diagnostics.EventLog.Messages.dll" to="%BASE%\..\runtimes\win\lib\net8.0\System.Diagnostics.EventLog.Messages.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/win/lib/net8.0/System.Runtime.Caching.dll" to="%BASE%\..\runtimes\win\lib\net8.0\System.Runtime.Caching.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/win-arm/native/Microsoft.Data.SqlClient.SNI.dll" to="%BASE%\..\runtimes\win-arm\native\Microsoft.Data.SqlClient.SNI.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/win-arm64/native/Microsoft.Data.SqlClient.SNI.dll" to="%BASE%\..\runtimes\win-arm64\native\Microsoft.Data.SqlClient.SNI.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.dll" to="%BASE%\..\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/runtimes/win-x86/native/Microsoft.Data.SqlClient.SNI.dll" to="%BASE%\..\runtimes\win-x86\native\Microsoft.Data.SqlClient.SNI.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Newtonsoft.Json.dll" to="%BASE%\..\Newtonsoft.Json.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/NewtonsoftMessagePack.dll" to="%BASE%\..\NewtonsoftMessagePack.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/Sentry.dll" to="%BASE%\..\Sentry.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.Reactive.dll" to="%BASE%\..\System.Reactive.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/System.Runtime.InteropServices.WindowsRuntime.dll" to="%BASE%\..\System.Runtime.InteropServices.WindowsRuntime.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/WampSharp.dll" to="%BASE%\..\WampSharp.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/WampSharp.Default.Client.dll" to="%BASE%\..\WampSharp.Default.Client.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/WampSharp.NewtonsoftJson.dll" to="%BASE%\..\WampSharp.NewtonsoftJson.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/WampSharp.NewtonsoftMessagePack.dll" to="%BASE%\..\WampSharp.NewtonsoftMessagePack.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/WampSharp.WebSockets.dll" to="%BASE%\..\WampSharp.WebSockets.dll" failOnError="false" />
<download from="https://demo.smartb2b.eu/files/smartb2b-sync-enova/config/enova.json.sample" to="%BASE%\..\config\enova.json.sample" failOnError="false" />
</service>

View File

@@ -0,0 +1,7 @@
@echo off
setlocal
cd /d "%~dp0"
smartb2bsync-enova.exe stop
smartb2bsync-enova.exe uninstall
exit /b %errorlevel%