Merge branch 'develop' of https://gitlab.steamware.net/steamware/mapo-core into develop
@@ -2,3 +2,6 @@
|
||||
|
||||
# CS8765: Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes).
|
||||
dotnet_diagnostic.CS8765.severity = none
|
||||
|
||||
# CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
||||
dotnet_diagnostic.CS8632.severity = none
|
||||
|
||||
@@ -82,6 +82,7 @@ stages:
|
||||
- installer
|
||||
- release
|
||||
|
||||
# ----- Start BUILD -----
|
||||
LAND:build:
|
||||
stage: build
|
||||
tags:
|
||||
@@ -173,7 +174,21 @@ CONF:build:
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
IOC:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: MP.IOC
|
||||
SOL_NAME: MP-IOC
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
|
||||
# ----- Start DEPLOY develop (IIS01) -----
|
||||
LAND:IIS01:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
@@ -293,6 +308,24 @@ CONF:IIS01:deploy:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
IOC:IIS01:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: MP.IOC
|
||||
SOL_NAME: MP-IOC
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
only:
|
||||
- develop
|
||||
needs: ["IOC:build"]
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# ----- Start DEPLOY master (IIS02/IIS04) -----
|
||||
LAND:IIS02:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
@@ -309,7 +342,7 @@ LAND:IIS02:deploy:
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
PROG:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -327,7 +360,7 @@ PROG:IIS02:deploy:
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
STAT:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -345,7 +378,7 @@ STAT:IIS02:deploy:
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
MON:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -363,7 +396,7 @@ MON:IIS02:deploy:
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
SPEC:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -381,7 +414,7 @@ SPEC:IIS02:deploy:
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
INVE:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -399,7 +432,7 @@ INVE:IIS02:deploy:
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
CONF:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -417,8 +450,27 @@ CONF:IIS02:deploy:
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
IOC:IIS02:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: MP.IOC
|
||||
SOL_NAME: MP-IOC
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
only:
|
||||
- develop
|
||||
needs: ["IOC:build"]
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# ----- Start INSTALLER (develop/master) -----
|
||||
LAND:installer:
|
||||
stage: installer
|
||||
tags:
|
||||
@@ -573,6 +625,29 @@ INVE:installer:
|
||||
# - *hashBuild
|
||||
# - *nexusUpload
|
||||
|
||||
IOC:installer:
|
||||
stage: installer
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: MP.IOC
|
||||
SOL_NAME: MP-IOC
|
||||
NEXUS_PATH: MP-IOC
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
only:
|
||||
- develop
|
||||
- master
|
||||
needs: ["IOC:build"]
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish -p:verbosity=quiet
|
||||
# qui il deploy su nexus...
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
|
||||
# ----- Start RELEASE (tags only) -----
|
||||
LAND:release:
|
||||
stage: release
|
||||
tags:
|
||||
@@ -585,8 +660,6 @@ LAND:release:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
only:
|
||||
#- feature/Deploy_CI_CD
|
||||
# - master
|
||||
- tags
|
||||
except:
|
||||
- branches
|
||||
@@ -740,3 +813,26 @@ CONF:release:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj -p:verbosity=quiet
|
||||
|
||||
IOC:release:
|
||||
stage: release
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: MP.IOC
|
||||
SOL_NAME: MP-IOC
|
||||
NEXUS_PATH: MP-IOC
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
only:
|
||||
- tags
|
||||
except:
|
||||
- branches
|
||||
needs: ["IOC:build"]
|
||||
artifacts:
|
||||
paths:
|
||||
- publish/
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj -p:verbosity=quiet
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"_type":"export","__export_format":4,"__export_date":"2023-04-04T15:23:33.215Z","__export_source":"insomnia.desktop.app:v2023.1.0","resources":[{"_id":"req_cd57cb8728854cd5a7d026b9aba60047","parentId":"wrk_86debe1a96ca41cdbfb53ed71a9d6d84","modified":1680616613886,"created":1680616613017,"url":"https://localhost:7212/api/Recipe/GetRecipe?idxPODL=1656","name":"New Request","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1680616613017,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"wrk_86debe1a96ca41cdbfb53ed71a9d6d84","parentId":null,"modified":1680615228636,"created":1680615228636,"name":"MAPO-SPEC","description":"","scope":"collection","_type":"workspace"},{"_id":"req_4d233d6fb970485ea929bdffdcfae05a","parentId":"wrk_86debe1a96ca41cdbfb53ed71a9d6d84","modified":1680621773464,"created":1680615246346,"url":"{{ _.BASE_URL }}/api/Recipe/GetRecipe?idxPODL=1656","name":"GET RECIPE (calc)","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1680615241541.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_278d5f0a6555457e88ad2e58cfdaae23","parentId":"wrk_86debe1a96ca41cdbfb53ed71a9d6d84","modified":1680621754168,"created":1680615436433,"url":"{{ BASE_URL }}/api/RecipeArchive/GetFile?idxMacc=SIMUL_02&fileName=10002.xml","name":"GET FILE (from archive)","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1679846511868.4375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_ea1cd34b6839260f9a1edf3546f3c605bb6f3a2c","parentId":"wrk_86debe1a96ca41cdbfb53ed71a9d6d84","modified":1680615377532,"created":1680615228640,"name":"Base Environment","data":{},"dataPropertyOrder":{},"color":null,"isPrivate":false,"metaSortKey":1680615228640,"_type":"environment"},{"_id":"jar_ea1cd34b6839260f9a1edf3546f3c605bb6f3a2c","parentId":"wrk_86debe1a96ca41cdbfb53ed71a9d6d84","modified":1680615228642,"created":1680615228642,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"spc_b61936e963e34a759001c6a22ad8da60","parentId":"wrk_86debe1a96ca41cdbfb53ed71a9d6d84","modified":1680615228637,"created":1680615228637,"fileName":"MAPO-SPEC","contents":"","contentType":"yaml","_type":"api_spec"},{"_id":"env_2757d8ba1b17435987847d0499e9369e","parentId":"env_ea1cd34b6839260f9a1edf3546f3c605bb6f3a2c","modified":1680616993850,"created":1680615301619,"name":"DEV","data":{"BASE_URL":"https://localhost:7212"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":"#ff0000","isPrivate":false,"metaSortKey":1680615301619,"_type":"environment"},{"_id":"env_f5b6aef3c2b444aab04c9056404d63f9","parentId":"env_ea1cd34b6839260f9a1edf3546f3c605bb6f3a2c","modified":1680616996428,"created":1680615328099,"name":"IIS01","data":{"BASE_URL":"https://iis01.egalware.com/MP/SPEC"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":"#6600ff","isPrivate":false,"metaSortKey":1680615328099,"_type":"environment"}]}
|
||||
@@ -41,7 +41,7 @@ namespace IobConf.Core
|
||||
/// <param name="Key"></param>
|
||||
public void IniDeleteKey(string Section, string Key)
|
||||
{
|
||||
WritePrivateProfileString(Section, Key, null, FileName);
|
||||
WritePrivateProfileString(Section, Key, "", FileName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -50,7 +50,7 @@ namespace IobConf.Core
|
||||
/// <param name="Section"></param>
|
||||
public void IniDeleteSection(string Section)
|
||||
{
|
||||
WritePrivateProfileSection(Section, null, FileName);
|
||||
WritePrivateProfileSection(Section, "", FileName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.0" />
|
||||
<PackageReference Include="YamlDotNet" Version="12.3.1" />
|
||||
<PackageReference Include="NLog" Version="5.1.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -19,7 +19,9 @@ namespace IobConf.Core
|
||||
/// Init classe configurazione
|
||||
/// </summary>
|
||||
public IobConfTree()
|
||||
{ }
|
||||
{
|
||||
Log = LogManager.GetCurrentClassLogger();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce un oggetto di conf leggendo INI ed effettuando conversione
|
||||
@@ -33,8 +35,8 @@ namespace IobConf.Core
|
||||
{
|
||||
// leggo file INI
|
||||
IniFile fIni = new IniFile(iniFilePath);
|
||||
string codIob= Path.GetFileNameWithoutExtension(iniFilePath);
|
||||
|
||||
string codIob = Path.GetFileNameWithoutExtension(iniFilePath);
|
||||
|
||||
// effettuo conversione...
|
||||
|
||||
// Dati generali (vendor, modello...)
|
||||
@@ -46,13 +48,13 @@ namespace IobConf.Core
|
||||
// tipo adapter// verifico tipo adapter
|
||||
try
|
||||
{
|
||||
newConfObj.IobType = (AdapterType)Enum.Parse(typeof(AdapterType), fIni.ReadString("IOB", "CNCTYPE", "ND"));
|
||||
newConfObj.IobType = (AdapterType)Enum.Parse(typeof(AdapterType), fIni.ReadString("IOB", "CNCTYPE", "ND"));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
newConfObj.IobType = AdapterType.ND;
|
||||
string rawVal = fIni.ReadString("IOB", "CNCTYPE", "DEMO");
|
||||
//newConfObj.lgError($"Eccezione in conversione tipo adapter: richiesto {rawVal} | tipo non codificato...{Environment.NewLine}{exc}");
|
||||
newConfObj.lgError($"Eccezione in conversione tipo adapter: richiesto {rawVal} | tipo non codificato...{Environment.NewLine}{exc}");
|
||||
}
|
||||
newConfObj.GeneralCom = (ComLayer)Enum.Parse(typeof(ComLayer), fIni.ReadString("IOB", "CNCFAMILY", "ND"));
|
||||
|
||||
@@ -72,16 +74,15 @@ namespace IobConf.Core
|
||||
newConfObj.TempoCiclo.MaxIncrPz = Convert.ToDouble(fIni.ReadString("OPTPAR", "TC_MAX_INCR", "5").Replace(".", ","));
|
||||
|
||||
// Server
|
||||
string MpIp=fIni.ReadString("SERVER", "MPIP", "::1");
|
||||
string MpIp = fIni.ReadString("SERVER", "MPIP", "::1");
|
||||
if (!string.IsNullOrEmpty(MpIp))
|
||||
{
|
||||
newConfObj.ServerMES.Transport = MpIp.StartsWith("https://") ? "https" : "http";
|
||||
newConfObj.ServerMES.IpAddr = MpIp.Replace($"{newConfObj.ServerMES.Transport}://", ""); // tolgo http/https...
|
||||
}
|
||||
//newConfObj.ServerMES.Commands.Alive
|
||||
|
||||
|
||||
// Altro (versione, ...)
|
||||
newConfObj.ReleaseVers = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
newConfObj.ReleaseVers = $"{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
|
||||
newConfObj.IobManConf.MinDeltaSec = fIni.ReadInteger("IOB", "MinDeltaSec", 6);
|
||||
|
||||
// OptPar
|
||||
@@ -101,7 +102,7 @@ namespace IobConf.Core
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
//newConfObj.lgError(string.Format("EXCEPTION in fase di lettura OPTPAR: {0}{1}", Environment.NewLine, exc));
|
||||
newConfObj.lgError(string.Format("EXCEPTION in fase di lettura OPTPAR: {0}{1}", Environment.NewLine, exc));
|
||||
}
|
||||
}
|
||||
// riordino alfabeticamente
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ItemGroup>
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS03.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS04.pubxml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33205.214
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data.csproj", "{A0C7A1E7-6E5F-41BA-8ED0-C4A6C581C1B3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP.IOC", "MP.IOC\MP.IOC.csproj", "{B9F508BF-8503-4C25-B9BA-0FAC411C44C5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A0C7A1E7-6E5F-41BA-8ED0-C4A6C581C1B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A0C7A1E7-6E5F-41BA-8ED0-C4A6C581C1B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A0C7A1E7-6E5F-41BA-8ED0-C4A6C581C1B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A0C7A1E7-6E5F-41BA-8ED0-C4A6C581C1B3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B9F508BF-8503-4C25-B9BA-0FAC411C44C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B9F508BF-8503-4C25-B9BA-0FAC411C44C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B9F508BF-8503-4C25-B9BA-0FAC411C44C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B9F508BF-8503-4C25-B9BA-0FAC411C44C5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8030DF52-992F-46A3-A9F1-5FF64A9D5D9D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MP.Data.Conf
|
||||
{
|
||||
/// <summary>
|
||||
/// Configurazione blocco ricetta (Header / Rows)
|
||||
/// </summary>
|
||||
public class RecipeBlockConfig
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario degli enum permessi
|
||||
/// </summary>
|
||||
public Dictionary<string, Dictionary<string, string>> EnumVal { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario delle chiavi, differenziate dai primi caratteri:
|
||||
/// C: --> Calcolato
|
||||
/// E: --> Enum: modificabile ma da dizionario valori seguente
|
||||
/// F: --> Fixed (NON modificabile) "" --> editabile
|
||||
/// </summary>
|
||||
public Dictionary<string, string> ListKeys { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MP.Data.Conf
|
||||
{
|
||||
public class RecipeConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// File di configurazione template ricetta
|
||||
/// </summary>
|
||||
public string TemplateFile { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Numero di righe da creare x ricetta
|
||||
/// </summary>
|
||||
public int NumRow { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Configurazione ricetta x header
|
||||
/// </summary>
|
||||
public RecipeBlockConfig HeadConf { get; set; } = new RecipeBlockConfig();
|
||||
|
||||
/// <summary>
|
||||
/// Configurazione ricetta x rows
|
||||
/// </summary>
|
||||
public RecipeBlockConfig RowsConf { get; set; } = new RecipeBlockConfig();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.Data.DatabaseModels;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MP.Data.Controllers
|
||||
{
|
||||
public class MpIocController : IDisposable
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public MpIocController(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
Log.Info("Avviata classe MpIocController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Elenco da tabella Config
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<ConfigModel> ConfigGetAll()
|
||||
{
|
||||
List<ConfigModel> dbResult = new List<ConfigModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetConfig
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.Chiave)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update record config
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool ConfigUpdate(ConfigModel updRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
ConfigModel dbResult = new ConfigModel();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetConfig
|
||||
.Where(x => x.Chiave == updRec.Chiave)
|
||||
.FirstOrDefault();
|
||||
if (dbResult != null)
|
||||
{
|
||||
dbResult.Valore = updRec.Valore;
|
||||
dbCtx.SaveChanges();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Intera tab dati macchina
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DatiMacchineModel> DatiMacchineGetAll()
|
||||
{
|
||||
List<DatiMacchineModel> dbResult = new List<DatiMacchineModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetDatiMacchine
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_configuration = null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunta record EventList
|
||||
/// </summary>
|
||||
/// <param name="newRec"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> EvListInsert(EventListModel newRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = dbCtx
|
||||
.DbSetEvList
|
||||
.Add(newRec);
|
||||
await dbCtx.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante EvListInsert{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco ultimi n record flux log dato macchina e flusso (ordinato x data registrazione)
|
||||
/// </summary>
|
||||
/// <param name="DtMax">Data massima x eventi</param>
|
||||
/// <param name="DtMin">Data minima x eventi</param>
|
||||
/// <param name="IdxMacchina">* = tutte, altrimenti solo x una data macchina</param>
|
||||
/// <param name="CodFlux">*=tutti, altrimenti solo selezionato</param>
|
||||
/// <param name="MaxRec">numero massimo record da restituire</param>
|
||||
/// <returns></returns>
|
||||
public List<FluxLog> FluxLogGetLastFilt(DateTime DtMax, DateTime DtMin, string IdxMacchina, string CodFlux, int MaxRec)
|
||||
{
|
||||
List<FluxLog> dbResult = new List<FluxLog>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetFluxLog
|
||||
.AsNoTracking()
|
||||
.Where(x => (x.dtEvento >= DtMin && x.dtEvento <= DtMax) && (IdxMacchina == "*" || x.IdxMacchina == IdxMacchina) && (CodFlux == "*" || x.CodFlux == CodFlux))
|
||||
.OrderByDescending(x => x.dtEvento)
|
||||
.Take(MaxRec)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public bool KeepAliveUpsert(string IdxMacc, DateTime OraServer, DateTime OraMacc)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var currRec = dbCtx
|
||||
.DbSetKeepAlive
|
||||
.Where(x => x.IdxMacchina == IdxMacc)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.DataOraServer = OraServer;
|
||||
currRec.DataOraMacchina = OraMacc;
|
||||
dbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
else
|
||||
{
|
||||
KeepAliveModel newRec = new KeepAliveModel()
|
||||
{
|
||||
IdxMacchina = IdxMacc,
|
||||
DataOraMacchina = OraMacc,
|
||||
DataOraServer = OraServer,
|
||||
DataOraStart = DateTime.Now
|
||||
};
|
||||
dbCtx
|
||||
.DbSetKeepAlive
|
||||
.Add(newRec);
|
||||
}
|
||||
dbCtx.SaveChanges();
|
||||
fatto = true;
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
|
||||
public List<LinkMenu> ListLinkFilt(string tipoLink)
|
||||
{
|
||||
List<LinkMenu> dbResult = new List<LinkMenu>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetLinkMenu
|
||||
.Where(x => x.TipoLink == tipoLink)
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.ordine)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Intera tabella relazione master/slave in machine (gestione setup master --> slave)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<Macchine2SlaveModel> Macchine2Slave()
|
||||
{
|
||||
List<Macchine2SlaveModel> dbResult = new List<Macchine2SlaveModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetM2S
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco da tabella Macchine
|
||||
/// </summary>
|
||||
/// <param name="codGruppo"></param>
|
||||
/// <returns></returns>
|
||||
public List<Macchine> MacchineGetFilt(string codGruppo)
|
||||
{
|
||||
List<Macchine> dbResult = new List<Macchine>();
|
||||
try
|
||||
{
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
if (codGruppo == "*")
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetMacchine
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetGrp2Macc
|
||||
.Where(g => g.CodGruppo == codGruppo)
|
||||
.Join(dbCtx.DbSetMacchine,
|
||||
g => g.IdxMacchina,
|
||||
m => m.IdxMacchina,
|
||||
(g, m) => m
|
||||
)
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in MacchineGetFilt{Environment.NewLine}{exc}");
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco da tabella MappaStatoExpl
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<MappaStatoExpl> MseGetAll(int maxAge = 2000)
|
||||
{
|
||||
List<MappaStatoExpl> dbResult = new List<MappaStatoExpl>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var maxAgeSec = new SqlParameter("@maxAgeSec", maxAge);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetMSE
|
||||
.FromSqlRaw("EXEC stp_MSE_getData @maxAgeSec", maxAgeSec)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Annulla modifiche su una specifica entity (cancel update)
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <returns></returns>
|
||||
public bool RollBackEntity(object item)
|
||||
{
|
||||
bool answ = false;
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified)
|
||||
{
|
||||
dbCtx.Entry(item).Reload();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Intera tabella relazione master/slave in machine (gestione setup master --> slave)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<TransizioneIngressiModel> StateMachineIngressi(int idxFam)
|
||||
{
|
||||
List<TransizioneIngressiModel> dbResult = new List<TransizioneIngressiModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var IdxFamIn = new SqlParameter("@IdxFamigliaIngresso", idxFam);
|
||||
dbResult = dbCtx
|
||||
.DbSetSMI
|
||||
.FromSqlRaw("exec dbo.stp_TRI_getByIdxFamIng @IdxFamigliaIngresso", IdxFamIn)
|
||||
.AsNoTracking()
|
||||
.AsEnumerable()
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stato prod macchina
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public StatoProdModel StatoProdMacchina(string idxMacchina)
|
||||
{
|
||||
StatoProdModel dbResult = new StatoProdModel();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina);
|
||||
dbResult = dbCtx
|
||||
.DbSetStatoProd
|
||||
.FromSqlRaw("EXEC stp_PzProd_getByMacchina @IdxMacchina", IdxMacchina)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefault();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Intera vista v_MSFD
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<VMSFDModel> VMSFDGetAll()
|
||||
{
|
||||
List<VMSFDModel> dbResult = new List<VMSFDModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetMSFD
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Vista v_MSFD CALCOALTA x singola macchina (da stored) - singolo record
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<VMSFDModel> VMSFDGetByMacc(string idxMacc)
|
||||
{
|
||||
List<VMSFDModel> dbResult = new List<VMSFDModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacc);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetMSFD
|
||||
.FromSqlRaw("exec dbo.stp_MSFD_getMacc @IdxMacchina", IdxMacchina)
|
||||
.AsNoTracking()
|
||||
.AsEnumerable()
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using NLog.Fluent;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MongoDB.Driver;
|
||||
using MongoDB.Bson;
|
||||
using MP.Data.MgModels;
|
||||
using System.IO;
|
||||
using MP.Data.Conf;
|
||||
using Newtonsoft.Json;
|
||||
using static MP.Data.MgModels.RecipeModel;
|
||||
|
||||
namespace MP.Data.Controllers
|
||||
{
|
||||
public class MpMongoController : IDisposable
|
||||
{
|
||||
|
||||
public MpMongoController(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
string mongoConf = _configuration.GetConnectionString("mdbConnString");
|
||||
client = new MongoClient(mongoConf);
|
||||
mongoDb = client.GetDatabase("MAPO");
|
||||
Log.Info("Avviata classe MpMongoController");
|
||||
}
|
||||
/// <summary>
|
||||
/// Database corrente MongoDB
|
||||
/// </summary>
|
||||
private IMongoDatabase mongoDb;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
client = null;
|
||||
_configuration = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricerca ricetta su MongoDB dato PODL
|
||||
/// </summary>
|
||||
/// <param name="idxPODL"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RecipeModel> RecipeGetByPODL(int idxPODL)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
RecipeModel answ = new RecipeModel();
|
||||
try
|
||||
{
|
||||
// definisco filtro
|
||||
var filtBuilder = Builders<RecipeModel>.Filter;
|
||||
var filter = filtBuilder.Eq<int>("IdxPODL", idxPODL);
|
||||
var collectionData = mongoDb.GetCollection<RecipeModel>("RecipeArchive");
|
||||
// recupero
|
||||
answ = collectionData.Find(filter).Project<RecipeModel>("{_id: 0}").FirstOrDefault<RecipeModel>();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricerca ricetta su MongoDB dato ID MongoDB
|
||||
/// </summary>
|
||||
/// <param name="mID"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RecipeModel> RecipeGetByID(string mID)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
RecipeModel answ = new RecipeModel();
|
||||
try
|
||||
{
|
||||
// definisco filtro
|
||||
var filtBuilder = Builders<RecipeModel>.Filter;
|
||||
var filter = filtBuilder.Eq<string>("_id", mID);
|
||||
var collectionData = mongoDb.GetCollection<RecipeModel>("RecipeArchive");
|
||||
// recupero
|
||||
answ = collectionData.Find(filter).Project<RecipeModel>("{_id: 0}").FirstOrDefault<RecipeModel>();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Salva ricetta su MongoDB
|
||||
/// </summary>
|
||||
/// <param name="currRecord"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> RecipeSetByPODL(RecipeModel currRecord)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// definisco filtro
|
||||
var filtBuilder = Builders<RecipeModel>.Filter;
|
||||
var filter = filtBuilder.Eq<int>("IdxPODL", currRecord.IdxPODL);
|
||||
var collectionData = mongoDb.GetCollection<RecipeModel>("RecipeArchive");
|
||||
// elimino old
|
||||
collectionData.DeleteMany(filter);
|
||||
// aggiungo
|
||||
collectionData.InsertOne(currRecord);
|
||||
answ = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in RecipeSetByPODL{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Init ricetta dato PODL + conf
|
||||
/// </summary>
|
||||
/// <param name="confPath"></param>
|
||||
/// <param name="idxPODL"></param>
|
||||
/// <param name="CalcArgs"></param>
|
||||
/// <returns></returns>
|
||||
public RecipeModel InitRecipe(string confPath, int idxPODL, Dictionary<string, string> CalcArgs)
|
||||
{
|
||||
RecipeModel answ = new RecipeModel();
|
||||
// per prima cosa leggo file di conf x inizializzare ricetta...
|
||||
string fullPath = RecipePath(confPath);
|
||||
bool fileOk = File.Exists(fullPath);
|
||||
if (fileOk)
|
||||
{
|
||||
string rawData = File.ReadAllText(fullPath);
|
||||
var currRecipe = JsonConvert.DeserializeObject<RecipeConfig>(rawData);
|
||||
// inizializzo dalla conf...
|
||||
answ = new RecipeModel(idxPODL, currRecipe, CalcArgs);
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Ricetta in formato calcolato (string)
|
||||
/// </summary>
|
||||
public string CalcRecipe(RecipeModel currRecipe)
|
||||
{
|
||||
string answ = "";
|
||||
// per prima cosa leggo file di conf x inizializzare ricetta...
|
||||
string fullPath = RecipePath(currRecipe.TemplateFile);
|
||||
bool fileOk = File.Exists(fullPath);
|
||||
if (fileOk)
|
||||
{
|
||||
// preparo dati header
|
||||
var headStrings = currRecipe.HeadVal.Select(x => $"\"{x.Key}\": \"{x.Value}\"").ToList();
|
||||
string headVals = string.Join(",", headStrings);
|
||||
|
||||
|
||||
// leggo template
|
||||
string rawData = File.ReadAllText(fullPath);
|
||||
// recupero configurazione x inizio/fine righe
|
||||
string[] righe = rawData.Split(Environment.NewLine);
|
||||
List<string> righeRed = new List<string>();
|
||||
string sRow = "";
|
||||
string eRow = "";
|
||||
foreach (var riga in righe)
|
||||
{
|
||||
if (riga.Trim().StartsWith("||SROW:"))
|
||||
{
|
||||
sRow = riga.Trim().Replace("||SROW:", "").Replace("||", "");
|
||||
}
|
||||
else if (riga.Trim().StartsWith("||EROW:"))
|
||||
{
|
||||
eRow = riga.Trim().Replace("||EROW:", "").Replace("||", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
righeRed.Add(riga);
|
||||
}
|
||||
}
|
||||
// rigenero righe senza le parti da ripetere...
|
||||
rawData = string.Join(Environment.NewLine, righeRed);
|
||||
// effettuo sostituzione...
|
||||
answ = rawData.Replace("||PlaceholderHeader||", headVals);
|
||||
// per le righe prima calcolo blocchi ripetuti
|
||||
List<string> rowComp = new List<string>();
|
||||
foreach (var item in currRecipe.RowsVal)
|
||||
{
|
||||
var rowsStrings = item.Value.Select(x => $"\"{x.Key}\": \"{x.Value}\"").ToList();
|
||||
rowComp.Add($"{sRow}{string.Join(",", rowsStrings)}{eRow}");
|
||||
}
|
||||
string rowsVals = string.Join($",{Environment.NewLine}", rowComp);
|
||||
//...poi sostituisco
|
||||
answ = answ.Replace("||PlaceholderRows||", rowsVals);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
private MongoClient client = new MongoClient("mongodb://localhost:27017");
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public static string RecipePath(string ruleName)
|
||||
{
|
||||
return string.Format($"Recipe/{ruleName}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -294,6 +294,24 @@ namespace MP.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Intera tab dati macchina
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DatiMacchineModel> DatiMacchineGetAll()
|
||||
{
|
||||
List<DatiMacchineModel> dbResult = new List<DatiMacchineModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetDatiMacchine
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_configuration = null;
|
||||
@@ -348,8 +366,8 @@ namespace MP.Data.Controllers
|
||||
.AsNoTracking()
|
||||
.Where(x => (IdxMacchina == "*" || x.IdxMacchina == IdxMacchina) && (CodArticolo == "*" || x.CodArticolo == CodArticolo) && (x.DtRif >= DtStart && x.DtRif <= DtEnd))
|
||||
.Include(m => m.MachineNav)
|
||||
//.Include(o => o.OdlNav)
|
||||
.Include(a => a.ArticoloNav)
|
||||
////.Include(o => o.OdlNav)
|
||||
.OrderByDescending(x => x.DtRif)
|
||||
.ToList();
|
||||
}
|
||||
@@ -571,7 +589,7 @@ namespace MP.Data.Controllers
|
||||
/// Elenco TUTTI GLI ODL
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<ODLModel> ListOdlAll()
|
||||
public List<ODLModel> OdlListAll()
|
||||
{
|
||||
List<ODLModel> dbResult = new List<ODLModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
@@ -619,24 +637,8 @@ namespace MP.Data.Controllers
|
||||
.DbSetODLExp
|
||||
.FromSqlRaw("EXEC stp_ODL_getByFiltSpec @InCorso, @CodArt, @KeyRich, @CodGruppo, @IdxMacchina, @DataFrom, @DataTo", InCorso, CodArt, KeyRich, CodGruppo, IdxMacc, DataFrom, DataTo)
|
||||
.AsNoTracking()
|
||||
//.AsEnumerable()
|
||||
.ToList();
|
||||
|
||||
#if false
|
||||
dbResult = dbCtx
|
||||
.DbSetODL
|
||||
.Where(x => ((inCorso && x.DataFine == null) || ((!inCorso && x.DataFine != null)
|
||||
&& x.DataInizio >= startDate && x.DataInizio <= endDate))
|
||||
&& (x.KeyRichiesta.Contains(keyRichPart) || keyRichPart == "*")
|
||||
//&& (x.MachineNav.Contains(IdxMacchina) || Reparto == "*")
|
||||
&& (x.IdxMacchina.Contains(IdxMacchina) || IdxMacchina == "*")
|
||||
&& (codArt == "*" || x.CodArticolo.Contains(codArt)))
|
||||
.AsNoTracking()
|
||||
.Include(m => m.MachineNav)
|
||||
.Include(a => a.ArticoloNav)
|
||||
.OrderByDescending(x => x.IdxOdl)
|
||||
.ToList();
|
||||
#endif
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
@@ -656,14 +658,14 @@ namespace MP.Data.Controllers
|
||||
{
|
||||
var Lanc = new SqlParameter("@Lanciato", lanciato);
|
||||
var KeyRich = new SqlParameter("@KeyRich", keyRichPart);
|
||||
var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina);
|
||||
var CodGrp = new SqlParameter("@CodGruppo", codGruppo);
|
||||
var DateFrom = new SqlParameter("@DateFrom", startDate);
|
||||
var DateTo = new SqlParameter("@DateTo", endDate);
|
||||
var IdxMacc = new SqlParameter("@IdxMacchina", idxMacchina);
|
||||
var DateFrom = new SqlParameter("@DtInizio", startDate);
|
||||
var DateTo = new SqlParameter("@DtFine", endDate);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetPODLExp
|
||||
.FromSqlRaw("EXEC stp_PODL_getByFiltSpec @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina, @DateFrom, @DateTo", Lanc, KeyRich, CodGrp, IdxMacc, DateFrom, DateTo)
|
||||
.FromSqlRaw("EXEC stp_PODL_getByFiltSpec @Lanciato, @KeyRich, @CodGruppo, @IdxMacchina, @DtInizio, @DtFine", Lanc, KeyRich, CodGrp, IdxMacc, DateFrom, DateTo)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
@@ -699,31 +701,38 @@ namespace MP.Data.Controllers
|
||||
public List<Macchine> MacchineGetFilt(string codGruppo)
|
||||
{
|
||||
List<Macchine> dbResult = new List<Macchine>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
try
|
||||
{
|
||||
if (codGruppo == "*")
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetMacchine
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetGrp2Macc
|
||||
.Where(g => g.CodGruppo == codGruppo)
|
||||
.Join(dbCtx.DbSetMacchine,
|
||||
g => g.IdxMacchina,
|
||||
m => m.IdxMacchina,
|
||||
(g, m) => m
|
||||
)
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
if (codGruppo == "*")
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetMacchine
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetGrp2Macc
|
||||
.Where(g => g.CodGruppo == codGruppo)
|
||||
.Join(dbCtx.DbSetMacchine,
|
||||
g => g.IdxMacchina,
|
||||
m => m.IdxMacchina,
|
||||
(g, m) => m
|
||||
)
|
||||
.AsNoTracking()
|
||||
.OrderBy(x => x.IdxMacchina)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in MacchineGetFilt{Environment.NewLine}{exc}");
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
@@ -821,32 +830,6 @@ namespace MP.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
#if false
|
||||
|
||||
/// <summary>
|
||||
/// Elenco PODL non avviati filtrati x articolo, KeyRich (che contiene stato)
|
||||
/// </summary>
|
||||
/// <param name="codArt">Cod articolo</param>
|
||||
/// <param name="keyRichPart">KeyRich (parziale) da cercare (es cod stato x yacht)</param>
|
||||
/// <returns></returns>
|
||||
public List<PODLModel> ListPODLFiltNOOdl(string codArt, string keyRichPart)
|
||||
{
|
||||
List<PODLModel> dbResult = new List<PODLModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetPODL
|
||||
.Where(x => (x.IdxOdl != 0) && (x.KeyRichiesta.Contains(keyRichPart) || keyRichPart == "*") && (codArt == "*" || x.CodArticolo.Contains(codArt)))
|
||||
.AsNoTracking()
|
||||
.Include(m => m.MachineNav)
|
||||
.Include(a => a.ArticoloNav)
|
||||
.OrderByDescending(x => x.InsertDate)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Chiusura ODL con eventuale conferma pezzi
|
||||
/// </summary>
|
||||
@@ -1027,6 +1010,7 @@ namespace MP.Data.Controllers
|
||||
.DbSetPODL
|
||||
.AsNoTracking()
|
||||
.Where(x => x.IdxPromessa == idxPODL)
|
||||
.Include(a => a.ArticoloNav)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -1073,7 +1057,7 @@ namespace MP.Data.Controllers
|
||||
/// <param name="pzPallet"></param>
|
||||
/// <param name="note"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> PODL_startSetup(PODLExpModel editRec, int matrOpr, double tcRich, int pzPallet, string note)
|
||||
public async Task<bool> PODL_startSetup(PODLExpModel editRec, int matrOpr, double tcRich, int pzPallet, string note, DateTime dtEvent)
|
||||
{
|
||||
bool answ = false;
|
||||
|
||||
@@ -1115,9 +1099,10 @@ namespace MP.Data.Controllers
|
||||
var TCRichAttr = new SqlParameter("@TCRichAttr", tcRich);
|
||||
var PzPallet = new SqlParameter("@PzPallet", pzPallet);
|
||||
var Note = new SqlParameter("@Note", note);
|
||||
var DtEvento = new SqlParameter("@dtEvento", dtEvent);
|
||||
var callResult = await dbCtx
|
||||
.Database
|
||||
.ExecuteSqlRawAsync("EXEC stp_ODL_inizioSetupPromessa @idxPromessa, @MatrOpr, @IdxMacchina, @TCRichAttr, @PzPallet, @Note", IdxPromessa, MatrOpr, IdxMacchina, TCRichAttr, PzPallet, Note);
|
||||
.ExecuteSqlRawAsync("EXEC stp_ODL_inizioSetupPromessa @idxPromessa, @MatrOpr, @IdxMacchina, @TCRichAttr, @PzPallet, @Note, @dtEvento", IdxPromessa, MatrOpr, IdxMacchina, TCRichAttr, PzPallet, Note, DtEvento);
|
||||
|
||||
answ = true;
|
||||
}
|
||||
@@ -1131,6 +1116,41 @@ namespace MP.Data.Controllers
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiamata salvataggio ricetta su DB
|
||||
/// </summary>
|
||||
/// <param name="idxPODL"></param>
|
||||
/// <param name="recipeName"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> PODL_updateRecipe(int idxPODL, string recipeName)
|
||||
{
|
||||
bool answ = false;
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = dbCtx
|
||||
.DbSetPODL
|
||||
.Where(x => x.IdxPromessa == idxPODL)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Recipe = recipeName;
|
||||
dbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
await dbCtx.SaveChangesAsync();
|
||||
answ = true;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante PODL_updateRecipe{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Eliminazione Record
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
public partial class DatiMacchineModel
|
||||
{
|
||||
public string IdxMacchina { get; set; }
|
||||
public bool? PalletChange { get; set; }
|
||||
public string CodArticoloA { get; set; }
|
||||
public string CodArticoloB { get; set; }
|
||||
public string SerialPort { get; set; }
|
||||
public int? RefreshPeriod { get; set; }
|
||||
public bool? Simulazione { get; set; }
|
||||
public bool? SimplePallet { get; set; }
|
||||
/// <summary>
|
||||
/// definisce se l'INSERT sia abilitato per la macchina (disabilitato in fase di ricostruzione batch...)
|
||||
/// </summary>
|
||||
public bool? InsEnabled { get; set; }
|
||||
/// <summary>
|
||||
/// definisce se sia abilitata la registrazione di TUTTI gli invii di dati in ingresso da questa specifica macchina
|
||||
/// </summary>
|
||||
public bool SLogEnabled { get; set; }
|
||||
/// <summary>
|
||||
/// Abilita o meno il trigger su DiarioDiBordo x ricalcolo eventi
|
||||
/// </summary>
|
||||
public bool? IsTrigerDbon { get; set; }
|
||||
/// <summary>
|
||||
/// Indica se la macchina abbia un COUNTER (assoluto) o meno, tipicamente true x IOB-WIN, false per IOB-PI
|
||||
/// </summary>
|
||||
public bool HasCounter { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
public partial class KeepAliveModel
|
||||
{
|
||||
public string IdxMacchina { get; set; }
|
||||
public DateTime? DataOraServer { get; set; }
|
||||
public DateTime? DataOraMacchina { get; set; }
|
||||
public DateTime? DataOraStart { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -17,9 +17,44 @@ namespace MP.Data.DatabaseModels
|
||||
|
||||
[Key]
|
||||
public string IdxMacchina { get; set; }
|
||||
/// <summary>
|
||||
/// Cod macchina
|
||||
/// </summary>
|
||||
public string CodMacchina { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Nome macchina
|
||||
/// </summary>
|
||||
public string Nome { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Descrizione macchina
|
||||
/// </summary>
|
||||
public string Descrizione { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Patch del file json di configurazione di una ricetta
|
||||
/// </summary>
|
||||
public string RecipePath { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Path (assoluto!) dell'archivio ricette da impiegare
|
||||
/// </summary>
|
||||
public string RecipeArchivePath { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Indica se abbia ricetta calcolata
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool hasRecipeCalc
|
||||
{
|
||||
get => !string.IsNullOrEmpty(RecipePath);
|
||||
}
|
||||
/// <summary>
|
||||
/// Indica se abbia ricetta calcolata
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool hasRecipeArch
|
||||
{
|
||||
get => !string.IsNullOrEmpty(RecipeArchivePath);
|
||||
}
|
||||
|
||||
//public string Note { get; set; } = "";
|
||||
//public string url { get; set; } = "";
|
||||
//public string locazione { get; set; } = "";
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
public partial class Macchine2SlaveModel
|
||||
{
|
||||
public string IdxMacchina { get; set; }
|
||||
public string IdxMacchinaSlave { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,8 @@ namespace MP.Data.DatabaseModels
|
||||
public string CodMacchina { get; set; }
|
||||
public string Nome { get; set; }
|
||||
public string Url { get; set; }
|
||||
public int? IdxOdl { get; set; }
|
||||
public int? IdxOdl { get; set; } = 0;
|
||||
public int? IdxPOdl { get; set; } = 0;
|
||||
public string CodArticolo { get; set; }
|
||||
public string Disegno { get; set; }
|
||||
public int? NumPezzi { get; set; }
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace MP.Data.DatabaseModels
|
||||
[MaxLength(50)]
|
||||
public string CodCli { get; set; } = "";
|
||||
public DateTime InsertDate { get; set; } = DateTime.Now;
|
||||
[MaxLength(500)]
|
||||
public string Recipe { get; set; } = "";
|
||||
|
||||
[NotMapped]
|
||||
public string CodFase
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace MP.Data.DatabaseModels
|
||||
[MaxLength(50)]
|
||||
public string CodCli { get; set; } = "";
|
||||
public DateTime InsertDate { get; set; } = DateTime.Now;
|
||||
[MaxLength(500)]
|
||||
public string Recipe { get; set; } = "";
|
||||
|
||||
[NotMapped]
|
||||
public string CodFase
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
public partial class TransizioneIngressiModel
|
||||
{
|
||||
public int IdxFamigliaIngresso { get; set; }
|
||||
public int IdxMicroStato { get; set; }
|
||||
public int ValoreIngresso { get; set; }
|
||||
public int? IdxTipoEvento { get; set; }
|
||||
public int NextIdxMicroStato { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
public partial class VMSFDModel
|
||||
{
|
||||
public string IdxMacchina { get; set; }
|
||||
public string Codmacchina { get; set; }
|
||||
public bool PalletChange { get; set; }
|
||||
public string CodArticoloA { get; set; }
|
||||
public string CodArticoloB { get; set; }
|
||||
public bool SimplePallet { get; set; }
|
||||
public bool InsEnabled { get; set; }
|
||||
public bool SLogEnabled { get; set; }
|
||||
public int IdxFamigliaIngresso { get; set; }
|
||||
public int Multi { get; set; }
|
||||
public int BitFilt { get; set; }
|
||||
public int MaxVal { get; set; }
|
||||
public int Bsr { get; set; }
|
||||
public bool ExplodeBit { get; set; }
|
||||
public int NumBit { get; set; }
|
||||
public int IdxMicroStato { get; set; }
|
||||
public int IdxFamiglia { get; set; }
|
||||
public int IdxStato { get; set; }
|
||||
public string LastVal { get; set; }
|
||||
public string CodArticolo { get; set; }
|
||||
public double TempoCicloBase { get; set; }
|
||||
public int PzPalletProd { get; set; }
|
||||
public int MatrOpr { get; set; }
|
||||
public string Pallet { get; set; }
|
||||
public string CodMaccArticolo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,8 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.9" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.19.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NLog" Version="5.1.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,283 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MP.Data.Conf;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
namespace MP.Data.MgModels
|
||||
{
|
||||
[BsonIgnoreExtraElements]
|
||||
public class RecipeModel
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init vuoto
|
||||
/// </summary>
|
||||
public RecipeModel()
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// Init da configurazione di base
|
||||
/// </summary>
|
||||
/// <param name="IdxPODL">idx PODL</param>
|
||||
/// <param name="OrigConfig"></param>
|
||||
/// <param name="CalcArgs">Dizionario argomenti x decodifica (es cod articolo, descrizione...)</param>
|
||||
public RecipeModel(int IdxPODL, RecipeConfig OrigConfig, Dictionary<string, string> CalcArgs)
|
||||
{
|
||||
this.IdxPODL = IdxPODL;
|
||||
this.TemplateFile = OrigConfig.TemplateFile;
|
||||
this.HeadConf = OrigConfig.HeadConf;
|
||||
this.RowsConf = OrigConfig.RowsConf;
|
||||
// init oggetti tipizzati da valori conf ricevuti
|
||||
this.HeadVal = ElementConverter(this.HeadConf.ListKeys, CalcArgs);
|
||||
// aggiungo args x gestione contatori righe...
|
||||
CalcArgs.Add("RowNum", $"0");
|
||||
CalcArgs.Add("RowTot", $"{OrigConfig.NumRow}");
|
||||
// aggiungo righe elementi..
|
||||
for (int i = 1; i <= OrigConfig.NumRow; i++)
|
||||
{
|
||||
// valore calcolato numero riga gestito ad ogni iterazione
|
||||
CalcArgs["RowNum"] = $"{i}";
|
||||
this.RowsVal.Add($"{i}", ElementConverter(this.RowsConf.ListKeys, CalcArgs));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunta righe
|
||||
/// </summary>
|
||||
/// <param name="CalcArgs"></param>
|
||||
public List<Element> getNewRow(Dictionary<string, string> CalcArgs)
|
||||
{
|
||||
List<Element> rowList = new List<Element>();
|
||||
rowList = ElementConverter(this.RowsConf.ListKeys, CalcArgs);
|
||||
return rowList;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Ricetta in formato calcolato (string)
|
||||
/// </summary>
|
||||
public string CalcRecipe { get; set; } = "";
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Configurazione ricetta x header
|
||||
/// </summary>
|
||||
public RecipeBlockConfig HeadConf { get; set; } = new RecipeBlockConfig();
|
||||
|
||||
/// <summary>
|
||||
/// Lista element x testata ricetta
|
||||
/// </summary>
|
||||
public List<Element> HeadVal { get; set; } = new List<Element>();
|
||||
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// idx ODL di riferimento
|
||||
/// </summary>
|
||||
public int IdxODL { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Idx PODL di riferimento
|
||||
/// </summary>
|
||||
public int IdxPODL { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Configurazione ricetta x rows
|
||||
/// </summary>
|
||||
public RecipeBlockConfig RowsConf { get; set; } = new RecipeBlockConfig();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario di righe, ognuna come Lista element
|
||||
/// </summary>
|
||||
public Dictionary<string, List<Element>> RowsVal { get; set; } = new Dictionary<string, List<Element>>();
|
||||
|
||||
/// <summary>
|
||||
/// File di configurazione template ricetta
|
||||
/// </summary>
|
||||
public string TemplateFile { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Converte il dizionario in List Element
|
||||
/// </summary>
|
||||
public static List<Element> ElementConverter(Dictionary<string, string> ListKeys, Dictionary<string, string> CalcArgs)
|
||||
{
|
||||
List<Element> ListObj = ListKeys
|
||||
.Select(x => new Element(x.Key, x.Value, CalcArgs))
|
||||
.ToList();
|
||||
return ListObj;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Public Classes
|
||||
|
||||
/// <summary>
|
||||
/// Elemento unitario con cui costruire la ricetta
|
||||
/// </summary>
|
||||
public class Element
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init classe da valore kvp
|
||||
/// </summary>
|
||||
/// <param name="rawKey">Chiave item</param>
|
||||
/// <param name="rawVal">Valore grezzo item</param>
|
||||
public Element(string rawKey, string rawVal, Dictionary<string, string> CalcArgs)
|
||||
{
|
||||
this.Key = rawKey;
|
||||
this.OrigVal = rawVal;
|
||||
this.Value = rawVal;
|
||||
// cerco se ho uno dei 3 caratteri (C/E/F/S):
|
||||
if (rawVal.Length >= 2 && rawVal.Substring(1, 1) == ":")
|
||||
{
|
||||
string selTipo = rawVal.Substring(0, 2);
|
||||
switch (selTipo)
|
||||
{
|
||||
case "C:":
|
||||
this.Type = KeyType.Calc;
|
||||
// recupero item x ricerca in dizionario...
|
||||
string cKey = rawVal.Substring(2);
|
||||
if (CalcArgs.ContainsKey(cKey))
|
||||
{
|
||||
this.Value = CalcArgs[cKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = cKey;
|
||||
}
|
||||
break;
|
||||
|
||||
case "E:":
|
||||
this.Type = KeyType.Enum;
|
||||
this.Value = "";
|
||||
this.EnumType = rawVal.Substring(2);
|
||||
break;
|
||||
|
||||
case "F:":
|
||||
this.Type = KeyType.Fixed;
|
||||
this.Value = rawVal.Substring(2);
|
||||
break;
|
||||
|
||||
case "S:":
|
||||
this.Type = KeyType.Calc;
|
||||
// recupero item x ricerca in dizionario...
|
||||
string sKey = rawVal.Substring(2);
|
||||
if (CalcArgs.ContainsKey(sKey))
|
||||
{
|
||||
this.Value = CalcArgs[sKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Value = sKey;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
this.Type = KeyType.None;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Type = KeyType.Free;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is Element item))
|
||||
return false;
|
||||
|
||||
if (Key != item.Key)
|
||||
return false;
|
||||
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
|
||||
if (OrigVal != item.OrigVal)
|
||||
return false;
|
||||
|
||||
if (Type != item.Type)
|
||||
return false;
|
||||
|
||||
if (EnumType != item.EnumType)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
#region Public Enums
|
||||
|
||||
/// <summary>
|
||||
/// Tipi di valore ammessi
|
||||
/// </summary>
|
||||
public enum KeyType
|
||||
{
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// Campo calcolato (NON modificabile)
|
||||
/// </summary>
|
||||
Calc,
|
||||
/// <summary>
|
||||
/// Valore da Enum
|
||||
/// </summary>
|
||||
Enum,
|
||||
/// <summary>
|
||||
/// Valore fisso
|
||||
/// </summary>
|
||||
Fixed,
|
||||
/// <summary>
|
||||
/// Valore libero
|
||||
/// </summary>
|
||||
Free,
|
||||
/// <summary>
|
||||
/// Campo suggerito (=calcolato modificabile)
|
||||
/// </summary>
|
||||
Suggested
|
||||
}
|
||||
|
||||
#endregion Public Enums
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[NotMapped]
|
||||
public string EnumType { get; set; } = "";
|
||||
|
||||
[NotMapped]
|
||||
public string Key { get; set; } = "";
|
||||
|
||||
public string OrigVal { get; set; } = "";
|
||||
|
||||
[NotMapped]
|
||||
public KeyType Type { get; set; } = KeyType.None;
|
||||
|
||||
[NotMapped]
|
||||
public string Value { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
#endregion Public Classes
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,11 @@ namespace MP.Data
|
||||
public virtual DbSet<VocabolarioModel> DbSetVocabolario { get; set; }
|
||||
public virtual DbSet<AnagOperatoriModel> DbOperatori { get; set; }
|
||||
public virtual DbSet<Gruppi2MaccModel> DbSetGrp2Macc { get; set; }
|
||||
public virtual DbSet<DatiMacchineModel> DbSetDatiMacchine { get; set; }
|
||||
public virtual DbSet<VMSFDModel> DbSetMSFD { get; set; }
|
||||
public virtual DbSet<Macchine2SlaveModel> DbSetM2S { get; set; }
|
||||
public virtual DbSet<TransizioneIngressiModel> DbSetSMI { get; set; }
|
||||
public virtual DbSet<KeepAliveModel> DbSetKeepAlive { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -322,6 +327,146 @@ namespace MP.Data
|
||||
|
||||
});
|
||||
|
||||
modelBuilder.Entity<DatiMacchineModel>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.IdxMacchina);
|
||||
|
||||
entity.ToTable("DatiMacchine");
|
||||
|
||||
entity.Property(e => e.IdxMacchina)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("idxMacchina");
|
||||
|
||||
entity.Property(e => e.CodArticoloA)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("CodArticolo_A");
|
||||
|
||||
entity.Property(e => e.CodArticoloB)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("CodArticolo_B");
|
||||
|
||||
entity.Property(e => e.HasCounter)
|
||||
.HasColumnName("hasCounter")
|
||||
.HasComment("Indica se la macchina abbia un COUNTER (assoluto) o meno, tipicamente true x IOB-WIN, false per IOB-PI");
|
||||
|
||||
entity.Property(e => e.InsEnabled)
|
||||
.HasColumnName("insEnabled")
|
||||
.HasDefaultValueSql("((1))")
|
||||
.HasComment("definisce se l'INSERT sia abilitato per la macchina (disabilitato in fase di ricostruzione batch...)");
|
||||
|
||||
entity.Property(e => e.IsTrigerDbon)
|
||||
.IsRequired()
|
||||
.HasColumnName("isTrigerDBOn")
|
||||
.HasDefaultValueSql("((1))")
|
||||
.HasComment("Abilita o meno il trigger su DiarioDiBordo x ricalcolo eventi");
|
||||
|
||||
entity.Property(e => e.PalletChange).HasColumnName("palletChange");
|
||||
|
||||
entity.Property(e => e.RefreshPeriod).HasColumnName("refreshPeriod");
|
||||
|
||||
entity.Property(e => e.SLogEnabled)
|
||||
.HasColumnName("sLogEnabled")
|
||||
.HasComment("definisce se sia abilitata la registrazione di TUTTI gli invii di dati in ingresso da questa specifica macchina");
|
||||
|
||||
entity.Property(e => e.SerialPort)
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("serialPort");
|
||||
|
||||
entity.Property(e => e.SimplePallet).HasColumnName("simplePallet");
|
||||
|
||||
entity.Property(e => e.Simulazione).HasColumnName("simulazione");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<VMSFDModel>(entity =>
|
||||
{
|
||||
entity.HasNoKey();
|
||||
|
||||
entity.ToView("v_MSFD");
|
||||
|
||||
entity.Property(e => e.Bsr).HasColumnName("BSR");
|
||||
|
||||
entity.Property(e => e.CodArticolo)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50);
|
||||
|
||||
entity.Property(e => e.CodArticoloA)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("CodArticolo_A");
|
||||
|
||||
entity.Property(e => e.CodArticoloB)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("CodArticolo_B");
|
||||
|
||||
entity.Property(e => e.CodMaccArticolo)
|
||||
.IsRequired()
|
||||
.HasMaxLength(103);
|
||||
|
||||
entity.Property(e => e.Codmacchina)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("codmacchina");
|
||||
|
||||
entity.Property(e => e.IdxMacchina)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("idxmacchina");
|
||||
|
||||
entity.Property(e => e.InsEnabled).HasColumnName("insEnabled");
|
||||
|
||||
entity.Property(e => e.LastVal)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnName("lastVal");
|
||||
|
||||
entity.Property(e => e.Pallet)
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnName("pallet");
|
||||
|
||||
entity.Property(e => e.PalletChange).HasColumnName("palletChange");
|
||||
|
||||
entity.Property(e => e.SLogEnabled).HasColumnName("sLogEnabled");
|
||||
|
||||
entity.Property(e => e.SimplePallet).HasColumnName("simplePallet");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Macchine2SlaveModel>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new { e.IdxMacchina, e.IdxMacchinaSlave })
|
||||
.HasName("PK_Macc2Slave");
|
||||
|
||||
entity.ToTable("Macchine2Slave");
|
||||
|
||||
entity.Property(e => e.IdxMacchina).HasMaxLength(50);
|
||||
|
||||
entity.Property(e => e.IdxMacchinaSlave).HasMaxLength(50);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<TransizioneIngressiModel>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new { e.IdxFamigliaIngresso, e.IdxMicroStato, e.ValoreIngresso });
|
||||
|
||||
entity.ToTable("TransizioneIngressi");
|
||||
|
||||
entity.Property(e => e.NextIdxMicroStato).HasColumnName("next_IdxMicroStato");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<KeepAliveModel>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.IdxMacchina);
|
||||
|
||||
entity.ToTable("KeepAlive");
|
||||
|
||||
entity.Property(e => e.IdxMacchina).HasMaxLength(50);
|
||||
|
||||
entity.Property(e => e.DataOraMacchina).HasColumnType("datetime");
|
||||
|
||||
entity.Property(e => e.DataOraStart).HasColumnType("datetime");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MP.Data.DatabaseModels;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -43,21 +44,89 @@ namespace MP.Data
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da
|
||||
/// funzionalita' DbConfig) + keyName richiesto...
|
||||
/// Hash dati STATUS x la macchina specificata
|
||||
/// </summary>
|
||||
public static string RedHash(string keyName)
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public static RedisKey dtMaccHash(string idxMacchina)
|
||||
{
|
||||
string answ = keyName;
|
||||
try
|
||||
return (RedisKey)$"{redisBaseAddr}DtMac:{idxMacchina}";
|
||||
}
|
||||
|
||||
public static string FormDurata(double durataMinuti)
|
||||
{
|
||||
string answ = "";
|
||||
TimeSpan tsDurata = TimeSpan.FromMinutes(durataMinuti);
|
||||
if (tsDurata.TotalDays < 1)
|
||||
{
|
||||
answ = $"MP:Data:{keyName}";
|
||||
answ = $"{tsDurata.Hours:00}h {tsDurata.Minutes:00}'";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = $"{tsDurata.Days}gg {tsDurata.Hours:00}h";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// RedisKey calcolata x tabella HSI
|
||||
/// </summary>
|
||||
/// <param name="idxFamIn"></param>
|
||||
/// <returns></returns>
|
||||
public static RedisKey hSMI(int idxFamIn)
|
||||
{
|
||||
return (RedisKey)$"{redisBaseAddr}hSMI:{idxFamIn}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inizializzazione con periodo e arrotondamento
|
||||
/// </summary>
|
||||
/// <param name="minRound"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime InitDatetime(DateTime dtRif, int minRound)
|
||||
{
|
||||
TimeSpan DayElapsed = dtRif.Subtract(dtRif.Date);
|
||||
int minDay = (int)Math.Ceiling((double)(DayElapsed.TotalMinutes / minRound)) * minRound;
|
||||
DateTime endRounded = DateTime.Today.AddMinutes(minDay);
|
||||
return endRounded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato
|
||||
/// dafunzionalita' DbConfig) + idxMacchina richiesto...
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public static RedisKey OptParHash(string idxMacchina)
|
||||
{
|
||||
return (RedisKey)$"{redisBaseAddr}OpPar:{idxMacchina}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da
|
||||
/// funzionalita' DbConfig) + idxMacchina richiesto...
|
||||
/// </summary>
|
||||
public static RedisKey RedHash(string keyName)
|
||||
{
|
||||
return (RedisKey)$"MP:Data:{keyName}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Formato RedisKey delal chaive richeista (completa)
|
||||
/// </summary>
|
||||
public static RedisKey RedKeyHash(string keyName)
|
||||
{
|
||||
return (RedisKey)$"{redisBaseAddr}{keyName}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Formato RedisValue delal chaive richeista (completa)
|
||||
/// </summary>
|
||||
public static RedisValue RedValue(string keyName)
|
||||
{
|
||||
return (RedisValue)$"{redisBaseAddr}{keyName}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua salvataggio in file di un generico oggetto in formato CSV
|
||||
/// </summary>
|
||||
@@ -78,36 +147,45 @@ namespace MP.Data
|
||||
await Task.Run(() => File.WriteAllLines(path, lines.ToArray()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inizializzazione con periodo e arrotondamento
|
||||
/// </summary>
|
||||
/// <param name="minRound"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTime InitDatetime(DateTime dtRif, int minRound)
|
||||
{
|
||||
TimeSpan DayElapsed = dtRif.Subtract(dtRif.Date);
|
||||
int minDay = (int)Math.Ceiling((double)(DayElapsed.TotalMinutes / minRound)) * minRound;
|
||||
DateTime endRounded = DateTime.Today.AddMinutes(minDay);
|
||||
return endRounded;
|
||||
}
|
||||
#endregion Public Methods
|
||||
|
||||
public static string FormDurata(double durataMinuti)
|
||||
{
|
||||
string answ = "";
|
||||
TimeSpan tsDurata = TimeSpan.FromMinutes(durataMinuti);
|
||||
if (tsDurata.TotalDays < 1)
|
||||
{
|
||||
answ = $"{tsDurata.Hours:00}h {tsDurata.Minutes:00}'";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = $"{tsDurata.Days}gg {tsDurata.Hours:00}h";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
#region Public Classes
|
||||
|
||||
public class POdlExt
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Clona un POdleExt, tutti i valori (compreso idxOdl)
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
/// <returns></returns>
|
||||
public static PODLExpModel clone(PODLExpModel selRec, bool resetOdl)
|
||||
{
|
||||
// creo record duplicato...
|
||||
PODLExpModel newRec = new PODLExpModel()
|
||||
{
|
||||
Attivabile = resetOdl ? false : selRec.Attivabile,
|
||||
CodArticolo = selRec.CodArticolo,
|
||||
CodCli = selRec.CodCli,
|
||||
CodGruppo = selRec.CodGruppo,
|
||||
DueDate = selRec.DueDate,
|
||||
IdxMacchina = selRec.IdxMacchina,
|
||||
IdxOdl = resetOdl ? 0 : selRec.IdxOdl,
|
||||
IdxPromessa = 0,
|
||||
InsertDate = selRec.InsertDate,
|
||||
KeyBCode = selRec.KeyBCode,
|
||||
KeyRichiesta = selRec.KeyRichiesta,
|
||||
Note = $"DUPLICATED - {selRec.Note}",
|
||||
NumPezzi = selRec.NumPezzi,
|
||||
Priorita = selRec.Priorita,
|
||||
PzPallet = selRec.PzPallet,
|
||||
Tcassegnato = selRec.Tcassegnato,
|
||||
Recipe = selRec.Recipe
|
||||
};
|
||||
return newRec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clona un POdleExt a POdl
|
||||
/// </summary>
|
||||
@@ -133,42 +211,46 @@ namespace MP.Data
|
||||
NumPezzi = selRec.NumPezzi,
|
||||
Priorita = selRec.Priorita,
|
||||
PzPallet = selRec.PzPallet,
|
||||
Tcassegnato = selRec.Tcassegnato
|
||||
Tcassegnato = selRec.Tcassegnato,
|
||||
Recipe = selRec.Recipe
|
||||
};
|
||||
return newRec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clona un POdleExt, tutti i valori (compreso idxOdl)
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
/// <returns></returns>
|
||||
public static PODLExpModel clone(PODLExpModel selRec, bool resetOdl)
|
||||
{
|
||||
// creo record duplicato...
|
||||
PODLExpModel newRec = new PODLExpModel()
|
||||
{
|
||||
Attivabile = selRec.Attivabile,
|
||||
CodArticolo = selRec.CodArticolo,
|
||||
CodCli = selRec.CodCli,
|
||||
CodGruppo = selRec.CodGruppo,
|
||||
DueDate = selRec.DueDate,
|
||||
IdxMacchina = selRec.IdxMacchina,
|
||||
IdxOdl = resetOdl ? 0 : selRec.IdxOdl,
|
||||
IdxPromessa = 0,
|
||||
InsertDate = selRec.InsertDate,
|
||||
KeyBCode = selRec.KeyBCode,
|
||||
KeyRichiesta = selRec.KeyRichiesta,
|
||||
Note = $"DUPLICATED - {selRec.Note}",
|
||||
NumPezzi = selRec.NumPezzi,
|
||||
Priorita = selRec.Priorita,
|
||||
PzPallet = selRec.PzPallet,
|
||||
Tcassegnato = selRec.Tcassegnato
|
||||
};
|
||||
return newRec;
|
||||
}
|
||||
#endregion Public Methods
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
#endregion Public Classes
|
||||
|
||||
#region Private Fields
|
||||
|
||||
public const string redisActionReq = redisBaseAddr + "Action:Req";
|
||||
public const string redisAnagGruppi = redisBaseAddr + "Cache:AnagGruppi";
|
||||
public const string redisArtByDossier = redisBaseAddr + "Cache:ArtByDossier";
|
||||
public const string redisArtList = redisBaseAddr + "Cache:ArtList";
|
||||
public const string redisBaseAddr = "MP:";
|
||||
public const string redisConfKey = redisBaseAddr + "Cache:Config";
|
||||
public const string redisDossByMac = redisBaseAddr + "Cache:DossByMac";
|
||||
public const string redisFluxByMac = redisBaseAddr + "Cache:FluxByMac";
|
||||
public const string redisFluxLogFilt = redisBaseAddr + "Cache:FluxLogFilt";
|
||||
public const string redisGiacenzaList = redisBaseAddr + "Cache:GiacenzaList";
|
||||
public const string redisMacByFlux = redisBaseAddr + "Cache:MacByFlux";
|
||||
public const string redisMacList = redisBaseAddr + "Cache:MacList";
|
||||
public const string redisMacRecipeConf = redisBaseAddr + "Cache:RecipeConf";
|
||||
public const string redisMacRecipePath = redisBaseAddr + "Cache:RecipePath";
|
||||
public const string redisOdlByBatch = redisXdlData + "OdlByBatch";
|
||||
public const string redisOdlCurrByMac = redisXdlData + "OdlByMac";
|
||||
public const string redisOdlList = redisXdlData + "OdlList";
|
||||
public const string redisParamPageExp = redisBaseAddr + "Cache:ParamPage";
|
||||
public const string redisPOdlByOdl = redisXdlData + "POdlByOdl";
|
||||
public const string redisPOdlByPOdl = redisXdlData + "POdlByPOdl";
|
||||
public const string redisPOdlList = redisXdlData + "POdlList";
|
||||
public const string redisRecipeConf = redisBaseAddr + "Cache:Recipe:Conf";
|
||||
public const string redisStatoCom = redisBaseAddr + "Cache:StatoCom";
|
||||
public const string redisTipoArt = redisBaseAddr + "Cache:TipoArt";
|
||||
public const string redisVocabolario = redisBaseAddr + "Cache:Vocabolario";
|
||||
public const string redisXdlData = redisBaseAddr + "Cache:XDL:";
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -5,19 +5,21 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.9">
|
||||
<PackageReference Include="DiffMatchPatch" Version="1.0.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.13">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.9">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.13" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.13">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="NLog" Version="4.7.11" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.13" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.INVE</RootNamespace>
|
||||
<Version>6.16.2302.2309</Version>
|
||||
<Version>6.16.2306.915</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
|
||||
<PackageReference Include="Blazored.SessionStorage" Version="2.2.0" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.1.2302.311" />
|
||||
<PackageReference Include="Blazored.SessionStorage" Version="2.3.0" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.3.2302.507" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.9" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -8,11 +8,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis03.egalware.com/MP/INVE</SiteUrlToLaunchAfterPublish>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis04.egalware.com/MP/INVE</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>fd5b477e-96a4-42f6-b2e8-7fc221c9971c</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://iis03.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<MSDeployServiceURL>https://iis04.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/MP/INVE</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOINVE </i>
|
||||
<h4>Versione: 6.16.2302.2309</h4>
|
||||
<h4>Versione: 6.16.2306.915</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2302.2309</version>
|
||||
<version>6.16.2306.915</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {}
|
||||
}
|
||||
@@ -0,0 +1,378 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MP.Data;
|
||||
using MP.IOC.Data;
|
||||
using NLog;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace MP.IOC.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class BenchController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public BenchController(IConfiguration configuration, MpDataService DataService)
|
||||
{
|
||||
Log.Info("Starting BenchController");
|
||||
_configuration = configuration;
|
||||
DService = DataService;
|
||||
Log.Info("Avviata BenchController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Conteggio chiavi REDIS dato pattern api/Bench/CountKeys
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("CountKeys")]
|
||||
public string CountKeys(string? id)
|
||||
{
|
||||
string answ = "ND";
|
||||
if (id == null) id = "";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// conto quanti oggetti ho in memoria REDIS...
|
||||
string groupHash = ""; // DataLayer.mHash("");
|
||||
if (id.Length > 0)
|
||||
{
|
||||
groupHash += id + ":";
|
||||
}
|
||||
groupHash += "*";
|
||||
answ = $"Trovate {DService.RedisCountKey(groupHash)} Hash per {groupHash}";
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += $"{Environment.NewLine}Elapsed: {ts.TotalMilliseconds}ms";
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bench recupero dati macchina api/Bench/DtMac?id=SIMUL_01
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("DatiMacc")]
|
||||
public string DatiMacc(string id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se id nullo --> KO!
|
||||
if (id == null)
|
||||
{
|
||||
answ = "KO";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "";
|
||||
try
|
||||
{
|
||||
Dictionary<string, string> valori = DService.ResetDatiMacchina(id);
|
||||
foreach (var item in valori)
|
||||
{
|
||||
answ += $"{item.Key}|{item.Value}{Environment.NewLine}";
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += $"{Environment.NewLine}Elapsed: {ts.TotalMilliseconds}ms";
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary> Recupera riga traduzione microstato x processing da HASH table
|
||||
/// api/Bench/FindSMI?id=60&idxMS=3&valore=1 </summary> <param name="id"></param> <param
|
||||
/// name="idxMS"></param> <param name="valore"></param> <returns></returns>
|
||||
[HttpGet("FindSMI")]
|
||||
public string FindSMI(int? id, int? idxMS, int? valore)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se id nullo --> KO!
|
||||
if (id == null)
|
||||
{
|
||||
answ = "KO";
|
||||
}
|
||||
else
|
||||
{
|
||||
// recupero dati x sapere quale famiglia SMI è necessaria e quale stato / segnale si
|
||||
// sia ricevuto
|
||||
int idxFamIn = Convert.ToInt32(id);
|
||||
int idxMicroStato = Convert.ToInt32(idxMS);
|
||||
int valIOB = Convert.ToInt32(valore);
|
||||
// recupero microstato macchina da chiave relativa
|
||||
answ = "";
|
||||
try
|
||||
{
|
||||
var fiHASH = Utils.hSMI(idxFamIn);
|
||||
string outVal = "";
|
||||
bool trovato = DService.RedisHashPresent(fiHASH);
|
||||
if (!trovato)
|
||||
{
|
||||
// ricarico tabella!
|
||||
KeyValuePair<string, string>[] valori = DService.StateMachInByKey(idxFamIn);
|
||||
answ = string.Format("Ricaricata SMI per famiglia {0}<br/>", fiHASH);
|
||||
}
|
||||
|
||||
// recupero singolo valore (stringa) x chiave
|
||||
outVal = DService.ValoreSMI(idxFamIn, idxMicroStato, valIOB);
|
||||
// mostro output
|
||||
answ += $"idxFamIN: {idxFamIn} | idxMS: {idxMicroStato} | valIOB: {valIOB} | out: {outVal}";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += $"{Environment.NewLine}Total Time Elapsed: {ts.TotalMilliseconds}ms";
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test verifica insert enabled x macchina
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("InsEnab")]
|
||||
public string InsEnab(string id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se id nullo --> KO!
|
||||
if (id == null)
|
||||
{
|
||||
answ = "KO";
|
||||
}
|
||||
else
|
||||
{
|
||||
// recupero microstato macchina da chiave relativa
|
||||
answ = "";
|
||||
try
|
||||
{
|
||||
answ += $"Macchina {id}, insEnabled {DService.IobInsEnab(id)}{Environment.NewLine}";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += $"{Environment.NewLine}Total Time Elapsed: {ts.TotalMilliseconds}ms";
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// pulizia dati api/Bench/RClean?id=100
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("RClean")]
|
||||
public string RClean(int? id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se id nullo --> KO!
|
||||
if (id == null)
|
||||
{
|
||||
answ = "KO";
|
||||
}
|
||||
else
|
||||
{
|
||||
string chiave;
|
||||
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[2];
|
||||
try
|
||||
{
|
||||
// svuoto i precedenti hash... CICLO!
|
||||
for (int i = 0; i < id; i++)
|
||||
{
|
||||
chiave = string.Format("test:{0}", i);
|
||||
DService.RedisDelKey(chiave);
|
||||
}
|
||||
answ = "OK";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += $"{Environment.NewLine}Elapsed: {ts.TotalMilliseconds}ms";
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
|
||||
//// GET: IOB (è un check alive)
|
||||
//public string Index()
|
||||
//{
|
||||
// return "OK";
|
||||
//}
|
||||
/// <summary>
|
||||
/// Setup dati di test hash api/Bench/RSetup?id=100
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("RSetup")]
|
||||
public string RSetup(int? id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se id nullo --> KO!
|
||||
if (id == null)
|
||||
{
|
||||
answ = "KO";
|
||||
}
|
||||
else
|
||||
{
|
||||
string chiave;
|
||||
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[2];
|
||||
try
|
||||
{
|
||||
// salvo il datasetet come insieme di hash in redis...
|
||||
for (int i = 0; i < id; i++)
|
||||
{
|
||||
chiave = string.Format("test:{0}", i);
|
||||
valori[0] = new KeyValuePair<string, string>("numero", i.ToString());
|
||||
valori[1] = new KeyValuePair<string, string>("doppio", (i * 2).ToString());
|
||||
DService.RedisSetHash(chiave, valori);
|
||||
}
|
||||
answ = "OK";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += $"{Environment.NewLine}Elapsed: {ts.TotalMilliseconds}ms";
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupero singolo valore hash api/Bench/RSingleHash?id=50
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("RSingleHash")]
|
||||
public string RSingleHash(int? id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se id nullo --> KO!
|
||||
if (id == null)
|
||||
{
|
||||
answ = "KO";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "";
|
||||
string chiave;
|
||||
KeyValuePair<string, string>[] valori = new KeyValuePair<string, string>[2];
|
||||
try
|
||||
{
|
||||
// ora restituisco record completo dell'hash con ID indicato
|
||||
chiave = string.Format("test:{0}", id);
|
||||
valori = DService.RedisGetHash(chiave);
|
||||
foreach (var item in valori)
|
||||
{
|
||||
answ += string.Format("{0}|{1}<br/>", item.Key, item.Value);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += $"{Environment.NewLine}Elapsed: {ts.TotalMilliseconds}ms";
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lettura tab StateMachineIngressi
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("StateMachineIn")]
|
||||
public string StateMachineIn(int? id)
|
||||
{
|
||||
string answ = "ND";
|
||||
long splitTime = 0;
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se id nullo --> KO!
|
||||
if (id == null)
|
||||
{
|
||||
answ = "KO";
|
||||
}
|
||||
else
|
||||
{
|
||||
int idxFamIn = Convert.ToInt32(id);
|
||||
answ = "";
|
||||
try
|
||||
{
|
||||
KeyValuePair<string, string>[] valori = DService.StateMachInByKey(idxFamIn);
|
||||
splitTime = stopWatch.ElapsedMilliseconds;
|
||||
foreach (var item in valori)
|
||||
{
|
||||
answ += $"{item.Key}|{item.Value}{Environment.NewLine}";
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
// accodo tempo!
|
||||
answ += $"{Environment.NewLine}ReadTime: {splitTime}ms<br>Total Time Elapsed: {ts.TotalMilliseconds}ms";
|
||||
// ritorno
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected MpDataService DService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MP.IOC.Data;
|
||||
using NLog;
|
||||
using NLog.Fluent;
|
||||
|
||||
namespace MP.IOC.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class RecipeArchiveController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public RecipeArchiveController(IConfiguration configuration, MpDataService DataService)
|
||||
{
|
||||
Log.Info("Starting RecipeArchiveController");
|
||||
_configuration = configuration;
|
||||
DService = DataService;
|
||||
Log.Info("Avviata classe RecipeArchiveController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
[HttpGet("GetByPODL")]
|
||||
public async Task<string> GetByPODL(string idxMacc, int idxPODL)
|
||||
{
|
||||
string answ = "NO DATA";
|
||||
string archPath = await DService.MacchineRecipeArchive(idxMacc);
|
||||
var podlData = await DService.POdlGetByKey(idxPODL);
|
||||
if (podlData != null)
|
||||
{
|
||||
string fileName = podlData?.Recipe ?? "";
|
||||
string fullPath = Path.Combine(archPath, fileName);
|
||||
if (!string.IsNullOrEmpty(fullPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (System.IO.File.Exists(fullPath))
|
||||
{
|
||||
answ = System.IO.File.ReadAllText(fullPath);
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
Log.Error($"Errore in GetByPODL: contenuto file vuoto | idxMacc: {idxMacc} | idxPODL: {idxPODL}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Errore in GetByPODL: il file non esiste | fullPath {fullPath}");
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in GetByPODL:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Errore in GetByPODL: fullPath null ");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Errore in GetByPODL: podlData null | idxPODL: {idxPODL}");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
[HttpGet("GetFile")]
|
||||
public async Task<string> GetFile(string idxMacc, string fileName)
|
||||
{
|
||||
string answ = "NO DATA";
|
||||
string archPath = await DService.MacchineRecipeArchive(idxMacc);
|
||||
if (!string.IsNullOrEmpty(archPath))
|
||||
{
|
||||
string fullPath = Path.Combine(archPath, fileName);
|
||||
if (!string.IsNullOrEmpty(fullPath))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (System.IO.File.Exists(fullPath))
|
||||
{
|
||||
answ = System.IO.File.ReadAllText(fullPath);
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
Log.Error($"Errore in GetFile: contenuto file vuoto | idxMacc: {idxMacc} | fileName: {fileName}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Errore in GetFile: il file non esiste | fullPath {fullPath}");
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in GetFile:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Errore in GetFile: fullPath null ");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Errore in GetFile: archPath null ");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected MpDataService DService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MP.IOC.Data;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System.Xml;
|
||||
|
||||
namespace MP.IOC.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class RecipeController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public RecipeController(IConfiguration configuration, MpDataService DataService)
|
||||
{
|
||||
Log.Info("Starting RecipeController");
|
||||
_configuration = configuration;
|
||||
DService = DataService;
|
||||
Log.Info("Avviata RecipeController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
[HttpGet("GetRecipe")]
|
||||
public async Task<string> GetRecipe(int idxPODL)
|
||||
{
|
||||
string answ = "";
|
||||
var reqRecipe = await DService.RecipeGetByPODL(idxPODL);
|
||||
if (reqRecipe != null)
|
||||
{
|
||||
answ = DService.CalcRecipe(reqRecipe);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
[HttpGet("GetRecipeXML")]
|
||||
public async Task<string> GetRecipeXML(int idxPODL)
|
||||
{
|
||||
// aggiungo root node?
|
||||
string answ = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
// recupero versione json
|
||||
string rawData = await GetRecipe(idxPODL);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
XmlDocument doc = (XmlDocument)(JsonConvert.DeserializeXmlNode(rawData) ?? new XmlDocument());
|
||||
answ += doc.InnerXml;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected MpDataService DService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS04.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfile.pubxml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Properties\PublishProfiles\IIS01.pubxml.user" />
|
||||
<None Include="Properties\PublishProfiles\IIS02.pubxml.user" />
|
||||
<None Include="Properties\PublishProfiles\IIS04.pubxml.user" />
|
||||
<None Include="Properties\PublishProfiles\IISProfile.pubxml.user" />
|
||||
<None Include="wwwroot\images\LogoBlu.svg" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NLog" Version="5.1.1" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.90" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MP.Data\MP.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="logs\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="post-build.ps1">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
|
||||
autoReload="true"
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||
|
||||
<!-- optional, add some variables
|
||||
https://github.com/nlog/NLog/wiki/Configuration-file#variables
|
||||
-->
|
||||
<variable name="myvar" value="myvalue" />
|
||||
|
||||
<!--
|
||||
See https://github.com/nlog/nlog/wiki/Configuration-file
|
||||
for information on customizing logging rules and outputs.
|
||||
-->
|
||||
<targets>
|
||||
|
||||
<!--
|
||||
add your targets here
|
||||
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
|
||||
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Write events to a file with the date in the filename.
|
||||
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
|
||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||
-->
|
||||
<target xsi:type="File" name="fileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}" />
|
||||
<target xsi:type="ColoredConsole" name="consoleTarget" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true} | ${message}" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<!-- add your logging rules here -->
|
||||
|
||||
<!--
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
<logger name="*" minlevel="Debug" writeTo="consoleTarget" />
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -0,0 +1,42 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.IOC.Data;
|
||||
using StackExchange.Redis;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
ConfigurationManager configuration = builder.Configuration;
|
||||
// REDIS setup
|
||||
string connStringRedis = configuration.GetConnectionString("Redis");
|
||||
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
// avvio oggetto shared x redis...
|
||||
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
|
||||
builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
|
||||
builder.Services.AddSingleton<MpDataService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
// aggiunta x index.html
|
||||
app.UseDefaultFiles();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
@@ -8,12 +8,12 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis03.egalware.com/MP/CONF</SiteUrlToLaunchAfterPublish>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis01.egalware.com/MP/IOC/</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<ProjectGuid>b9f508bf-8503-4c25-b9ba-0fac411c44c5</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://iis03.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/MP/CONF</DeployIisAppPath>
|
||||
<MSDeployServiceURL>https://iis01.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/MP/IOC</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAdCoESbxryUqXde3FfEOCTwAAAAACAAAAAAADZgAAwAAAABAAAAAFrH1vByj45Qn06hO/OH6tAAAAAASAAACgAAAAEAAAAIUK5NiEpc4lc11Op6/CLx8YAAAAMecN12fzIN9e3E8R/nu0ATe2PAsMy7M8FAAAAKbUyki2vkSFehjbpB8wCVVVa055</EncryptedPassword>
|
||||
<History>True|2023-02-14T16:41:26.3850692Z;True|2023-02-14T17:31:39.4933399+01:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis02.egalware.com/MP/IOC/</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>b9f508bf-8503-4c25-b9ba-0fac411c44c5</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://iis02.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/MP/IOC</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>true</_SavePWD>
|
||||
<_TargetId>IISWebDeploy</_TargetId>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>True|2023-02-14T16:32:07.9453073Z;False|2023-02-14T17:31:50.9060110+01:00;</History>
|
||||
<LastFailureDetails />
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAdCoESbxryUqXde3FfEOCTwAAAAACAAAAAAADZgAAwAAAABAAAAC6FuNtbpZUzsFZLQReZJOfAAAAAASAAACgAAAAEAAAAHXUJEN7BcEz0Rbf/AytTOEYAAAAEYjs8Vh5bxNPfuHf+Z3aOlB5DMeiO3/ZFAAAAAexhcaoQB8esVVx8ce07foEZ9w8</EncryptedPassword>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis04.egalware.com/MP/IOC/</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>b9f508bf-8503-4c25-b9ba-0fac411c44c5</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://iis04.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/MP/IOC</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>true</_SavePWD>
|
||||
<_TargetId>IISWebDeploy</_TargetId>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAdCoESbxryUqXde3FfEOCTwAAAAACAAAAAAADZgAAwAAAABAAAAA4RHhAczKBrqcWb9wTts9MAAAAAASAAACgAAAAEAAAADuXXLg1UwfWWAQCYxeL4dMYAAAAyZESMfjE+pkPcigypRiw/GQB+tgD1heZFAAAAIHYbrESc8bdGRBpOM5alZb6CgMN</EncryptedPassword>
|
||||
<History>True|2023-04-04T15:18:49.1877310Z;True|2023-02-14T17:32:35.6156799+01:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>Package</WebPublishMethod>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
|
||||
<DesktopBuildPackageLocation>bin\publish\MP.IOC.zip</DesktopBuildPackageLocation>
|
||||
<PackageAsSingleFile>true</PackageAsSingleFile>
|
||||
<DeployIisAppPath>Default Web Site/MP/IOC</DeployIisAppPath>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<SelfContained>false</SelfContained>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<History>True|2021-05-27T09:13:55.8234781Z;True|2021-05-26T19:51:13.5051479+02:00;True|2021-05-26T19:51:04.9283608+02:00;True|2021-05-25T16:38:26.4142377+02:00;</History>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:57791",
|
||||
"sslPort": 44362
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"MP.IOC": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7050;http://localhost:5264",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"TemplateFile": "Fimat/TemplateOutput.tpl",
|
||||
"NumRow": 2,
|
||||
"HeadConf": {
|
||||
"ListKeys": {
|
||||
"CustDrumCode": "F:",
|
||||
"Taglio-N": "F:1",
|
||||
"Taglio-D": "F:4",
|
||||
"ServiceType": "F:N",
|
||||
"RecipeType": "F:C",
|
||||
"ViscoName": "F:",
|
||||
"ViscoValue": "F:0",
|
||||
"LotID": "C:IdxPODL",
|
||||
"OrderCode": "C:CodePODL",
|
||||
"Article": "C:CodArticolo",
|
||||
"Info1": "C:DescArticolo",
|
||||
"Prio": "E:Priority",
|
||||
"DrumType": "E:DrumType",
|
||||
"Customer": "Tenditalia",
|
||||
"Design": "DESIGN",
|
||||
"Screen": "SCREEN",
|
||||
"Variant": "VARIANT",
|
||||
"RecName": "CODE000",
|
||||
"Series": "E:Series",
|
||||
"UM": "E:UM",
|
||||
"DosType": "E:DosType",
|
||||
"Note1": "",
|
||||
"Note2": "",
|
||||
"Sequence": "1",
|
||||
"SequenceTot": "8",
|
||||
"Quantity-kg": "1.00"
|
||||
},
|
||||
"EnumVal": {
|
||||
"Priority": {
|
||||
"N": "Normal",
|
||||
"H": "Hight"
|
||||
},
|
||||
"DrumType": {
|
||||
"1": "Small",
|
||||
"2": "Medium",
|
||||
"3": "Big"
|
||||
},
|
||||
"Series": {
|
||||
"1": "Series 1",
|
||||
"2": "Series 2"
|
||||
},
|
||||
"UM": {
|
||||
"0": "Percentage",
|
||||
"1": "g/kg",
|
||||
"2": "parts for colour and g/kg for thickener",
|
||||
"3": "gr and parts for thickener",
|
||||
"4": "g/kg for colour and parts for thickener",
|
||||
"5": "parts for colour and parts for thickener"
|
||||
},
|
||||
"DosType": {
|
||||
"P": "Production",
|
||||
"S": "Sampling"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RowsConf": {
|
||||
"ListKeys": {
|
||||
"Weight-gr-prev": "F:0.00",
|
||||
"CompNumber": "C:RowNum",
|
||||
"ColourCode": "C001",
|
||||
"Description": "COLOR1",
|
||||
"TypComp": "E:ColType",
|
||||
"PartsWeight": "1.00",
|
||||
"PartsPerc": "0.10",
|
||||
"Weight-gr": "30.00"
|
||||
},
|
||||
"EnumVal": {
|
||||
"ColType": {
|
||||
"C": "Color",
|
||||
"A": "Thickener",
|
||||
"X": "Auxiliaries"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"A_Recipe": {
|
||||
"DesRecipe": {
|
||||
"DesData": {
|
||||
||PlaceholderHeader||
|
||||
}
|
||||
},
|
||||
"ColRecipe": [
|
||||
||SROW:{"ColData":{||
|
||||
||PlaceholderRows||
|
||||
||EROW:}}||
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"A_Recipe": {
|
||||
"DesRecipe": {
|
||||
"DesData": {
|
||||
"Prio": "N",
|
||||
"DrumType": "1",
|
||||
"CustDrumCode": "123456789012",
|
||||
"OrderCode": "ORDERCODE",
|
||||
"Customer": "CUSTOMER",
|
||||
"Design": "DESIGN",
|
||||
"Screen": "SCREEN",
|
||||
"Variant": "VARIANT",
|
||||
"RecName": "RECNAME",
|
||||
"Article": "ARTICLE",
|
||||
"LotID": "LOTID",
|
||||
"Info1": "INFO1",
|
||||
"ViscoName": "",
|
||||
"Taglio-N": "1",
|
||||
"Taglio-D": "4",
|
||||
"Sequence": "1",
|
||||
"SequenceTot": "8",
|
||||
"Series": "2",
|
||||
"ViscoValue": "0",
|
||||
"UM": "1",
|
||||
"DosType": "P",
|
||||
"ServiceType": "N",
|
||||
"RecipeType": "C",
|
||||
"Note1": "NOTE1",
|
||||
"Note2": "NOTE2",
|
||||
"Quantity-kg": "10.00"
|
||||
}
|
||||
},
|
||||
"ColRecipe": [
|
||||
{
|
||||
"ColData": {
|
||||
"CompNumber": "1",
|
||||
"ColourCode": "C001",
|
||||
"Description": "COLOR1",
|
||||
"TypComp": "C",
|
||||
"PartsWeight": "1.00",
|
||||
"PartsPerc": "0.10",
|
||||
"Weight-gr": "30.00",
|
||||
"Weight-gr-prev": "0.00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ColData": {
|
||||
"CompNumber": "2",
|
||||
"ColourCode": "THICK1",
|
||||
"Description": "Thickner 1",
|
||||
"TypComp": "A",
|
||||
"PartsWeight": "997.00",
|
||||
"PartsPerc": "99.70",
|
||||
"Weight-gr": "9970.00",
|
||||
"Weight-gr-prev": "0.00"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
# Ricette
|
||||
- [Ricette](#ricette)
|
||||
- [Gestione formati e tag x ricette](#gestione-formati-e-tag-x-ricette)
|
||||
- [Definizione tag ricette](#definizione-tag-ricette)
|
||||
- [Esempio tracciato Template](#esempio-tracciato-template)
|
||||
- [Esempio tracciato configurazione complessivo](#esempio-tracciato-configurazione-complessivo)
|
||||
- [Campi Calcolati](#campi-calcolati)
|
||||
|
||||
|
||||
# Gestione formati e tag x ricette
|
||||
|
||||
Nelle ricette ci possono essere campi liberi, campi da enum (da configurare nel json) e campi calcolati.
|
||||
|
||||
E' utile riportare un esempio di tracciato finale desiderato insieme ad un file template tpl da cui attingere x la realizzazione insieme ai campi definiti x testata e corpo.
|
||||
|
||||
In particolare sia per testata che corpo sono indicati casi di dati enumerativi (in modo che sia usato uno tra i valori ammessi)
|
||||
|
||||
|
||||
## Definizione tag ricette
|
||||
|
||||
I tag ammessi x le ricette sono di seguito riassunti e definiti:
|
||||
|
||||
| Cod | Significato | Definizione |
|
||||
|-----|-------------|--------------------------------------------|
|
||||
| C | Calcolato | Campo calcolato (NON modificabile) |
|
||||
| E | Enum | IdxODL numerico |
|
||||
| F | Fixed | IdxODL numerico |
|
||||
| S | Suggested | Campo calcolato e suggerito (modificabile) |
|
||||
|
||||
IN particolare gli Enum sono poi da riportare nella struttura degli EnumVal che deve completare i valori di testata o di corpo.
|
||||
|
||||
## Esempio tracciato Template
|
||||
|
||||
Ecco un esempio di template
|
||||
|
||||
```csharp
|
||||
{
|
||||
"A_Recipe": {
|
||||
"DesRecipe": {
|
||||
"DesData": {
|
||||
||PlaceholderHeader||
|
||||
},
|
||||
"ColRecipe": [
|
||||
||SROW:{"ColData":{||
|
||||
||PlaceholderRows||
|
||||
||EROW":}}||
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
il blocco <code>||PlaceholderHeader||</code> verrà sostituito per intero dai valori di testata.
|
||||
|
||||
Il blocco delel righe è invece più complesso e composto da 3 parti:
|
||||
* nel primo blocco, <code>||SROW:{"ColData":{||</code>, si cerca start riga e si prende il valore compreso tra ||SROW:: e || come testata riga da ripetere
|
||||
* nel secondo blocco si sostituiscono tutti i valori della riga i-esima
|
||||
* nel terzo blocco <code>||EROW":}}||</code> si sistema la chiusura della riga (end row)
|
||||
|
||||
|
||||
|
||||
## Esempio tracciato configurazione complessivo
|
||||
|
||||
```json
|
||||
{
|
||||
"TemplateFile": "TemplateOutput.tpl",
|
||||
"NumRow": 2,
|
||||
"HeadConf": {
|
||||
"ListKeys": {
|
||||
"CustDrumCode": "F:",
|
||||
"Taglio-N": "F:1",
|
||||
"LotID": "C:IdxPODL",
|
||||
"OrderCode": "C:CodePODL",
|
||||
"Prio": "E:Priority",
|
||||
"DrumType": "E:DrumType",
|
||||
"Customer": "Tenditalia",
|
||||
"Design": "DESIGN",
|
||||
"Quantity-kg": "1.00"
|
||||
},
|
||||
"EnumVal": {
|
||||
"Priority": {
|
||||
"N": "Normal",
|
||||
"H": "Hight"
|
||||
},
|
||||
"DrumType": {
|
||||
"1": "Small",
|
||||
"2": "Medium",
|
||||
"3": "Big"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RowsConf": {
|
||||
"ListKeys": {
|
||||
"Weight-gr-prev": "F:0.00",
|
||||
"CompNumber": "C:RowNum",
|
||||
"ColourCode": "C001",
|
||||
"Description": "COLOR1",
|
||||
"TypComp": "E:ColType",
|
||||
"PartsWeight": "1.00",
|
||||
"PartsPerc": "0.10",
|
||||
"Weight-gr": "30.00"
|
||||
},
|
||||
"EnumVal": {
|
||||
"ColType": {
|
||||
"C": "Color",
|
||||
"A": "Thickener",
|
||||
"X": "Auxiliaries"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Come si può notare, il tracciato di configurazione comprende i seguenti blocchi:
|
||||
| Blocco | descrizione |
|
||||
|-------------------|--------------------------------------|
|
||||
| HeadConf | Configurazione campi testata |
|
||||
| HeadConf:ListKeys | Elenco chiavi/valori x testata |
|
||||
| HeadConf:EnumVal | Elenco enumerativi ammessi x testata |
|
||||
| RowsConf | Configurazione campi riga |
|
||||
| RowsConf:ListKeys | Elenco chiavi/valori x righe |
|
||||
| RowsConf:EnumVal | Elenco enumerativi ammessi x righe |
|
||||
|
||||
## Campi Calcolati
|
||||
|
||||
I tag noti x decodifica riguardano i campi calcolati; hard coded, e riconosciuti, sono i seguenti:
|
||||
|
||||
| ID | Note | Format | Esempio |
|
||||
|--------------|-----------------------------------------|------------------|-----------------|
|
||||
| IdxPODL | IdxODL numerico | - | 123 |
|
||||
| CodePODL | Codice alfanumerico partendo da IdxPODL | PODL{0:00000000} | PODL00000123 |
|
||||
| CodArticolo | Campo CodArticolo | - | Art000123 |
|
||||
| DescArticolo | Campo DescArticolo | - | Articol 123 blu |
|
||||
| RowNum | Numero riga | - | 1 |
|
||||
| RowTot | Totale righe | - | 10 |
|
||||
@@ -0,0 +1,25 @@
|
||||
<body>
|
||||
<i>Modulo MP-IOC </i>
|
||||
<h4>Versione: {{CURRENT-REL}}</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.6.15.* →</b>
|
||||
<ul>
|
||||
<li>Prima release dotnet6</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="logoSteamware.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.steamware.net/IOT" target="_blank">© Steamware 2006-2023</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
@@ -0,0 +1,25 @@
|
||||
<body>
|
||||
<i>Modulo MP-IOC </i>
|
||||
<h4>Versione: 6.16.2306.915</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.6.15.* →</b>
|
||||
<ul>
|
||||
<li>Prima release dotnet6</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="logoSteamware.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.steamware.net/IOT" target="_blank">© Steamware 2006-2023</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
@@ -0,0 +1 @@
|
||||
6.16.2306.915
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.0.0</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2306.915</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"CodApp": "MP.IOC",
|
||||
"ConnectionStrings": {
|
||||
"Mp.Data": "Server=localhost\\SQLEXPRESS;Database=MoonPro;User ID=steamware;Password=viadante16; integrated security=False; MultipleActiveResultSets=True; App=MP.IOC;",
|
||||
"Redis": "localhost:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
|
||||
"RedisAdmin": "localhost:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true",
|
||||
"mdbConnString": "mongodb://localhost:27017"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"CodApp": "MP.IOC",
|
||||
"ConnectionStrings": {
|
||||
"Mp.Data": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.IOC;",
|
||||
"Redis": "localhost:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
|
||||
"RedisAdmin": "localhost:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true",
|
||||
"mdbConnString": "mongodb://W2019-MONGODB:27017"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"defaultProvider": "cdnjs",
|
||||
"libraries": [
|
||||
{
|
||||
"provider": "cdnjs",
|
||||
"library": "font-awesome@6.1.1",
|
||||
"destination": "wwwroot/lib/font-awesome/"
|
||||
},
|
||||
{
|
||||
"provider": "cdnjs",
|
||||
"library": "bootstrap@5.2.3",
|
||||
"destination": "wwwroot/lib/bootstrap/"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
$FileMajMin = "..\MajMin.vers"
|
||||
$FileVers = "Resources\VersNum.txt"
|
||||
$FileManIn = "Resources\manifest-original.xml"
|
||||
$FileManOut = "Resources\manifest.xml"
|
||||
$FileCLogIn = "Resources\ChangeLog-original.html"
|
||||
$FileCLogOut = "Resources\ChangeLog.html"
|
||||
$MajMin = Get-Content $FileMajMin
|
||||
$currentDate = get-date -format yyMM;
|
||||
$currentTime = get-date -format dHH;
|
||||
$find = "<Version>(.|\n)*?</Version>";
|
||||
$currRelNum = $MajMin + $currentDate +"." + $currentTime
|
||||
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
|
||||
$csproj = Get-Content $ProjectPath
|
||||
$csprojUpdated = $csproj -replace $find, $replace
|
||||
|
||||
Set-Content -Path $ProjectPath -Value $csprojUpdated
|
||||
Set-Content -Path $FileVers -Value $currRelNum
|
||||
|
||||
# replace x manifest
|
||||
$manData = Get-Content $FileManIn
|
||||
$manData = $manData -replace "1.0.0.0", $currRelNum
|
||||
$manData = $manData -replace "{{DIRNAME}}", "MP-IOC"
|
||||
$manData = $manData -replace "{{BRANCHNAME}}", "stable/LAST"
|
||||
$manData = $manData -replace "{{PACKNAME}}", "MP.IOC"
|
||||
Set-Content -Path $FileManOut -Value $manData
|
||||
|
||||
# replace x ChangeLog
|
||||
$clogData = Get-Content $FileCLogIn
|
||||
$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum
|
||||
Set-Content -Path $FileCLogOut -Value $clogData
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 1812 1724" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||
<g transform="matrix(1,0,0,1,-62.5279,-24.7416)">
|
||||
<g transform="matrix(1,0,0,1,-454.136,-195.51)">
|
||||
<g transform="matrix(-0.501863,-0.864947,0.864947,-0.501863,1249.19,2546.28)">
|
||||
<g transform="matrix(1.01361,0,0,1.01361,-98.1268,-7.77262)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.860544,0,0,0.860544,224.675,218.603)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.622449,0,0,0.622449,620.788,402.344)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.622449,0,0,0.622449,698.529,75.9479)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.588436,0,0,0.588436,860.019,461.031)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.588436,0,0,0.588436,867.019,230.692)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.47279,0,0,0.47279,1122.59,500.927)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.47279,0,0,0.47279,1118.59,350.522)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.372449,0,0,0.372449,1338.36,460.302)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g transform="matrix(1.01361,0,0,1.01361,-98.1268,-7.77262)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.860544,0,0,0.860544,224.675,218.603)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.622449,0,0,0.622449,620.788,402.344)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.622449,0,0,0.622449,698.529,75.9479)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.588436,0,0,0.588436,860.019,461.031)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.588436,0,0,0.588436,867.019,230.692)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.47279,0,0,0.47279,1122.59,500.927)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.47279,0,0,0.47279,1118.59,350.522)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.372449,0,0,0.372449,1338.36,460.302)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(-0.501185,0.86534,-0.86534,-0.501185,2825.79,206.681)">
|
||||
<g transform="matrix(1.01361,0,0,1.01361,-98.1268,-7.77262)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.860544,0,0,0.860544,224.675,218.603)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.622449,0,0,0.622449,620.788,402.344)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.622449,0,0,0.622449,698.529,75.9479)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.588436,0,0,0.588436,860.019,461.031)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.588436,0,0,0.588436,867.019,230.692)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.47279,0,0,0.47279,1122.59,500.927)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.47279,0,0,0.47279,1118.59,350.522)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.372449,0,0,0.372449,1338.36,460.302)">
|
||||
<circle cx="719.687" cy="344.98" r="113.149" style="fill:rgb(44,173,227);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 369 KiB |
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>MP IOC</title>
|
||||
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="lib/font-awesome/css/all.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container py-3">
|
||||
<div class="card">
|
||||
<div class="card-header bg-dark text-light">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="p-2">
|
||||
<img src="images/LogoMapo.png" class="image-fluid" height="64" />
|
||||
</div>
|
||||
<div class="p-2 align-content-center fs-1">
|
||||
<h1>IO-Core</h1>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<img src="images/LogoEgw.png" class="image-fluid" height="64" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<b>Alive</b>
|
||||
</div>
|
||||
<div class="text-success">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<b>IOB-PI</b> I/O
|
||||
</div>
|
||||
<div class="text-danger">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<b>IOB-WIN</b> I/O
|
||||
</div>
|
||||
<div class="text-danger">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<b>File</b> upload
|
||||
</div>
|
||||
<div class="text-danger">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<h1>MAPO IO</h1>
|
||||
<h4>.net Core-6</h4>
|
||||
</div>
|
||||
<div class="col-3 text-end">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<b>Bench</b> test
|
||||
</div>
|
||||
<div class="text-warning">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<b>Parameters</b> management
|
||||
</div>
|
||||
<div class="text-danger">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<b>Recipe</b> management
|
||||
</div>
|
||||
<div class="text-success">
|
||||
<i class="fa-solid fa-circle-check"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="lib/bootstrap/js/bootstrap.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,488 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
:root {
|
||||
--bs-blue: #0d6efd;
|
||||
--bs-indigo: #6610f2;
|
||||
--bs-purple: #6f42c1;
|
||||
--bs-pink: #d63384;
|
||||
--bs-red: #dc3545;
|
||||
--bs-orange: #fd7e14;
|
||||
--bs-yellow: #ffc107;
|
||||
--bs-green: #198754;
|
||||
--bs-teal: #20c997;
|
||||
--bs-cyan: #0dcaf0;
|
||||
--bs-black: #000;
|
||||
--bs-white: #fff;
|
||||
--bs-gray: #6c757d;
|
||||
--bs-gray-dark: #343a40;
|
||||
--bs-gray-100: #f8f9fa;
|
||||
--bs-gray-200: #e9ecef;
|
||||
--bs-gray-300: #dee2e6;
|
||||
--bs-gray-400: #ced4da;
|
||||
--bs-gray-500: #adb5bd;
|
||||
--bs-gray-600: #6c757d;
|
||||
--bs-gray-700: #495057;
|
||||
--bs-gray-800: #343a40;
|
||||
--bs-gray-900: #212529;
|
||||
--bs-primary: #0d6efd;
|
||||
--bs-secondary: #6c757d;
|
||||
--bs-success: #198754;
|
||||
--bs-info: #0dcaf0;
|
||||
--bs-warning: #ffc107;
|
||||
--bs-danger: #dc3545;
|
||||
--bs-light: #f8f9fa;
|
||||
--bs-dark: #212529;
|
||||
--bs-primary-rgb: 13, 110, 253;
|
||||
--bs-secondary-rgb: 108, 117, 125;
|
||||
--bs-success-rgb: 25, 135, 84;
|
||||
--bs-info-rgb: 13, 202, 240;
|
||||
--bs-warning-rgb: 255, 193, 7;
|
||||
--bs-danger-rgb: 220, 53, 69;
|
||||
--bs-light-rgb: 248, 249, 250;
|
||||
--bs-dark-rgb: 33, 37, 41;
|
||||
--bs-white-rgb: 255, 255, 255;
|
||||
--bs-black-rgb: 0, 0, 0;
|
||||
--bs-body-color-rgb: 33, 37, 41;
|
||||
--bs-body-bg-rgb: 255, 255, 255;
|
||||
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||
--bs-body-font-size: 1rem;
|
||||
--bs-body-font-weight: 400;
|
||||
--bs-body-line-height: 1.5;
|
||||
--bs-body-color: #212529;
|
||||
--bs-body-bg: #fff;
|
||||
--bs-border-width: 1px;
|
||||
--bs-border-style: solid;
|
||||
--bs-border-color: #dee2e6;
|
||||
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
|
||||
--bs-border-radius: 0.375rem;
|
||||
--bs-border-radius-sm: 0.25rem;
|
||||
--bs-border-radius-lg: 0.5rem;
|
||||
--bs-border-radius-xl: 1rem;
|
||||
--bs-border-radius-2xl: 2rem;
|
||||
--bs-border-radius-pill: 50rem;
|
||||
--bs-link-color: #0d6efd;
|
||||
--bs-link-hover-color: #0a58ca;
|
||||
--bs-code-color: #d63384;
|
||||
--bs-highlight-bg: #fff3cd;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
border: 0;
|
||||
border-top: 1px solid;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.1875em;
|
||||
background-color: var(--bs-highlight-bg);
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--bs-link-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: var(--bs-link-hover-color);
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: var(--bs-font-monospace);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: var(--bs-code-color);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.1875rem 0.375rem;
|
||||
font-size: 0.875em;
|
||||
color: var(--bs-body-bg);
|
||||
background-color: var(--bs-body-color);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
/* rtl:raw:
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
*/
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||
@@ -0,0 +1,485 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
:root {
|
||||
--bs-blue: #0d6efd;
|
||||
--bs-indigo: #6610f2;
|
||||
--bs-purple: #6f42c1;
|
||||
--bs-pink: #d63384;
|
||||
--bs-red: #dc3545;
|
||||
--bs-orange: #fd7e14;
|
||||
--bs-yellow: #ffc107;
|
||||
--bs-green: #198754;
|
||||
--bs-teal: #20c997;
|
||||
--bs-cyan: #0dcaf0;
|
||||
--bs-black: #000;
|
||||
--bs-white: #fff;
|
||||
--bs-gray: #6c757d;
|
||||
--bs-gray-dark: #343a40;
|
||||
--bs-gray-100: #f8f9fa;
|
||||
--bs-gray-200: #e9ecef;
|
||||
--bs-gray-300: #dee2e6;
|
||||
--bs-gray-400: #ced4da;
|
||||
--bs-gray-500: #adb5bd;
|
||||
--bs-gray-600: #6c757d;
|
||||
--bs-gray-700: #495057;
|
||||
--bs-gray-800: #343a40;
|
||||
--bs-gray-900: #212529;
|
||||
--bs-primary: #0d6efd;
|
||||
--bs-secondary: #6c757d;
|
||||
--bs-success: #198754;
|
||||
--bs-info: #0dcaf0;
|
||||
--bs-warning: #ffc107;
|
||||
--bs-danger: #dc3545;
|
||||
--bs-light: #f8f9fa;
|
||||
--bs-dark: #212529;
|
||||
--bs-primary-rgb: 13, 110, 253;
|
||||
--bs-secondary-rgb: 108, 117, 125;
|
||||
--bs-success-rgb: 25, 135, 84;
|
||||
--bs-info-rgb: 13, 202, 240;
|
||||
--bs-warning-rgb: 255, 193, 7;
|
||||
--bs-danger-rgb: 220, 53, 69;
|
||||
--bs-light-rgb: 248, 249, 250;
|
||||
--bs-dark-rgb: 33, 37, 41;
|
||||
--bs-white-rgb: 255, 255, 255;
|
||||
--bs-black-rgb: 0, 0, 0;
|
||||
--bs-body-color-rgb: 33, 37, 41;
|
||||
--bs-body-bg-rgb: 255, 255, 255;
|
||||
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||
--bs-body-font-family: var(--bs-font-sans-serif);
|
||||
--bs-body-font-size: 1rem;
|
||||
--bs-body-font-weight: 400;
|
||||
--bs-body-line-height: 1.5;
|
||||
--bs-body-color: #212529;
|
||||
--bs-body-bg: #fff;
|
||||
--bs-border-width: 1px;
|
||||
--bs-border-style: solid;
|
||||
--bs-border-color: #dee2e6;
|
||||
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
|
||||
--bs-border-radius: 0.375rem;
|
||||
--bs-border-radius-sm: 0.25rem;
|
||||
--bs-border-radius-lg: 0.5rem;
|
||||
--bs-border-radius-xl: 1rem;
|
||||
--bs-border-radius-2xl: 2rem;
|
||||
--bs-border-radius-pill: 50rem;
|
||||
--bs-link-color: #0d6efd;
|
||||
--bs-link-hover-color: #0a58ca;
|
||||
--bs-code-color: #d63384;
|
||||
--bs-highlight-bg: #fff3cd;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--bs-body-font-family);
|
||||
font-size: var(--bs-body-font-size);
|
||||
font-weight: var(--bs-body-font-weight);
|
||||
line-height: var(--bs-body-line-height);
|
||||
color: var(--bs-body-color);
|
||||
text-align: var(--bs-body-text-align);
|
||||
background-color: var(--bs-body-bg);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
border: 0;
|
||||
border-top: 1px solid;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
h6, h5, h4, h3, h2, h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-right: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: 0.5rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.1875em;
|
||||
background-color: var(--bs-highlight-bg);
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--bs-link-color);
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: var(--bs-link-hover-color);
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: var(--bs-font-monospace);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: var(--bs-code-color);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.1875rem 0.375rem;
|
||||
font-size: 0.875em;
|
||||
color: var(--bs-body-bg);
|
||||
background-color: var(--bs-body-color);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
select:disabled {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=button]:not(:disabled),
|
||||
[type=reset]:not(:disabled),
|
||||
[type=submit]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: right;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
legend + * {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type=search] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
[type="tel"],
|
||||
[type="url"],
|
||||
[type="email"],
|
||||
[type="number"] {
|
||||
direction: ltr;
|
||||
}
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
::file-selector-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */
|
||||