Compare commits
148 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a25f06afeb | |||
| 44be6ad694 | |||
| 22d7f55aaa | |||
| 9171a29faf | |||
| 592ca82487 | |||
| 3d4998d783 | |||
| 23d30a6026 | |||
| 805bb1782f | |||
| eb532976f1 | |||
| 66b25571cf | |||
| 374dd0c318 | |||
| 12c0943814 | |||
| d214f14226 | |||
| 9a786c014a | |||
| 62149c500b | |||
| aeedbedbc5 | |||
| e4ef7dc9b8 | |||
| 8795f9bb3e | |||
| dd8bbfe7b1 | |||
| b8d75a90bd | |||
| 1f21a6d6bb | |||
| 294c4373e0 | |||
| ccb5af08fa | |||
| 4506bcdcb8 | |||
| 42d41b69b3 | |||
| 3a9469ebc5 | |||
| f0201bcb25 | |||
| 1303886512 | |||
| 5924634763 | |||
| 77b32b72fc | |||
| d43a537f19 | |||
| 68516ffd3d | |||
| 331eb59c73 | |||
| 2b02a91627 | |||
| 2de877f09a | |||
| 3aeed52ceb | |||
| 0a88c693c7 | |||
| b83dda2db2 | |||
| cf6ddb045f | |||
| f2783e3d37 | |||
| 0b60b7de38 | |||
| 348c887af7 | |||
| 97c64ce03c | |||
| aea37b1110 | |||
| 450552ee75 | |||
| ef4ac14e18 | |||
| 1d208d37a2 | |||
| 2afc9acf2c | |||
| e8052ed5a2 | |||
| d0b624f74b | |||
| 58b9ffcea8 | |||
| 340fc785f5 | |||
| a9ac48c016 | |||
| cde7309597 | |||
| 1708de0abb | |||
| f413f44e3d | |||
| e568c91dd7 | |||
| bc27286a54 | |||
| e0fa3e9bac | |||
| bd700b1e36 | |||
| a2566419c6 | |||
| db063fc394 | |||
| 1f0ff69c58 | |||
| 57240c0b1b | |||
| 0de4730518 | |||
| 70414dc00f | |||
| f3c3452a16 | |||
| d39acbe570 | |||
| 4454f5c64d | |||
| c375f61b94 | |||
| 99c0abb0fd | |||
| 0ffde6db57 | |||
| 3ac8a1ace7 | |||
| 390bc4c23c | |||
| ab429c1c67 | |||
| 553fa000b5 | |||
| cb3ad67aaa | |||
| d8d3078f2f | |||
| fc134abf0c | |||
| 8df24f8f1d | |||
| dddf55565b | |||
| 429abcd7cf | |||
| ad8a5718c2 | |||
| bab66a31e6 | |||
| f1d7b4fd32 | |||
| b41b024239 | |||
| 26bd0e284f | |||
| c0bd2de326 | |||
| 83f1ef8856 | |||
| 3ce5ff08d5 | |||
| b7609d22ba | |||
| 086f9a0721 | |||
| ca67fed604 | |||
| e390874ef6 | |||
| 68c66fec24 | |||
| ee17743d07 | |||
| 7df41a8403 | |||
| 186005656f | |||
| bb96cf0033 | |||
| 5a85a607b7 | |||
| d07cfdff7b | |||
| 603da66f00 | |||
| 6e3a74bd2c | |||
| 9d3a2761b8 | |||
| fc61f46802 | |||
| 9d74e8dcb0 | |||
| 0097b48ba5 | |||
| e61b54d9ae | |||
| c746f0ce2b | |||
| e3b2b5d32c | |||
| 11c2dd0412 | |||
| 5f95187c01 | |||
| 1bfe90de1c | |||
| 2a38aeea45 | |||
| 2dc6af1bc8 | |||
| 51c45ac2fc | |||
| 193108f573 | |||
| d3104d9598 | |||
| cf49953145 | |||
| 8d95f7ef5c | |||
| 297ad69831 | |||
| 4f8bb3892e | |||
| 04a34c9cae | |||
| caa5ca85c5 | |||
| 39cc5ec35f | |||
| 8fa562f247 | |||
| 3ced4656bd | |||
| 1d056d1960 | |||
| 169d9aedc9 | |||
| bd6548af2f | |||
| 40a5d6513d | |||
| 04cc2aa538 | |||
| 5a7c1c7d9c | |||
| 17bc27ef38 | |||
| 03f3241966 | |||
| cc01ffb89b | |||
| 7d76b7b5f7 | |||
| f84671fee8 | |||
| d93f5e168d | |||
| 424f3f3e9d | |||
| b68eadc2f7 | |||
| 98d3f13972 | |||
| 595ea40e6c | |||
| 3ce3808995 | |||
| a9011e014b | |||
| de1d30fdb6 | |||
| 1eb01b0532 | |||
| 20ae251943 |
+1
-1
@@ -7,7 +7,7 @@
|
||||
#--------------------------------
|
||||
# area MP.Stats
|
||||
#--------------------------------
|
||||
/Mp.FileData/temp/*.csv
|
||||
/MP.FileData/temp/*.csv
|
||||
*.bak
|
||||
|
||||
#--------------------------------
|
||||
|
||||
+27
-27
@@ -267,7 +267,7 @@ LAND:IIS01:deploy:
|
||||
needs: ["LAND: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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
PROG:IIS01:deploy:
|
||||
stage: deploy
|
||||
@@ -286,7 +286,7 @@ PROG:IIS01:deploy:
|
||||
needs: ["PROG: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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
STAT:IIS01:deploy:
|
||||
stage: deploy
|
||||
@@ -305,7 +305,7 @@ STAT:IIS01:deploy:
|
||||
needs: ["STAT: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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
MON:IIS01:deploy:
|
||||
stage: deploy
|
||||
@@ -324,7 +324,7 @@ MON:IIS01:deploy:
|
||||
needs: ["MON: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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
SPEC:IIS01:deploy:
|
||||
stage: deploy
|
||||
@@ -343,7 +343,7 @@ SPEC:IIS01:deploy:
|
||||
needs: ["SPEC: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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
INVE:IIS01:deploy:
|
||||
stage: deploy
|
||||
@@ -362,7 +362,7 @@ INVE:IIS01:deploy:
|
||||
needs: ["INVE: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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
CONF:IIS01:deploy:
|
||||
stage: deploy
|
||||
@@ -381,7 +381,7 @@ CONF:IIS01:deploy:
|
||||
needs: ["CONF: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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
IOC:IIS01:deploy:
|
||||
stage: deploy
|
||||
@@ -400,7 +400,7 @@ IOC:IIS01:deploy:
|
||||
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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
TAB3:IIS01:deploy:
|
||||
stage: deploy
|
||||
@@ -419,7 +419,7 @@ TAB3:IIS01:deploy:
|
||||
needs: ["TAB3: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
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# ----- Start DEPLOY master (IIS02/IIS04) -----
|
||||
LAND:IIS02:deploy:
|
||||
@@ -437,8 +437,8 @@ LAND:IIS02:deploy:
|
||||
needs: ["LAND: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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
PROG:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -455,8 +455,8 @@ PROG:IIS02:deploy:
|
||||
needs: ["PROG: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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
STAT:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -473,8 +473,8 @@ STAT:IIS02:deploy:
|
||||
needs: ["STAT: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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
MON:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -491,8 +491,8 @@ MON:IIS02:deploy:
|
||||
needs: ["MON: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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
SPEC:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -509,8 +509,8 @@ SPEC:IIS02:deploy:
|
||||
needs: ["SPEC: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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
INVE:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -527,8 +527,8 @@ INVE:IIS02:deploy:
|
||||
needs: ["INVE: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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
CONF:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -545,8 +545,8 @@ CONF:IIS02:deploy:
|
||||
needs: ["CONF: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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
IOC:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -563,8 +563,8 @@ IOC:IIS02:deploy:
|
||||
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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
TAB3:IIS02:deploy:
|
||||
stage: deploy
|
||||
@@ -581,8 +581,8 @@ TAB3:IIS02:deploy:
|
||||
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
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -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_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# ----- Start INSTALLER (develop/master) -----
|
||||
LAND:installer:
|
||||
|
||||
@@ -101,7 +101,6 @@ namespace MP_TAB3.Components
|
||||
DateTime fine = DateTime.Today.AddDays(1);
|
||||
DateTime inizio = fine.AddDays(-8);
|
||||
CurrPeriodo = new Periodo(inizio, fine);
|
||||
await doUpdate();
|
||||
}
|
||||
var rawDest = config.GetValue<string>("AlarmDest");
|
||||
if (!string.IsNullOrEmpty(rawDest))
|
||||
@@ -114,6 +113,15 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE))
|
||||
{
|
||||
lastRecMSE = RecMSE;
|
||||
await doUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected void SaveNumRec(int newNum)
|
||||
{
|
||||
NumRecPage = newNum;
|
||||
@@ -208,6 +216,7 @@ namespace MP_TAB3.Components
|
||||
|
||||
private Periodo CurrPeriodo { get; set; } = new Periodo();
|
||||
private string IdxMaccSel { get; set; } = "";
|
||||
private MappaStatoExpl? lastRecMSE { get; set; } = null;
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
|
||||
@@ -49,6 +49,26 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected MessageService MServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
protected bool ShowInsFermata { get; set; } = false;
|
||||
|
||||
protected bool ShowReqControls { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
protected SharedMemService SMServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TabDServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Verifica necessit� visualizzare il check controlli
|
||||
/// </summary>
|
||||
@@ -87,25 +107,6 @@ namespace MP_TAB3.Components
|
||||
return answ;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
protected bool ShowInsFermata { get; set; } = false;
|
||||
|
||||
protected bool ShowReqControls { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
protected SharedMemService SMServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TabDServ { get; set; } = null!;
|
||||
|
||||
protected DateTime lastCheck = DateTime.Today;
|
||||
protected string lastIdxMacc = "";
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void GoToControls()
|
||||
{
|
||||
NavMan.NavigateTo("controls");
|
||||
@@ -120,13 +121,11 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
if (RecMSE != null)
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (adesso.Subtract(lastCheck).TotalSeconds > 15 || lastIdxMacc != RecMSE.IdxMacchina)
|
||||
if (MServ.LastIdxMacchina != RecMSE.IdxMacchina)
|
||||
{
|
||||
ShowInsFermata = CheckShowInsFermata;
|
||||
ShowReqControls = await CheckShowReqControls();
|
||||
lastIdxMacc = RecMSE.IdxMacchina;
|
||||
lastCheck = adesso;
|
||||
MServ.LastIdxMacchina = RecMSE.IdxMacchina;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<ProgBar currVal="@CurrExpVal" maxVal="@MaxExpVal" singleLine="true" baseUM="m" yelLim="@yLimit" redLim="@rLimit"></ProgBar>
|
||||
if (MatrOper >= 0)
|
||||
{
|
||||
if (showProgrBar)
|
||||
{
|
||||
<ProgBar currVal="@CurrExpVal" maxVal="@MaxExpVal" singleLine="true" baseUM="m" yelLim="@yLimit" redLim="@rLimit"></ProgBar>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="alert alert-info text-center p-0 mb-0">...login...</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -8,9 +8,15 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public Guid CurrDevGuid { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public int DtScadLogin { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public int MatrOper { get; set; } = -1;
|
||||
|
||||
[Parameter]
|
||||
public int TypeScadLogin { get; set; } = -1;
|
||||
|
||||
@@ -41,6 +47,9 @@ namespace MP_TAB3.Components
|
||||
[Inject]
|
||||
protected SharedMemService SMServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TDataService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -49,16 +58,50 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
if (TypeScadLogin > 0)
|
||||
{
|
||||
var diffOfTime = DateTime.Now.Subtract(MsgServ.dtLastAction);
|
||||
CurrExpVal = MaxExpVal - diffOfTime.TotalMinutes;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
adesso = DateTime.Now;
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
// solo se NON sono in login...
|
||||
if (!IsLoginPage)
|
||||
{
|
||||
var diffOfTime = adesso.Subtract(MsgServ.dtLastAction);
|
||||
CurrExpVal = MaxExpVal - diffOfTime.TotalMinutes;
|
||||
if (TypeScadLogin == 1)
|
||||
{
|
||||
if (CurrExpVal < 0)
|
||||
{
|
||||
MsgServ.dtLastAction = adesso;
|
||||
NavMan.NavigateTo("logout");
|
||||
}
|
||||
}
|
||||
// in questo caso cerco SOLO se sia scaduto su redis
|
||||
else if (TypeScadLogin == 2)
|
||||
{
|
||||
// mitigazione check: solo ogni 10 secondi...
|
||||
if (adesso.Subtract(MsgServ.dtLastSave).TotalSeconds > 10)
|
||||
{
|
||||
MsgServ.dtLastSave = adesso;
|
||||
// rileggo scadenza ultima...
|
||||
TimeSpan tsScadenza = TDataService.OperatoreGetGuidTTL(MatrOper, CurrDevGuid);
|
||||
// mostro scadenza SOLO se inferiore a 24h...
|
||||
showProgrBar = tsScadenza.TotalHours < 24;
|
||||
// se < 0 --> login
|
||||
if (tsScadenza.TotalMinutes < 0)
|
||||
{
|
||||
NavMan.NavigateTo("logout");
|
||||
}
|
||||
else
|
||||
{
|
||||
MsgServ.dtLastAction = adesso.Subtract(TimeSpan.FromMinutes(MaxExpVal)).Add(tsScadenza);
|
||||
}
|
||||
// comunque controllo chiave redis
|
||||
var userTkn = await TDataService.OperatoreGetRedis(MatrOper, CurrDevGuid);
|
||||
if (string.IsNullOrEmpty(userTkn))
|
||||
{
|
||||
NavMan.NavigateTo("logout");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
@@ -68,14 +111,24 @@ namespace MP_TAB3.Components
|
||||
var rawVers = typeof(Program).Assembly.GetName().Version;
|
||||
version = rawVers != null ? rawVers : new Version("0.0.0.0");
|
||||
DtScadLogin = SMServ.GetConfInt("TAB_dtTimerScadLogin");
|
||||
showProgrBar = TypeScadLogin == 1;
|
||||
MaxExpVal = DtScadLogin;
|
||||
yLimit = MaxExpVal * 0.3;
|
||||
rLimit = MaxExpVal * 0.1;
|
||||
// rileggo scadenza ultima...
|
||||
TimeSpan tsScadenza = TDataService.OperatoreGetGuidTTL(MatrOper, CurrDevGuid);
|
||||
MsgServ.dtLastAction = adesso.Subtract(TimeSpan.FromMinutes(MaxExpVal)).Add(tsScadenza);
|
||||
showProgrBar = tsScadenza.TotalHours < 24;
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
protected void StartTimer()
|
||||
{
|
||||
if (aTimer != null)
|
||||
{
|
||||
aTimer.Stop();
|
||||
aTimer.Dispose();
|
||||
}
|
||||
int tOutPeriod = 1000;
|
||||
aTimer = new System.Timers.Timer(tOutPeriod);
|
||||
aTimer.Elapsed += ElapsedTimer;
|
||||
@@ -89,6 +142,7 @@ namespace MP_TAB3.Components
|
||||
|
||||
private DateTime adesso = DateTime.Now;
|
||||
private System.Timers.Timer aTimer = null!;
|
||||
private bool showProgrBar = true;
|
||||
private Version version = null!;
|
||||
|
||||
#endregion Private Fields
|
||||
@@ -96,20 +150,30 @@ namespace MP_TAB3.Components
|
||||
#region Private Properties
|
||||
|
||||
private double CurrExpVal { get; set; } = 50;
|
||||
|
||||
private bool IsLoginPage
|
||||
{
|
||||
get
|
||||
{
|
||||
string currPage = NavMan.Uri;
|
||||
return currPage.Contains("logout") || currPage.Contains("reg-new-device");
|
||||
}
|
||||
}
|
||||
|
||||
private double MaxExpVal { get; set; } = 100;
|
||||
|
||||
private double rLimit { get; set; } = 10;
|
||||
|
||||
private string timeUm
|
||||
private string CurrUM
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "m";
|
||||
if (CurrExpVal > 60)
|
||||
if (MaxExpVal > 60)
|
||||
{
|
||||
answ = "h";
|
||||
}
|
||||
else if (CurrExpVal > 1440)
|
||||
else if (MaxExpVal > 1440)
|
||||
{
|
||||
answ = "gg";
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace MP_TAB3.Components
|
||||
public List<LinkMenu> CurrMenuItems { get; set; } = new List<LinkMenu>();
|
||||
[Parameter]
|
||||
public EventCallback<bool> EA_UserIsOk { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<bool> EA_ReloadMStor { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -29,7 +31,7 @@ namespace MP_TAB3.Components
|
||||
#region Protected Properties
|
||||
|
||||
protected string CurrOprTknLS { get; set; } = null!;
|
||||
//protected Guid CurrDevGuid { get; set; }
|
||||
|
||||
protected string LastOpenedPage { get; set; } = null!;
|
||||
protected string CurrMacc { get; set; } = null!;
|
||||
|
||||
@@ -65,26 +67,30 @@ namespace MP_TAB3.Components
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task RefreshLogIn(string decodValue)
|
||||
protected async Task RefreshScadLogIn(string decodValue)
|
||||
{
|
||||
bool done = false;
|
||||
if (TypeScadLogin <= 0)
|
||||
// solo se non è logout!!!
|
||||
if (!NavMan.Uri.Contains("logout"))
|
||||
{
|
||||
done = await MsgServ.DoLogIn(decodValue, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
done = await MsgServ.DoLogIn(decodValue, true);
|
||||
}
|
||||
if (done)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(LastOpenedPage) && !string.IsNullOrEmpty(CurrMacc))
|
||||
if (TypeScadLogin <= 0 || TypeScadLogin == 2)
|
||||
{
|
||||
NavMan.NavigateTo(LastOpenedPage);
|
||||
done = await MsgServ.DoLogIn(decodValue, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
NavMan.NavigateTo("status-map");
|
||||
done = await MsgServ.DoLogIn(decodValue, true);
|
||||
}
|
||||
if (done && !string.IsNullOrEmpty(LastOpenedPage))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(CurrMacc))
|
||||
{
|
||||
NavMan.NavigateTo(LastOpenedPage);
|
||||
}
|
||||
else
|
||||
{
|
||||
NavMan.NavigateTo("status-map");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,8 +113,8 @@ namespace MP_TAB3.Components
|
||||
await MsgServ.SetCurrDevGuidLSAsync(devGuid);
|
||||
await MsgServ.SetLastMatrOprAsync(lastOpr);
|
||||
await MsgServ.SetCurrOperDtoLSAsync(currToken);
|
||||
// reload MStor
|
||||
await ReloadMemStor();
|
||||
// richiesta reload MStor
|
||||
await EA_ReloadMStor.InvokeAsync(true);
|
||||
// calcolo tempo esecuzione
|
||||
sw.Stop();
|
||||
int delta = 500 - (int)sw.ElapsedMilliseconds;
|
||||
@@ -116,7 +122,7 @@ namespace MP_TAB3.Components
|
||||
await Task.Delay(delta);
|
||||
ResetClass = "btn-primary";
|
||||
// await InvokeAsync(StateHasChanged);
|
||||
Log.Info($"ForceReload completed in {sw.ElapsedMilliseconds}ms");
|
||||
Log.Info($"ForceReload completed in {sw.Elapsed.TotalMilliseconds}ms");
|
||||
// ricarica pagina!
|
||||
NavMan.NavigateTo("status-map");
|
||||
}
|
||||
@@ -126,18 +132,14 @@ namespace MP_TAB3.Components
|
||||
await Task.Delay(1);
|
||||
if (!NavMan.Uri.Contains("reg-new-device"))
|
||||
{
|
||||
|
||||
await MsgServ.IdxMaccSet("");
|
||||
NavMan.NavigateTo("status-map");
|
||||
NavMan.NavigateTo("status-map", true);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
#if false
|
||||
TypeScadLogin = SMServ.GetConfInt("TAB_TypeScadLogin");
|
||||
#endif
|
||||
var CurrDevGuid = await MsgServ.GetCurrDevGuidLSAsync();
|
||||
|
||||
if (CurrDevGuid == Guid.Empty)
|
||||
@@ -150,7 +152,7 @@ namespace MP_TAB3.Components
|
||||
CurrMacc = await MsgServ.IdxMaccGet();
|
||||
|
||||
CurrOprTknLS = await MsgServ.GetCurrOperDtoLSAsync();
|
||||
var decodedUrl = Uri.UnescapeDataString(CurrOprTknLS);
|
||||
var currOprTokLsDeco = Uri.UnescapeDataString(CurrOprTknLS);
|
||||
if (!string.IsNullOrEmpty(CurrOprTknLS))
|
||||
{
|
||||
var decryptedData = MsgServ.DecryptData(CurrOprTknLS);
|
||||
@@ -177,48 +179,11 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(CurrOprTknRedis) && CurrOprTknRedis == CurrOprTknLS)
|
||||
{
|
||||
await RefreshLogIn(decodedUrl);
|
||||
await RefreshScadLogIn(currOprTokLsDeco);
|
||||
await EA_UserIsOk.InvokeAsync(true);
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task ReloadMemStor()
|
||||
{
|
||||
// in primis svuoto...
|
||||
MStor.ClearCache();
|
||||
// rileggo link
|
||||
var allData = await MDataService.ListLinkAll();
|
||||
MStor.SetupMenu(allData);
|
||||
// fix config...
|
||||
var allConf = await MDataService.ConfigGetAll();
|
||||
MStor.SetConfig(allConf);
|
||||
// fix MSFD...
|
||||
var allMSFD = await TDService.VMSFDGetAll();
|
||||
MStor.SetMsfd(allMSFD);
|
||||
// fix slave
|
||||
var macSlave = await TDService.Macchine2Slave();
|
||||
MStor.SetM2S(macSlave);
|
||||
|
||||
// fix elenco eventi
|
||||
var allEvents = await TDService.AnagEventiGetAll();
|
||||
MStor.SetEventi(allEvents);
|
||||
// fix elenco stati
|
||||
var allStati = await TDService.AnaStatiGetAll();
|
||||
MStor.SetStati(allStati);
|
||||
// non da farsi globalmente // fix macchine var allMach = await
|
||||
// MDataService.MacchineByMatrOper(0); MStor.DictMacchine = allMach.ToDictionary(x =>
|
||||
// x.IdxMacchina, x => $"{x.IdxMacchina} | {x.Nome}");
|
||||
|
||||
// fix vocabolario
|
||||
var allVoc = TDService.VocabolarioGetAll();
|
||||
MStor.SetVocab(allVoc);
|
||||
|
||||
// resetto il tabDServ
|
||||
await TDService.FlushCache();
|
||||
// ricarica la config...
|
||||
TDService.SetupConfig();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="mb-1 fs-6">
|
||||
@if (enableControlli)
|
||||
{
|
||||
@if (RecMSE.IdxOdl > 0)
|
||||
@if (RecMSE != null && RecMSE.IdxOdl > 0)
|
||||
{
|
||||
<button class="btn btn-primary btn-lg text-light w-100 mb-1" @onclick="ToggleBtn">
|
||||
<i class="fa fa-wrench"></i> @ConfTitle
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
|
||||
DateTime fine = DateTime.Today.AddDays(1);
|
||||
DateTime inizio = fine.AddDays(-8);
|
||||
DateTime inizio = fine.AddDays(-3);
|
||||
CurrPeriodo = new Periodo(inizio, fine);
|
||||
await doUpdate();
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
|
||||
DateTime fine = DateTime.Today.AddDays(1);
|
||||
DateTime inizio = fine.AddDays(-8);
|
||||
DateTime inizio = fine.AddDays(-3);
|
||||
CurrPeriodo = new Periodo(inizio, fine);
|
||||
await doUpdate();
|
||||
}
|
||||
|
||||
@@ -6,11 +6,15 @@
|
||||
<div class="d-flex justify-content-center flex-wrap align-items-center">
|
||||
@if(infosIob.iType == MP.Data.Objects.Enums.IobType.rPi)
|
||||
{
|
||||
<img src="/images/linuxLogo.png" style="height: 70px; width: 70px" />
|
||||
<img src="images/linuxLogo.png" style="height: 7em; width: 7em;" />
|
||||
}
|
||||
else if (infosIob.iType == MP.Data.Objects.Enums.IobType.WIN || infosIob.iType == MP.Data.Objects.Enums.IobType.ND)
|
||||
else if (infosIob.iType == MP.Data.Objects.Enums.IobType.WIN)
|
||||
{
|
||||
<img src="/images/winLogo.png" style="height: 70px; width: 70px" />
|
||||
<img src="images/winLogo.png" style="height: 7em; width: 7em;" />
|
||||
}
|
||||
else if (infosIob.iType == MP.Data.Objects.Enums.IobType.ND)
|
||||
{
|
||||
<img src="images/pythonLogo.png" style="height: 7em; width: 7em;" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DTO;
|
||||
using MP.Data.Objects;
|
||||
using MP.Data.Services;
|
||||
|
||||
@@ -7,20 +6,29 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
public partial class IobInfoMan
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public string idxMacch { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected IOB_data infosIob { get; set; } = new IOB_data();
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TabSrv { get; set; } = null!;
|
||||
|
||||
protected IOB_data infosIob { get; set; } = new IOB_data();
|
||||
#endregion Protected Properties
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
infosIob = await TabSrv.IobInfo(idxMacch);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,17 @@
|
||||
<div class="card text-white mapBlock shadow bg-secondary p-0 m-0">
|
||||
<div class="card-body">
|
||||
<div class="placeholder-glow">
|
||||
<span class="placeholder col-7"></span>
|
||||
<span class="placeholder col-4"></span>
|
||||
<span class="placeholder col-4"></span>
|
||||
<span class="placeholder col-7"></span>
|
||||
<span class="placeholder col-7 mb-1"></span>
|
||||
<span class="placeholder col-12 mb-1 pholderHeight"></span>
|
||||
<span class="placeholder col-12 mb-1"></span>
|
||||
<span class="placeholder col-3 mb-1"></span>
|
||||
<span class="placeholder col-8"></span>
|
||||
<span class="placeholder col-3"></span>
|
||||
<span class="placeholder col-7 mb-1"></span>
|
||||
<span class="placeholder col-3"></span>
|
||||
<span class="placeholder col-8 mb-1"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -19,10 +26,16 @@ else
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info w-100 fs-3">No data</div>
|
||||
<div class="placeholder-glow">
|
||||
<span class="placeholder col-7"></span>
|
||||
<span class="placeholder col-4"></span>
|
||||
<span class="placeholder col-4"></span>
|
||||
<span class="placeholder col-7"></span>
|
||||
<span class="placeholder col-7 mb-1"></span>
|
||||
<span class="placeholder col-12 mb-1 pholderHeight"></span>
|
||||
<span class="placeholder col-12 mb-1"></span>
|
||||
<span class="placeholder col-3 mb-1"></span>
|
||||
<span class="placeholder col-8"></span>
|
||||
<span class="placeholder col-3"></span>
|
||||
<span class="placeholder col-7 mb-1"></span>
|
||||
<span class="placeholder col-3"></span>
|
||||
<span class="placeholder col-8 mb-1"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,21 +46,26 @@ else
|
||||
{
|
||||
if (Width > 640)
|
||||
{
|
||||
<div class="card shadow rounded rounded-4 border-secondary" @onclick="ShowDetail">
|
||||
<img src="@ImgUrlMacc(RecMSE.Url)" class="card-img-top imgFitToSize" alt="@RecMSE.CodMacchina">
|
||||
<div class="card bg-dark @cssClassBorder @cssClassOverlay rounded-4" @onclick="ShowDetail">
|
||||
<img src="@ImgUrlMacc(RecMSE.Url)" class="card-img-top imgFitToSize rounded-top-4" alt="@RecMSE.CodMacchina">
|
||||
<div class="bg-black">
|
||||
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start rCTop">
|
||||
<div class="labelTopDx px-2 w-100">
|
||||
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start">
|
||||
<div class="labelTop px-2 w-100">
|
||||
<div class="text-center fs-2 fw-bold">
|
||||
@RecMSE.Nome
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
<div class="@RecMSE.Semaforo borderStd p-1">
|
||||
<div class="d-flex justify-content-center fs-5">
|
||||
<span><b>@RecMSE.DescrizioneStato</b>: @(FormatDurata(RecMSE.Durata))</span>
|
||||
<div class="card-body rounded-bottom-4 p-0 bg-dark">
|
||||
<div class="@RecMSE.Semaforo py-0 px-1">
|
||||
<div class="d-flex justify-content-between fs-5">
|
||||
<div class="px-0 @cssClassTextDescr">
|
||||
<span>@RecMSE.DescrizioneStato </span>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<b>@(FormatDurata(RecMSE.Durata))</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-around">
|
||||
@@ -56,10 +74,9 @@ else
|
||||
<i class="fa-regular fa-circle-check"></i> @($" {RecMSE.PezziConf}")
|
||||
</div>
|
||||
<div class="text-danger">
|
||||
+
|
||||
@if (datiProdAct != null)
|
||||
@if (datiProdAct != null && datiProdAct.PzConfScarto > 0)
|
||||
{
|
||||
@($" {datiProdAct.PzConfScarto}")
|
||||
@($"(- {datiProdAct.PzConfScarto})")
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,77 +90,88 @@ else
|
||||
<div class="col-4">
|
||||
<EgwCoreLib.Razor.CircleGaugeMulti Titolo="@($"{currMaxVal}")" Testo="#pz rich" maxVal="@currMaxVal" ListInner="@innerCircleVals" ListOuter="@outerCircleVals" ShowCircleBtn="true"></EgwCoreLib.Razor.CircleGaugeMulti>
|
||||
</div>
|
||||
<div class="col-8" style="line-height: 1.6rem;">
|
||||
|
||||
<div class="col-8 py-1" style="line-height: 1.6rem;">
|
||||
<div class="text-center text-light d-flex justify-content-between">
|
||||
<div class="col-4"><span>ART:</span></div>
|
||||
<div class="col-8">@($"{RecMSE.CodArticolo}")</div>
|
||||
<div class="px-1"><span>ART:</span></div>
|
||||
<div class="px-1">@($"{RecMSE.CodArticolo}")</div>
|
||||
</div>
|
||||
<div class="text-center text-light d-flex justify-content-between small lh-sm">
|
||||
<div class="col-4">ODL:</div>
|
||||
<div class="col-8">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
|
||||
<div class="px-1">ODL:</div>
|
||||
<div class="px-1">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
|
||||
</div>
|
||||
<div class="text-center text-light d-flex justify-content-between small lh-sm">
|
||||
<div class="col-4">PODL:</div>
|
||||
<div class="col-8">@($"PODL{RecMSE.IdxPOdl:00000000}")</div>
|
||||
<div class="px-1">PODL:</div>
|
||||
<div class="px-1">@($"PODL{RecMSE.IdxPOdl:00000000}")</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<div class="cardObj shadow" @onclick="ShowDetail">
|
||||
<div class="card-body p-0">
|
||||
<div class="@RecMSE.Semaforo borderStd p-1 text-center">
|
||||
<div class="fs-5" style="line-height: 1.8rem;">
|
||||
<b>@RecMSE.Nome</b>
|
||||
<br />
|
||||
<b>@RecMSE.DescrizioneStato</b>: @(FormatDurata(RecMSE.Durata))
|
||||
<div class="card bg-dark shadow @cssClassBorder @cssClassOverlay rounded-4" @onclick="ShowDetail">
|
||||
<img src="@ImgUrlMacc(RecMSE.Url)" class="card-img-top imgFitToSize rounded-top-4" alt="@RecMSE.CodMacchina">
|
||||
<div class="bg-black">
|
||||
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start">
|
||||
<div class="labelTop px-2 py-0 w-100">
|
||||
<div class="text-center fs-2 fw-bold">
|
||||
@RecMSE.Nome
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (showCard)
|
||||
{
|
||||
<div class="row">
|
||||
@*<div class="col-8 text-center text-success d-flex justify-content-between pe-2">*@
|
||||
<div class="text-center col-4 d-flex justify-content-between text-success">
|
||||
<div class="col-2"><i class="fa-regular fa-circle-check"></i></div>
|
||||
<div class="col-10">
|
||||
@($"{RecMSE.PezziConf}")
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body rounded-bottom-4 p-0 bg-dark">
|
||||
<div class="@RecMSE.Semaforo py-0 px-1">
|
||||
<div class="d-flex justify-content-between fs-5">
|
||||
<div class="px-0 @cssClassTextDescr">
|
||||
<span>@RecMSE.DescrizioneStato</span>
|
||||
</div>
|
||||
<div class="text-danger col-4">
|
||||
+
|
||||
@if (datiProdAct != null)
|
||||
<div class="px-0">
|
||||
<b>
|
||||
@(FormatDurata(RecMSE.Durata))
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-around">
|
||||
<div class="text-center text-success d-flex justify-content-between">
|
||||
<div>
|
||||
<i class="fa-regular fa-circle-check"></i> @($" {RecMSE.PezziConf}")
|
||||
</div>
|
||||
<div class="text-danger">
|
||||
@if (datiProdAct != null && datiProdAct.PzConfScarto > 0)
|
||||
{
|
||||
@($" {datiProdAct.PzConfScarto}")
|
||||
@($"(- {datiProdAct.PzConfScarto})")
|
||||
}
|
||||
</div>
|
||||
@*</div>*@
|
||||
<div class="text-center col-4 text-warning d-flex justify-content-between">
|
||||
<div class="col-2"><i class="fa-solid fa-layer-group"></i></div>
|
||||
<div class="col-10">@($"{RecMSE.PezziProd}")</div>
|
||||
</div>
|
||||
<div class="text-center text-warning ">
|
||||
<div>
|
||||
<i class="fa-solid fa-layer-group"></i> @($" {RecMSE.PezziProd}")
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between w-100" style="height: 100px; width: 100px;">
|
||||
<div class="col-6">
|
||||
<EgwCoreLib.Razor.CircleGaugeMulti Titolo="@($"{currMaxVal}")" Testo="#pz prod" maxVal="@currMaxVal" ListInner="@innerCircleVals" ListOuter="@outerCircleVals" ShowCircleBtn="true"></EgwCoreLib.Razor.CircleGaugeMulti>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="col-5">
|
||||
<EgwCoreLib.Razor.CircleGaugeMulti Titolo="@($"{currMaxVal}")" Testo="#pz rich" maxVal="@currMaxVal" ListInner="@innerCircleVals" ListOuter="@outerCircleVals" ShowCircleBtn="true"></EgwCoreLib.Razor.CircleGaugeMulti>
|
||||
</div>
|
||||
<div class="col-7 small py-2" style="line-height: 1.6rem; font-size:0.9rem;">
|
||||
|
||||
<div class="text-center text-light d-flex justify-content-between">
|
||||
<div class="px-1"><span>ART:</span></div>
|
||||
<div class="px-1">@($"{RecMSE.CodArticolo}")</div>
|
||||
</div>
|
||||
<div style="font-size: 1rem; flex-direction: column; font-size: 1rem; display: flex; justify-content: center;" class="me-3 col-6">
|
||||
<div class="text-center text-light d-flex justify-content-between">
|
||||
<div class="col-4"><span>ART.</span></div>
|
||||
<div class="col-8">@RecMSE.CodArticolo</div>
|
||||
</div>
|
||||
<div class="text-center text-light d-flex justify-content-between small">
|
||||
<div class="col-4">ORD.</div>
|
||||
<div class="col-8">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
|
||||
</div>
|
||||
<div class="text-center text-light d-flex justify-content-between small lh-sm">
|
||||
<div class="px-1">ODL:</div>
|
||||
<div class="px-1">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
|
||||
</div>
|
||||
<div class="text-center text-light d-flex justify-content-between small lh-sm">
|
||||
<div class="px-1">PODL:</div>
|
||||
<div class="px-1">@($"PODL{RecMSE.IdxPOdl:00000000}")</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -151,84 +179,108 @@ else
|
||||
else
|
||||
{
|
||||
<div class="cardObj px-3 py-1">
|
||||
<div class="text-center d-flex justify-content-between ">
|
||||
<div class="col-4">
|
||||
<div class="py-2">
|
||||
<h4 class="text-start mb-0 fw-bold">
|
||||
@RecMSE.Nome
|
||||
</h4>
|
||||
</div>
|
||||
<div style="font-size: 1rem" class="me-3">
|
||||
<div class="text-center d-flex justify-content-between align-items-center ">
|
||||
<div class="col-4 fs-5">
|
||||
<div class="lh-1">
|
||||
<div class="text-end text-success d-flex justify-content-between">
|
||||
<div class="col-4"><i class="fa-regular fa-circle-check"></i></div>
|
||||
<div class="col-8 d-flex justify-content-between">
|
||||
<div>
|
||||
@($"{RecMSE.PezziConf}")
|
||||
</div>
|
||||
<div class="text-danger">
|
||||
+
|
||||
@if (datiProdAct != null)
|
||||
{
|
||||
@($" {datiProdAct.PzConfScarto}")
|
||||
}
|
||||
</div>
|
||||
<div class="px-0">
|
||||
Confermati
|
||||
@* <i class="fa-regular fa-circle-check"></i> *@
|
||||
</div>
|
||||
<div class="px-0">
|
||||
@($"{RecMSE.PezziConf}")
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end text-warning d-flex justify-content-between">
|
||||
<div class="col-4"><i class="fa-solid fa-layer-group"></i></div>
|
||||
<div class="col-8">@($"{RecMSE.PezziProd}")</div>
|
||||
</div>
|
||||
<div class="text-end text-primary d-flex justify-content-between">
|
||||
<div class="col-4"><i class="fa-brands fa-stack-overflow"></i></div>
|
||||
<div class="col-8">@($"{RecMSE.extraVal}")</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4" style="max-height: 8rem; max-width: 8rem;">
|
||||
<EgwCoreLib.Razor.CircleGaugeMulti Titolo="@($"{currMaxVal}")" Testo="#pz prod" maxVal="@currMaxVal" ListInner="@innerCircleVals" ListOuter="@outerCircleVals" ShowCircleBtn="true"></EgwCoreLib.Razor.CircleGaugeMulti>
|
||||
</div>
|
||||
<div class="col-4 d-flex flex-wrap justify-content-center align-items-center " style="line-height: 1.6rem;">
|
||||
<div>
|
||||
@if (!string.IsNullOrEmpty(IdxMacchSub))
|
||||
@if (datiProdAct != null && datiProdAct.PzConfScarto > 0)
|
||||
{
|
||||
<div class="text-warning border border-warning rounded-3 px-2">
|
||||
@IdxMacchSub <i class="fa-solid fa-triangle-exclamation"></i>
|
||||
<div class="text-end text-danger d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
Scarto
|
||||
</div>
|
||||
<div class="px-0">
|
||||
@($"- {datiProdAct.PzConfScarto}")
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="text-end text-warning d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
Prodotti
|
||||
@* <i class="fa-solid fa-layer-group"></i> *@
|
||||
</div>
|
||||
<div class="px-0">@($"{RecMSE.PezziProd}")</div>
|
||||
</div>
|
||||
@if (RecMSE.extraVal > 0)
|
||||
{
|
||||
<div class="text-end text-primary d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
Extra
|
||||
@* <i class="fa-brands fa-stack-overflow"></i> *@
|
||||
</div>
|
||||
<div class="px-0">@($"{RecMSE.extraVal}")</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4" style="max-height: 8rem; max-width: 6rem;">
|
||||
<h4 class="text-center mb-0 fw-bold">
|
||||
@RecMSE.Nome
|
||||
</h4>
|
||||
<EgwCoreLib.Razor.CircleGaugeMulti Titolo="@($"{currMaxVal}")" Testo="#pz prod" maxVal="@currMaxVal" ListInner="@innerCircleVals" ListOuter="@outerCircleVals" ShowCircleBtn="true"></EgwCoreLib.Razor.CircleGaugeMulti>
|
||||
</div>
|
||||
<div class="col-4 d-flex flex-wrap justify-content-center align-items-center lh-1">
|
||||
<div class="w-100">
|
||||
@if (!string.IsNullOrEmpty(IdxMacchSub))
|
||||
{
|
||||
<div class="text-warning border border-warning rounded-3 small px-2 py-1 mb-1">
|
||||
@IdxMacchSub
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="w-100 fs-5">
|
||||
<div class="text-light d-flex justify-content-between small lh-sm">
|
||||
<div class="text-start col-4">ART:</div>
|
||||
<div class="text-end col-8">@($"{RecMSE.CodArticolo}")</div>
|
||||
<div class="px-0">ART</div>
|
||||
<div class="px-0">@RecMSE.CodArticolo</div>
|
||||
</div>
|
||||
<div class="text-end text-light d-flex justify-content-between small lh-sm">
|
||||
<div class="text-start col-4">ODL:</div>
|
||||
<div class="text-end col-8">@($"ODL{RecMSE.IdxOdl:00000000}")</div>
|
||||
<div class="px-0">ODL</div>
|
||||
<div class="px-0">@RecMSE.IdxOdl</div>
|
||||
</div>
|
||||
<div class="text-end text-light d-flex justify-content-between small lh-sm">
|
||||
<div class="text-start col-4">PODL:</div>
|
||||
<div class="text-end col-8">@($"PODL{RecMSE.IdxPOdl:00000000}")</div>
|
||||
<div class="px-0">PODL:</div>
|
||||
<div class="px-0">@RecMSE.IdxPOdl</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="col-10 mb-2 px-2 py-1 @RecMSE.Semaforo statusCard">
|
||||
<div class="d-flex justify-content-between mt-1">
|
||||
<div class="col mb-2 px-2 py-1 @RecMSE.Semaforo rounded">
|
||||
<div class="d-flex justify-content-center ">
|
||||
<div class="p-0 mr-auto me-1">
|
||||
<b>@RecMSE.DescrizioneStato</b> :
|
||||
@RecMSE.DescrizioneStato
|
||||
</div>
|
||||
<div class="p-0">
|
||||
@(FormatDurata(RecMSE.Durata))
|
||||
<b>@(FormatDurata(RecMSE.Durata))</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="px-1 w-100">
|
||||
<button class="btn btn-sm btn-secondary w-100"><i class="fa-regular fa-file-pdf"></i></button>
|
||||
@if (enableDisegno)
|
||||
{
|
||||
<div class="col-2">
|
||||
<div class="px-1 w-100">
|
||||
@* <a target="_blank" href="@($"disegni/{RecMSE.CodArticolo}.pdf")" class="btn btn-sm btn-secondary w-100"><i class="fa-regular fa-file-pdf"></i></a> *@
|
||||
<button class="btn btn-sm btn-info w-100" @onclick="ToggleDraw"><i class="fa-regular fa-file-pdf"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@if (enableDisegno && showDraw && RecMSE != null)
|
||||
{
|
||||
string docUrl = string.IsNullOrEmpty(RecMSE.Disegno) ? $"disegni/{RecMSE.CodArticolo}.pdf" : $"disegni/{RecMSE.Disegno}.pdf";
|
||||
<PdfDisplay Width="100%" PdfUrl="@docUrl" HeightList="@heightList"></PdfDisplay>
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using Microsoft.JSInterop;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
using NLog;
|
||||
using System;
|
||||
|
||||
namespace MP_TAB3.Components
|
||||
{
|
||||
@@ -35,6 +36,9 @@ namespace MP_TAB3.Components
|
||||
[Parameter]
|
||||
public int Width { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public bool doBlink { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
@@ -101,6 +105,81 @@ namespace MP_TAB3.Components
|
||||
[Inject]
|
||||
protected IConfiguration config { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// CSS Class bordo da stato macchina
|
||||
/// </summary>
|
||||
protected string cssClassBorder
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "border-3";
|
||||
// se blink --> bianco!
|
||||
|
||||
if (RecMSE != null)
|
||||
{
|
||||
switch (RecMSE.Semaforo)
|
||||
{
|
||||
case "sGi":
|
||||
answ += doBlink ? " border-secondary shadow shadow-primary" : " border-warning shadow shadow-warning";
|
||||
break;
|
||||
|
||||
case "sRo":
|
||||
answ += doBlink ? " border-secondary shadow shadow-primary" : " border-danger shadow shadow-danger";
|
||||
break;
|
||||
|
||||
case "sGr":
|
||||
answ += " border-dark";
|
||||
break;
|
||||
|
||||
case "sBl":
|
||||
answ += " border-primary";
|
||||
break;
|
||||
|
||||
case "sVe":
|
||||
answ += " border-success";
|
||||
break;
|
||||
|
||||
default:
|
||||
answ += " border-secondary";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CSS Class x overlay (effetto spento x macchina spenta/ sGr)
|
||||
/// </summary>
|
||||
protected string cssClassOverlay
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (RecMSE != null)
|
||||
{
|
||||
answ = RecMSE.Semaforo == "sGr" ? "bg-dark opacity-50" : "";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CSS class x testo (se descr lunga scorre...)
|
||||
/// </summary>
|
||||
protected string cssClassTextDescr
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "text-nowrap";
|
||||
if (RecMSE != null && RecMSE.DescrizioneStato.Length >= 17)
|
||||
{
|
||||
answ = " scroll-left";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected ProdAdvDispl.ProdCounter CurrCount
|
||||
{
|
||||
get
|
||||
@@ -144,22 +223,23 @@ namespace MP_TAB3.Components
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{//await Task.Delay(500);
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
//await getWDim();
|
||||
StateHasChanged();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
isLoading = RecMSE == null;
|
||||
isMobile = await JSRuntime.InvokeAsync<bool>("isDevice");
|
||||
await Task.Delay(1);
|
||||
//return base.OnAfterRenderAsync(firstRender);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
// abilitazione disegni...
|
||||
TabDServ.ConfigGetVal("enableDisegno", ref enableDisegno);
|
||||
// se configurata uso cartella virtuale... altrimenti cartella processo
|
||||
var sImgBasePath = config.GetValue<string>("OptConf:ImgBasePath");
|
||||
var sImgBasePath = config.GetValue<string>("ServerConf:ImgBasePath") ?? (config.GetValue<string>("OptConf:ImgBasePath") ?? "");
|
||||
if (!string.IsNullOrEmpty(sImgBasePath))
|
||||
{
|
||||
imgBasePath = sImgBasePath;
|
||||
@@ -175,14 +255,14 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
isLoading = RecMSE == null;
|
||||
// controllo SE avessi idxMacchSub --> rileggo!
|
||||
// controllo SE ho variazioni così rileggo
|
||||
if (RecMSE != null)
|
||||
{
|
||||
if (SDService.MachNumPzGet(RecMSE.IdxMacchina) != RecMSE.NumPezzi)
|
||||
if (SDService.MachNumPzGet(RecMSE.IdxMacchina) != RecMSE.PezziProd)
|
||||
{
|
||||
datiProdAct = await TabDServ.StatoProdMacchina(RecMSE.IdxMacchina, adesso);
|
||||
SDService.MachProdStSet(RecMSE.IdxMacchina, datiProdAct);
|
||||
SDService.MachNumPzSet(RecMSE.IdxMacchina, RecMSE.NumPezzi);
|
||||
SDService.MachNumPzSet(RecMSE.IdxMacchina, RecMSE.PezziProd);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -207,6 +287,11 @@ namespace MP_TAB3.Components
|
||||
if (RecMSE.PezziConf > 0)
|
||||
{
|
||||
innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#198754", Value = RecMSE.PezziConf });
|
||||
// se ho scarti aggiungo all'inizio
|
||||
if (datiProdAct != null && datiProdAct.PzConfScarto > 0)
|
||||
{
|
||||
innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#CD1916", Value = datiProdAct.PzConfScarto });
|
||||
}
|
||||
}
|
||||
if (RecMSE.extraVal > 0)
|
||||
{
|
||||
@@ -229,16 +314,38 @@ namespace MP_TAB3.Components
|
||||
NavMan.NavigateTo($"machine-detail");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Toggle visibilità button
|
||||
/// </summary>
|
||||
protected void ToggleDraw()
|
||||
{
|
||||
showDraw = !showDraw;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private bool enableDisegno = false;
|
||||
private string imgBasePath = "";
|
||||
private bool isLoading = false;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private Dictionary<string, string> heightList { get; set; } = new Dictionary<string, string>() { { "200", "200px" }, { "400", "400px" }, { "600", "600px" }, { "800", "800px" }, { "1000", "1000px" } };
|
||||
|
||||
/// <summary>
|
||||
/// Boolean Mobile vs Desktop
|
||||
/// </summary>
|
||||
private bool isMobile { get; set; }
|
||||
|
||||
private bool showDraw { get; set; } = false;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string cssComStatus(string semaforo, DateTime? lastUpdateN)
|
||||
|
||||
@@ -1,23 +1,11 @@
|
||||
/* Bordi */
|
||||
/*.rCAll {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.rCTop {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.rCBot {
|
||||
border-radius: 0 0 10px 10px;
|
||||
}*/
|
||||
.mapBlock {
|
||||
.mapBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
background-image: linear-gradient(#111, #000);
|
||||
min-width: 8em;
|
||||
}
|
||||
.labelTopDx {
|
||||
padding: 0.1em 0.4em;
|
||||
.labelTop {
|
||||
padding: 0.1em;
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
top: 0;
|
||||
@@ -25,24 +13,49 @@
|
||||
bottom: auto;
|
||||
color: #FFFFFF;
|
||||
background: #2200DE;
|
||||
background: rgba(33, 36, 39, 0.7);
|
||||
background: rgba(33, 36, 39, 0.75);
|
||||
border-radius: 15px 15px 0 0;
|
||||
/*-webkit-border-top-right-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
-webkit-border-top-left-radius: inherit;
|
||||
border-top-left-radius: inherit;
|
||||
-webkit-border-bottom-left-radius: inherit;
|
||||
border-bottom-left-radius: inherit;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
border-bottom-right-radius: 0;*/
|
||||
}
|
||||
/* gestione scroll testo */
|
||||
.scroll-left {
|
||||
height: 1.5em;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 70%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.scroll-left span {
|
||||
/*display: inline-block;*/
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
line-height: 1.5em;
|
||||
/* Starting position */
|
||||
-moz-transform: translateX(0%);
|
||||
-webkit-transform: translateX(0%);
|
||||
transform: translateX(0%);
|
||||
/* Apply animation to this element */
|
||||
-moz-animation: scroll-left 8s ease infinite;
|
||||
-webkit-animation: scroll-left 8s ease infinite;
|
||||
animation: scroll-left 8s ease infinite;
|
||||
}
|
||||
/* Move it (define the animation) */
|
||||
@keyframes scroll-left {
|
||||
0% {
|
||||
transform: translateX(0%);
|
||||
}
|
||||
30% {
|
||||
transform: translateX(0%);
|
||||
}
|
||||
80% {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
/* area semafori*/
|
||||
.sVe {
|
||||
text-align: left;
|
||||
background: #198754;
|
||||
/*background: rgba(0,255,80,.6);*/
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
/*color: Yellow;*/
|
||||
color: #fff;
|
||||
}
|
||||
.sGi {
|
||||
@@ -50,21 +63,17 @@
|
||||
background: #ffc107;
|
||||
background: rgba(255, 220, 0, 0.6);
|
||||
color: #fff;
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
}
|
||||
.sRo {
|
||||
text-align: left;
|
||||
background-color: #e2001a;
|
||||
background: rgba(240, 0, 10, 0.6);
|
||||
color: #fff;
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
}
|
||||
.sBl {
|
||||
text-align: left;
|
||||
background: #3690FF;
|
||||
background: rgba(0, 80, 255, 0.6);
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
/*color: Yellow;*/
|
||||
color: #fff;
|
||||
}
|
||||
.sGr {
|
||||
@@ -72,28 +81,70 @@
|
||||
background-color: #bcbcbc;
|
||||
background: rgba(180, 180, 180, 0.6);
|
||||
color: #fff;
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
}
|
||||
/*end semafori */
|
||||
/* shadow customizzate */
|
||||
/* Custom shadow class definitions */
|
||||
.shadow {
|
||||
--bs-shadow-rgb: 0, 0, 0;
|
||||
box-shadow: 0 0.5rem 1rem rgba(var(--bs-shadow-rgb), 0.15) !important;
|
||||
}
|
||||
.shadow-sm {
|
||||
--bs-shadow-rgb: 0, 0, 0;
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(var(--bs-shadow-rgb), 0.075) !important;
|
||||
}
|
||||
.shadow-lg {
|
||||
--bs-shadow-rgb: 0, 0, 0;
|
||||
box-shadow: 0 1rem 3rem rgba(var(--bs-shadow-rgb), 0.175) !important;
|
||||
}
|
||||
.shadow-none {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
/* Custom shadow classes with specific colors */
|
||||
.shadow-primary {
|
||||
--bs-shadow-rgb: var(--bs-primary-rgb);
|
||||
}
|
||||
.shadow-secondary {
|
||||
--bs-shadow-rgb: var(--bs-secondary-rgb);
|
||||
}
|
||||
.shadow-success {
|
||||
--bs-shadow-rgb: var(--bs-success-rgb);
|
||||
}
|
||||
.shadow-info {
|
||||
--bs-shadow-rgb: var(--bs-info-rgb);
|
||||
}
|
||||
.shadow-warning {
|
||||
--bs-shadow-rgb: var(--bs-warning-rgb);
|
||||
}
|
||||
.shadow-danger {
|
||||
--bs-shadow-rgb: var(--bs-danger-rgb);
|
||||
}
|
||||
.shadow-light {
|
||||
--bs-shadow-rgb: var(--bs-light-rgb);
|
||||
}
|
||||
.shadow-dark {
|
||||
--bs-shadow-rgb: var(--bs-dark-rgb);
|
||||
}
|
||||
.card-body {
|
||||
background-color: currentColor;
|
||||
background-image: linear-gradient(121deg, rgba(255, 255, 255, 0.2) -0.71%, rgba(255, 255, 255, 0.05) 97.66%);
|
||||
border-radius: 0 0 15px 15px;
|
||||
}
|
||||
.imgFitToSize {
|
||||
height: 9.5rem;
|
||||
object-fit: contain;
|
||||
border-radius: 15px 15px 0 0;
|
||||
background-color: #383b3f;
|
||||
height: 10rem;
|
||||
object-fit: cover;
|
||||
}
|
||||
.pholderHeight {
|
||||
height: 7rem;
|
||||
object-fit: cover;
|
||||
}
|
||||
@media (max-width: 640.98px) {
|
||||
.imgFitToSize {
|
||||
height: 5rem;
|
||||
height: 7.5rem;
|
||||
}
|
||||
.card-body {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
.statusCard {
|
||||
border-radius: 0.5rem;
|
||||
.pholderHeight {
|
||||
height: 5rem;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,4 @@
|
||||
/* Bordi */
|
||||
/*.rCAll {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.rCTop {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.rCBot {
|
||||
border-radius: 0 0 10px 10px;
|
||||
}*/
|
||||
|
||||
|
||||
.mapBlock {
|
||||
font-family: 'Open Sans Condensed', sans-serif;
|
||||
color: #FFF;
|
||||
@@ -18,8 +6,8 @@
|
||||
min-width: 8em;
|
||||
}
|
||||
|
||||
.labelTopDx {
|
||||
padding: 0.1em 0.4em;
|
||||
.labelTop {
|
||||
padding: 0.1em;
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
top: 0;
|
||||
@@ -27,25 +15,50 @@
|
||||
bottom: auto;
|
||||
color: #FFFFFF;
|
||||
background: #2200DE;
|
||||
background: rgba(33,36,39,.7);
|
||||
background: rgba(33,36,39,.75);
|
||||
border-radius: 15px 15px 0 0;
|
||||
/*-webkit-border-top-right-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
-webkit-border-top-left-radius: inherit;
|
||||
border-top-left-radius: inherit;
|
||||
-webkit-border-bottom-left-radius: inherit;
|
||||
border-bottom-left-radius: inherit;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
border-bottom-right-radius: 0;*/
|
||||
}
|
||||
/* gestione scroll testo */
|
||||
.scroll-left {
|
||||
height: 1.5em;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 70%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.scroll-left span {
|
||||
/*display: inline-block;*/
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
line-height: 1.5em;
|
||||
/* Starting position */
|
||||
-moz-transform: translateX(0%);
|
||||
-webkit-transform: translateX(0%);
|
||||
transform: translateX(0%);
|
||||
/* Apply animation to this element */
|
||||
-moz-animation: scroll-left 8s ease infinite;
|
||||
-webkit-animation: scroll-left 8s ease infinite;
|
||||
animation: scroll-left 8s ease infinite;
|
||||
}
|
||||
/* Move it (define the animation) */
|
||||
@keyframes scroll-left {
|
||||
0% {
|
||||
transform: translateX(0%);
|
||||
}
|
||||
30% {
|
||||
transform: translateX(0%);
|
||||
}
|
||||
80% {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
/* area semafori*/
|
||||
.sVe {
|
||||
text-align: left;
|
||||
background: #198754;
|
||||
/*background: rgba(0,255,80,.6);*/
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
/*color: Yellow;*/
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -54,7 +67,6 @@
|
||||
background: #ffc107;
|
||||
background: rgba(255,220,0,.6);
|
||||
color: #fff;
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
}
|
||||
|
||||
.sRo {
|
||||
@@ -62,15 +74,12 @@
|
||||
background-color: #e2001a;
|
||||
background: rgba(240,0,10,.6);
|
||||
color: #fff;
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
}
|
||||
|
||||
.sBl {
|
||||
text-align: left;
|
||||
background: #3690FF;
|
||||
background: rgba(0,80,255,.6);
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
/*color: Yellow;*/
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -79,33 +88,92 @@
|
||||
background-color: #bcbcbc;
|
||||
background: rgba(180,180,180,.6);
|
||||
color: #fff;
|
||||
/*padding: 0px 4px 0px 4px;*/
|
||||
}
|
||||
/*end semafori */
|
||||
|
||||
/* shadow customizzate */
|
||||
/* Custom shadow class definitions */
|
||||
|
||||
.shadow {
|
||||
--bs-shadow-rgb: 0, 0, 0;
|
||||
box-shadow: 0 0.5rem 1rem rgba(var(--bs-shadow-rgb), 0.15) !important;
|
||||
}
|
||||
|
||||
.shadow-sm {
|
||||
--bs-shadow-rgb: 0, 0, 0;
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(var(--bs-shadow-rgb), 0.075) !important;
|
||||
}
|
||||
|
||||
.shadow-lg {
|
||||
--bs-shadow-rgb: 0, 0, 0;
|
||||
box-shadow: 0 1rem 3rem rgba(var(--bs-shadow-rgb), 0.175) !important;
|
||||
}
|
||||
|
||||
.shadow-none {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
|
||||
/* Custom shadow classes with specific colors */
|
||||
|
||||
.shadow-primary {
|
||||
--bs-shadow-rgb: var(--bs-primary-rgb);
|
||||
}
|
||||
|
||||
.shadow-secondary {
|
||||
--bs-shadow-rgb: var(--bs-secondary-rgb);
|
||||
}
|
||||
|
||||
.shadow-success {
|
||||
--bs-shadow-rgb: var(--bs-success-rgb);
|
||||
}
|
||||
|
||||
.shadow-info {
|
||||
--bs-shadow-rgb: var(--bs-info-rgb);
|
||||
}
|
||||
|
||||
.shadow-warning {
|
||||
--bs-shadow-rgb: var(--bs-warning-rgb);
|
||||
}
|
||||
|
||||
.shadow-danger {
|
||||
--bs-shadow-rgb: var(--bs-danger-rgb);
|
||||
}
|
||||
|
||||
.shadow-light {
|
||||
--bs-shadow-rgb: var(--bs-light-rgb);
|
||||
}
|
||||
|
||||
.shadow-dark {
|
||||
--bs-shadow-rgb: var(--bs-dark-rgb);
|
||||
}
|
||||
|
||||
|
||||
.card-body {
|
||||
background-color: currentColor;
|
||||
background-image: linear-gradient(121deg, rgba(255, 255, 255, 0.20) -0.71%, rgba(255, 255, 255, 0.05) 97.66%);
|
||||
border-radius: 0 0 15px 15px
|
||||
}
|
||||
|
||||
.imgFitToSize {
|
||||
height: 7.5rem;
|
||||
height: 10rem;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.pholderHeight {
|
||||
height: 7rem;
|
||||
object-fit: cover;
|
||||
border-radius: 15px 15px 0 0;
|
||||
}
|
||||
|
||||
@media (max-width: 640.98px){
|
||||
.imgFitToSize{
|
||||
height: 5rem;
|
||||
height: 7.5rem;
|
||||
}
|
||||
.card-body{
|
||||
background-color: transparent;
|
||||
}
|
||||
.pholderHeight {
|
||||
height: 5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.statusCard {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.mapBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);min-width:8em;}.labelTopDx{padding:.1em .4em;width:auto;min-height:0;top:0;left:auto;bottom:auto;color:#fff;background:#2200de;background:rgba(33,36,39,.7);border-radius:15px 15px 0 0;}.sVe{text-align:left;background:#198754;color:#fff;}.sGi{text-align:left;background:#ffc107;background:rgba(255,220,0,.6);color:#fff;}.sRo{text-align:left;background-color:#e2001a;background:rgba(240,0,10,.6);color:#fff;}.sBl{text-align:left;background:#3690ff;background:rgba(0,80,255,.6);color:#fff;}.sGr{text-align:left;background-color:#bcbcbc;background:rgba(180,180,180,.6);color:#fff;}.card-body{background-color:currentColor;background-image:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);border-radius:0 0 15px 15px;}.imgFitToSize{height:7.5rem;object-fit:cover;border-radius:15px 15px 0 0;}@media(max-width:640.98px){.imgFitToSize{height:5rem;}.card-body{background-color:transparent;}}.statusCard{border-radius:.5rem;}
|
||||
.mapBlock{font-family:'Open Sans Condensed',sans-serif;color:#fff;background-image:linear-gradient(#111,#000);min-width:8em;}.labelTop{padding:.1em;width:auto;min-height:0;top:0;left:auto;bottom:auto;color:#fff;background:#2200de;background:rgba(33,36,39,.75);border-radius:15px 15px 0 0;}.scroll-left{height:1.5em;overflow:hidden;position:relative;width:70%;white-space:nowrap;}.scroll-left span{position:absolute;width:100%;height:100%;margin:0;line-height:1.5em;-moz-transform:translateX(0%);-webkit-transform:translateX(0%);transform:translateX(0%);-moz-animation:scroll-left 8s ease infinite;-webkit-animation:scroll-left 8s ease infinite;animation:scroll-left 8s ease infinite;}@keyframes scroll-left{0%{transform:translateX(0%);}30%{transform:translateX(0%);}80%{transform:translateX(-50%);}}.sVe{text-align:left;background:#198754;color:#fff;}.sGi{text-align:left;background:#ffc107;background:rgba(255,220,0,.6);color:#fff;}.sRo{text-align:left;background-color:#e2001a;background:rgba(240,0,10,.6);color:#fff;}.sBl{text-align:left;background:#3690ff;background:rgba(0,80,255,.6);color:#fff;}.sGr{text-align:left;background-color:#bcbcbc;background:rgba(180,180,180,.6);color:#fff;}.shadow{--bs-shadow-rgb:0,0,0;box-shadow:0 .5rem 1rem rgba(var(--bs-shadow-rgb),.15)!important;}.shadow-sm{--bs-shadow-rgb:0,0,0;box-shadow:0 .125rem .25rem rgba(var(--bs-shadow-rgb),.075)!important;}.shadow-lg{--bs-shadow-rgb:0,0,0;box-shadow:0 1rem 3rem rgba(var(--bs-shadow-rgb),.175)!important;}.shadow-none{box-shadow:none!important;}.shadow-primary{--bs-shadow-rgb:var(--bs-primary-rgb);}.shadow-secondary{--bs-shadow-rgb:var(--bs-secondary-rgb);}.shadow-success{--bs-shadow-rgb:var(--bs-success-rgb);}.shadow-info{--bs-shadow-rgb:var(--bs-info-rgb);}.shadow-warning{--bs-shadow-rgb:var(--bs-warning-rgb);}.shadow-danger{--bs-shadow-rgb:var(--bs-danger-rgb);}.shadow-light{--bs-shadow-rgb:var(--bs-light-rgb);}.shadow-dark{--bs-shadow-rgb:var(--bs-dark-rgb);}.card-body{background-color:currentColor;background-image:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);}.imgFitToSize{height:10rem;object-fit:cover;}.pholderHeight{height:7rem;object-fit:cover;}@media(max-width:640.98px){.imgFitToSize{height:7.5rem;}.card-body{background-color:transparent;}.pholderHeight{height:5rem;}}
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
using NLog;
|
||||
|
||||
namespace MP_TAB3.Components
|
||||
{
|
||||
public partial class MseSampler : IDisposable
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<List<MappaStatoExpl>> E_Updated { get; set; }
|
||||
|
||||
/// <summary> Moltiplicatore campionamento:
|
||||
/// HF: se > 1 (mappa)
|
||||
/// LF: se < 1 (dettaglio) </summary>
|
||||
[Parameter]
|
||||
public double SampleMult { get; set; } = 1;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (aTimer != null)
|
||||
{
|
||||
aTimer.Elapsed -= ElapsedTimer;
|
||||
aTimer.Stop();
|
||||
aTimer.Dispose();
|
||||
Log.Info("MseSampler Timer Disposed!");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected int fastTimerMSec = 3000;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration config { get; set; } = null!;
|
||||
|
||||
protected int fastRefreshMs
|
||||
{
|
||||
get
|
||||
{
|
||||
// tempo variabile tra +/- 10% del target (SampleMult) della freq standard di update MSE
|
||||
int answ = ((int)(fastTimerMSec / SampleMult * rnd.Next(900, 1100))) / 1000;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected StatusData SDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MessageService MServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
aTimer.Interval = fastRefreshMs;
|
||||
await InvokeAsync(RefreshData);
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante MseSampler.ElapsedTimer{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
SetupConf();
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
protected void StartTimer()
|
||||
{
|
||||
aTimer = new System.Timers.Timer(fastRefreshMs);
|
||||
aTimer.Elapsed += ElapsedTimer;
|
||||
aTimer.Enabled = true;
|
||||
aTimer.Start();
|
||||
Log.Info("MseSampler Timer started!");
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private System.Timers.Timer aTimer = null!;
|
||||
|
||||
private Random rnd = new Random();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task RefreshData()
|
||||
{
|
||||
List<MappaStatoExpl> ListMSE = await SDService.MseGetAll();
|
||||
await MServ.SaveMse(ListMSE);
|
||||
await E_Updated.InvokeAsync(ListMSE);
|
||||
}
|
||||
|
||||
private void SetupConf()
|
||||
{
|
||||
// sistemo i parametri opzionali...
|
||||
fastTimerMSec = config.GetValue<int>("OptConf:msRefresh");
|
||||
Log.Trace($"MseSampler setupConf | Effettuato setup parametri | fastRefreshMSec: {fastTimerMSec}");
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
}
|
||||
<div class="col-12 my-2">
|
||||
<div class="btn btn-danger w-100">
|
||||
<button class="btn btn-danger w-100" @onclick="GoToMachDetail">
|
||||
<div class="fs-1">@lblWarnHead</div>
|
||||
<div class="fs-4">
|
||||
@lblWarnBody
|
||||
@@ -52,7 +52,7 @@
|
||||
Pezzi NC: <b>@numPz2Conf</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
@if (!odlOk)
|
||||
{
|
||||
@@ -82,10 +82,10 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="col-12">
|
||||
@* <div class="col-12">
|
||||
Check articolo in revisione
|
||||
</div>
|
||||
@if (cancelSetupEnabled && RecMSE.PezziConf == 0)
|
||||
</div> *@
|
||||
@if (cancelSetupEnabled && RecMSE != null && RecMSE.PezziConf == 0)
|
||||
{
|
||||
<div class="col-12 col-md-6 p-2">
|
||||
<button class="btn btn-lg btn-danger w-100" @onclick="OdlAnnullaSetup">Annulla Setup ODL <i class="fa-solid fa-ban me-1"></i></button>
|
||||
@@ -307,7 +307,7 @@
|
||||
Pz Pallet
|
||||
</div>
|
||||
<select class="form-select" @bind="PzPallet">
|
||||
@for (int i = 1; i <= 20; i++)
|
||||
@for (int i = 1; i <= 30; i++)
|
||||
{
|
||||
<option value="@i">@i</option>
|
||||
}
|
||||
|
||||
@@ -24,7 +24,18 @@ namespace MP_TAB3.Components
|
||||
public EventCallback<List<MappaStatoExpl>> E_Updated { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public MappaStatoExpl? RecMSE { get; set; } = null;
|
||||
public MappaStatoExpl? RecMSE
|
||||
{
|
||||
get => currRecMSE;
|
||||
set
|
||||
{
|
||||
// salvo SOLO SE non sono in conferma
|
||||
if (!setupActive)
|
||||
{
|
||||
currRecMSE = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -68,6 +79,7 @@ namespace MP_TAB3.Components
|
||||
get => idxPOdlSel;
|
||||
set
|
||||
{
|
||||
setupActive = value != 0;
|
||||
if (idxPOdlSel != value)
|
||||
{
|
||||
idxPOdlSel = value;
|
||||
@@ -234,6 +246,12 @@ namespace MP_TAB3.Components
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected void GoToMachDetail()
|
||||
{
|
||||
// navigo!
|
||||
NavMan.NavigateTo($"machine-detail");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Annulla setup ODL (come se avesse fatto FINE PROD)
|
||||
/// </summary>
|
||||
@@ -401,11 +419,15 @@ namespace MP_TAB3.Components
|
||||
|
||||
// aggiorno note e tempo setup
|
||||
await TabDServ.OdlUpdate(idxODLStart, MatrOpr, tcRichAttr, PzPallet, noteAttr);
|
||||
// controllo se TC Assegnato != TCRichiesto allora invio email x verifiche...
|
||||
if (currOdl.Tcassegnato != tcRichAttr)
|
||||
// se abilitata gestione check TCiclo
|
||||
if (approvTCEnabled)
|
||||
{
|
||||
// invio email!
|
||||
await SendWarnTcChangeReq(idxODLStart, currOdl.Tcassegnato, tcRichAttr);
|
||||
// controllo se TC Assegnato != TCRichiesto allora invio email x verifiche...
|
||||
if (currOdl.Tcassegnato != tcRichAttr)
|
||||
{
|
||||
// invio email!
|
||||
await SendWarnTcChangeReq(idxODLStart, currOdl.Tcassegnato, tcRichAttr);
|
||||
}
|
||||
}
|
||||
await advStep(currStep++);
|
||||
|
||||
@@ -624,8 +646,8 @@ namespace MP_TAB3.Components
|
||||
// se fosse multi CHIUDO ODL x altra tavola...
|
||||
if (isMulti)
|
||||
{
|
||||
// se NON sono in attrezzaggio...
|
||||
if (!inAttr)
|
||||
// se NON sono in attrezzaggio// riattrezzaggio...
|
||||
if (!inAttr && !showSplitOdlRiattr)
|
||||
{
|
||||
int idxOdlAltra = 0;
|
||||
try
|
||||
@@ -702,32 +724,42 @@ namespace MP_TAB3.Components
|
||||
enableRiattrezzaggio = SMServ.GetConfBool("enableRiattrezzaggio");
|
||||
showOdlProvv = SMServ.GetConfBool("showOdlProvv");
|
||||
gPeriodReopenOdlTav = SMServ.GetConfInt("gPeriodReopenOdlTav");
|
||||
approvTCEnabled = SMServ.GetConfBool("OptAdmApprTempiEnabled");
|
||||
string rawEmailDest = SMServ.GetConf("_adminEmail");
|
||||
emailAdmDest = rawEmailDest.Split(',').ToList();
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (RecMSE != null)
|
||||
if (!setupActive)
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMaccSel))
|
||||
if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE))
|
||||
{
|
||||
IdxMaccSel = RecMSE.IdxMacchina;
|
||||
}
|
||||
isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1;
|
||||
if (isMulti)
|
||||
{
|
||||
var idxMSel = MServ.UserPrefGet(IdxMaccSel);
|
||||
if (!string.IsNullOrEmpty(idxMSel))
|
||||
if (string.IsNullOrEmpty(IdxMaccSel))
|
||||
{
|
||||
IdxMaccSel = idxMSel;
|
||||
IdxMaccSel = RecMSE.IdxMacchina;
|
||||
}
|
||||
isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1;
|
||||
if (isMulti)
|
||||
{
|
||||
var idxMSel = MServ.UserPrefGet(IdxMaccSel);
|
||||
if (!string.IsNullOrEmpty(idxMSel))
|
||||
{
|
||||
IdxMaccSel = idxMSel;
|
||||
}
|
||||
}
|
||||
IdxMaccParent = getIdxMaccParent();
|
||||
checkAll();
|
||||
// verifica stato inAttr
|
||||
await CheckAttr();
|
||||
//salvo lastRec...
|
||||
lastRecMSE = RecMSE;
|
||||
await ReloadData(true);
|
||||
}
|
||||
IdxMaccParent = getIdxMaccParent();
|
||||
}
|
||||
checkAll();
|
||||
// verifica stato inAttr
|
||||
await CheckAttr();
|
||||
await ReloadData(true);
|
||||
// verifica conferma produzione
|
||||
datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccSel, DateTime.Now);
|
||||
checkConfProd();
|
||||
}
|
||||
|
||||
protected async Task ProdEnd()
|
||||
@@ -917,7 +949,7 @@ namespace MP_TAB3.Components
|
||||
protected async Task SendWarnTcChangeReq(int idxOdl, decimal tcAss, decimal tcRich)
|
||||
{
|
||||
// carico altri parametri email...
|
||||
string oggetto = SMServ.GetConf("oggettoChgTc");
|
||||
string oggetto = $"{SMServ.GetConf("Cliente")} | {SMServ.GetConf("oggettoChgTc")}"; ;
|
||||
string corpoChgTc = SMServ.GetConf("corpoChgTc");
|
||||
string mittente = SMServ.GetConf("_fromEmail");
|
||||
string baseUrlAdmin = SMServ.GetConf("baseUrlAdmin");
|
||||
@@ -963,7 +995,10 @@ namespace MP_TAB3.Components
|
||||
protected async Task ShowRiattrezzaggio()
|
||||
{
|
||||
showSplitOdlRiattr = !showSplitOdlRiattr;
|
||||
await ReloadXDL(true);
|
||||
if (showSplitOdlRiattr)
|
||||
{
|
||||
await ReloadXDL(true);
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task SplitOdl()
|
||||
@@ -1046,70 +1081,36 @@ namespace MP_TAB3.Components
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private bool approvTCEnabled = false;
|
||||
private bool confRett = true;
|
||||
|
||||
private double currVal = 0;
|
||||
|
||||
private List<string> emailAdmDest = new List<string>();
|
||||
|
||||
private bool enableAnnullaSetup = false;
|
||||
|
||||
private bool enableFixSetup = false;
|
||||
|
||||
private bool enableRiattrezzaggio = false;
|
||||
|
||||
private bool enableRPO = true;
|
||||
|
||||
private bool enableSchedaTecnica = false;
|
||||
|
||||
private bool enableSplitODL = false;
|
||||
|
||||
private int expTimeMsec = 500;
|
||||
|
||||
private bool forceCloseOdl = true;
|
||||
|
||||
private int gPeriodReopenOdlTav = 1;
|
||||
|
||||
private string IdxMaccSel = "";
|
||||
#if false
|
||||
private string IdxMaccSelLast = "";
|
||||
#endif
|
||||
|
||||
private int idxPOdlSel = 0;
|
||||
|
||||
private bool inAttr = false;
|
||||
|
||||
private bool isInProd = false;
|
||||
|
||||
private bool isMaster = false;
|
||||
|
||||
private bool isMulti = false;
|
||||
|
||||
private bool isProcessing = false;
|
||||
private bool isLoading = false;
|
||||
|
||||
private bool isSlave = false;
|
||||
|
||||
private int lastIdxPOdl = 0;
|
||||
|
||||
private string lblOut = "";
|
||||
|
||||
private int MaxVal = 10;
|
||||
|
||||
private int modoConfProd = 0;
|
||||
|
||||
private double nextVal = 0;
|
||||
|
||||
private string noteAttr = "";
|
||||
|
||||
private int numDayOdl = 5;
|
||||
|
||||
private int PzPallet = 1;
|
||||
|
||||
private int PzPallet = 0;
|
||||
private string searchPodl = "";
|
||||
private bool showAll = false;
|
||||
|
||||
private bool showChkCloseOdlVal = false;
|
||||
private bool showOdlDetail = false;
|
||||
private bool showOdlProvv = false;
|
||||
@@ -1138,8 +1139,8 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
|
||||
private ODLExpModel currOdl { get; set; } = new ODLExpModel();
|
||||
|
||||
private PODLExpModel currPodl { get; set; } = new PODLExpModel();
|
||||
private MappaStatoExpl? currRecMSE { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se l'ALTRA macchina NON abbia ODL valido (== 0)
|
||||
@@ -1177,6 +1178,9 @@ namespace MP_TAB3.Components
|
||||
/// </summary>
|
||||
private int IdxOdlAltra { get; set; } = 0;
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
private MappaStatoExpl? lastRecMSE { get; set; } = null;
|
||||
|
||||
private string lblWarnBody
|
||||
{
|
||||
get => odlOk ? Traduci("ConfProdBeforeContinueBody") : Traduci("setOdlBeforeContinueBody");
|
||||
@@ -1211,6 +1215,8 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
private bool setupActive { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Verifica visibilità btn riprendi ODL su 2° tavola SE:
|
||||
/// - sia un impianto MULTI (= con + tavole)
|
||||
@@ -1285,7 +1291,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
private decimal tcRichAttr { get; set; } = 1;
|
||||
private decimal tcRichAttr { get; set; } = 0;
|
||||
|
||||
private string titleOdlDetail
|
||||
{
|
||||
@@ -1340,6 +1346,10 @@ namespace MP_TAB3.Components
|
||||
if (datiProdAct != null)
|
||||
{
|
||||
needConfProd = datiProdAct.Pz2RecTot > 0 && !isSlave;
|
||||
if (needConfProd)
|
||||
{
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1438,17 +1448,14 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
private void fixTcNotePzPallet()
|
||||
private void fixTcNotePzPallet(bool reloadFromOdl)
|
||||
{
|
||||
if (tcRichAttr == 0)
|
||||
if (tcRichAttr == 0 || string.IsNullOrEmpty(noteAttr) || PzPallet == 0)
|
||||
{
|
||||
tcRichAttr = IdxPOdlSel == 0 ? currOdl.Tcassegnato : currPodl.Tcassegnato;
|
||||
tcRichAttr = reloadFromOdl || IdxPOdlSel == 0 ? currOdl.TCRichAttr : currPodl.Tcassegnato;
|
||||
noteAttr = reloadFromOdl || IdxPOdlSel == 0 ? currOdl.Note : currPodl.Note;
|
||||
PzPallet = reloadFromOdl || IdxPOdlSel == 0 ? currOdl.PzPallet : currPodl.PzPallet;
|
||||
}
|
||||
if (string.IsNullOrEmpty(noteAttr))
|
||||
{
|
||||
noteAttr = IdxPOdlSel == 0 ? currOdl.Note : currPodl.Note;
|
||||
}
|
||||
PzPallet = IdxPOdlSel == 0 ? currOdl.PzPallet : currPodl.PzPallet;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1536,21 +1543,25 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
await updateIdxOdl();
|
||||
// imposto tcRichAttr in base allo stato...
|
||||
if (odlOk)
|
||||
// aggiorno questi dati SOLO SE non sono in attrezzaggio
|
||||
if (!inAttr && !showSplitOdlRiattr)
|
||||
{
|
||||
// prendo TCRich da PODL...
|
||||
if (IdxPOdlSel > 0)
|
||||
// imposto tcRichAttr in base allo stato...
|
||||
if (odlOk)
|
||||
{
|
||||
tcRichAttr = currPodl.Tcassegnato;
|
||||
noteAttr = currPodl.Note;
|
||||
PzPallet = currPodl.PzPallet;
|
||||
}
|
||||
else
|
||||
{
|
||||
tcRichAttr = currOdl.TCRichAttr;
|
||||
noteAttr = currOdl.Note;
|
||||
PzPallet = currOdl.PzPallet;
|
||||
// prendo TCRich da PODL...
|
||||
if (IdxPOdlSel > 0)
|
||||
{
|
||||
tcRichAttr = currPodl.Tcassegnato;
|
||||
noteAttr = currPodl.Note;
|
||||
PzPallet = currPodl.PzPallet;
|
||||
}
|
||||
else if (IdxOdl > 0)
|
||||
{
|
||||
tcRichAttr = currOdl.TCRichAttr;
|
||||
noteAttr = currOdl.Note;
|
||||
PzPallet = currOdl.PzPallet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1563,13 +1574,16 @@ namespace MP_TAB3.Components
|
||||
if (IdxPOdlSel > 0)
|
||||
{
|
||||
await ReloadXDL(false);
|
||||
// controllo se sia cambiato PODL
|
||||
// solo se NON sno in attrezzaggio controllo se sia cambiato PODL
|
||||
if (IdxPOdlSel != lastIdxPOdl)
|
||||
{
|
||||
lastIdxPOdl = IdxPOdlSel;
|
||||
tcRichAttr = currPodl.Tcassegnato;
|
||||
noteAttr = currPodl.Note;
|
||||
PzPallet = currPodl.PzPallet;
|
||||
if (!inAttr && !showSplitOdlRiattr)
|
||||
{
|
||||
tcRichAttr = currPodl.Tcassegnato;
|
||||
noteAttr = currPodl.Note;
|
||||
PzPallet = currPodl.PzPallet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1608,7 +1622,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
await updateIdxOdl();
|
||||
// sistemo TCiclo, note, pzPallet..
|
||||
fixTcNotePzPallet();
|
||||
fixTcNotePzPallet(reloadFromOdl);
|
||||
}
|
||||
|
||||
private async Task updateIdxOdl()
|
||||
|
||||
@@ -95,9 +95,14 @@ namespace MP_TAB3.Components
|
||||
setupConf();
|
||||
StartTimer();
|
||||
currItem = null;
|
||||
if (RecMSE != null)
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE))
|
||||
{
|
||||
IdxMaccSel = RecMSE.IdxMacchina;
|
||||
lastRecMSE = RecMSE;
|
||||
await ReloadData();
|
||||
}
|
||||
await Task.Delay(1);
|
||||
@@ -121,7 +126,11 @@ namespace MP_TAB3.Components
|
||||
|
||||
protected void StartTimer()
|
||||
{
|
||||
//int.TryParse(Configuration["ReloadStatusTimer"], out tOutPeriod);
|
||||
if (aTimer != null)
|
||||
{
|
||||
aTimer.Stop();
|
||||
aTimer.Dispose();
|
||||
}
|
||||
aTimer = new System.Timers.Timer(dtTimerTabParam);
|
||||
aTimer.Elapsed += ElapsedTimer;
|
||||
aTimer.Enabled = true;
|
||||
@@ -149,8 +158,8 @@ namespace MP_TAB3.Components
|
||||
#region Private Properties
|
||||
|
||||
private ObjItemDTO? currItem { get; set; } = null;
|
||||
|
||||
private string IdxMaccSel { get; set; } = "";
|
||||
private MappaStatoExpl? lastRecMSE { get; set; } = null;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
await FixQtyUdc();
|
||||
var currUrl = NavMan.Uri;
|
||||
string baseUrl = config["OptConf:BaseUrl"];
|
||||
string baseUrl = config.GetValue<string>("ServerConf:BaseUrlTab") ?? (config.GetValue<string>("OptConf:BaseUrlTab") ?? "");
|
||||
string UrlTabJumpMag = SMServ.GetConf("UrlTabJumpMag");
|
||||
if (string.IsNullOrEmpty(UrlTabJumpMag))
|
||||
{
|
||||
|
||||
@@ -76,15 +76,11 @@ namespace MP_TAB3.Components
|
||||
get => numPzConfermati - numPzLasciati;
|
||||
}
|
||||
|
||||
//protected int lblPzBuo2Rec { get; set; } = 0;
|
||||
protected int lblPz2RecScarto
|
||||
{
|
||||
get => numPzScarto2Rec;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected StatusData MDataService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
@@ -131,6 +127,9 @@ namespace MP_TAB3.Components
|
||||
get => (RecMSE != null && RecMSE.IdxOdl > 0);
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected StatusData SDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected SharedMemService SMServ { get; set; } = null!;
|
||||
|
||||
@@ -175,8 +174,9 @@ namespace MP_TAB3.Components
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
lblOut = "";
|
||||
if (RecMSE != null && string.IsNullOrEmpty(IdxMaccSel))
|
||||
if (RecMSE != null && (string.IsNullOrEmpty(IdxMaccSel) || !RecMSE.MostlyEquals(lastRecMSE)))
|
||||
{
|
||||
await TabDServ.FlushCache("StatoProd");
|
||||
if (!confProdActive)
|
||||
{
|
||||
numPzLasciati = 0;
|
||||
@@ -197,6 +197,9 @@ namespace MP_TAB3.Components
|
||||
IdxMaccSel = idxMSel;
|
||||
}
|
||||
}
|
||||
//salvo lastRec...
|
||||
lastRecMSE = RecMSE;
|
||||
dtReqUpdate = DateTime.Now.AddMilliseconds(100);
|
||||
await DoUpdate();
|
||||
}
|
||||
}
|
||||
@@ -210,7 +213,7 @@ namespace MP_TAB3.Components
|
||||
// refresh tabella dati tablet...
|
||||
await TabDServ.RicalcMse(IdxMaccSel, 0);
|
||||
// rileggo e salvo..
|
||||
var ListMSE = await MDataService.MseGetAll(true);
|
||||
var ListMSE = await SDService.MseGetAll(true);
|
||||
if (ListMSE != null)
|
||||
{
|
||||
// salvo in LocalStorage...
|
||||
@@ -224,6 +227,8 @@ namespace MP_TAB3.Components
|
||||
confProdActive = false;
|
||||
numPzLasciati = 0;
|
||||
dtReqUpdate = DateTime.Now;
|
||||
// azzero cache pezzi conf
|
||||
SDService.MachNumPzSet(IdxMaccSel, -1);
|
||||
await DoUpdate();
|
||||
await Task.Delay(1);
|
||||
await RefreshData();
|
||||
@@ -254,11 +259,12 @@ namespace MP_TAB3.Components
|
||||
confProdActive = !confProdActive;
|
||||
if (confProdActive)
|
||||
{
|
||||
// svuoto cache conf prod sicurezza
|
||||
await TabDServ.FlushCache("StatoProd");
|
||||
numPzLasc = 0;
|
||||
}
|
||||
dtReqUpdate = DateTime.Now;
|
||||
await DoUpdate();
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
@@ -279,10 +285,9 @@ namespace MP_TAB3.Components
|
||||
private bool confProdActive { get; set; } = false;
|
||||
private MappaStatoExpl? currRecMSE { get; set; } = null;
|
||||
private DateTime dtReqUpdate { get; set; } = DateTime.Now;
|
||||
|
||||
private string IdxMaccSel { get; set; } = "";
|
||||
|
||||
private bool isProcessing { get; set; } = false;
|
||||
private MappaStatoExpl? lastRecMSE { get; set; } = null;
|
||||
|
||||
private int MatrOpr
|
||||
{
|
||||
@@ -298,7 +303,7 @@ namespace MP_TAB3.Components
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Registra conferma produzione in modalit� nuova (con rettifica pezzi lasciati) o legacy
|
||||
/// Registra conferma produzione in modalita nuova (con rettifica pezzi lasciati) o legacy
|
||||
/// (con anticipo periodo)
|
||||
/// </summary>
|
||||
private bool effettuaConfermaProd()
|
||||
@@ -318,7 +323,7 @@ namespace MP_TAB3.Components
|
||||
|
||||
private async Task RefreshData()
|
||||
{
|
||||
List<MappaStatoExpl> ListMSE = await MDataService.MseGetAll(true);
|
||||
List<MappaStatoExpl> ListMSE = await SDService.MseGetAll(true);
|
||||
await MsgServ.SaveMse(ListMSE);
|
||||
await E_Updated.InvokeAsync(ListMSE);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
{
|
||||
<span>@($"ODL: {RecMSE.IdxOdl}")</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>n.a.</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,18 +21,21 @@
|
||||
<div class="small">
|
||||
<span>Data di inizio</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.DataInizioOdl:yyyy/MM/dd}")</span>
|
||||
}
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>@($"{RecMSE.DataInizioOdl:HH: mm}")</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -36,11 +43,20 @@
|
||||
<div class="small">
|
||||
<span>Cod Articolo</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>@RecMSE.CodArticolo</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@RecMSE.CodArticolo</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -48,11 +64,20 @@
|
||||
<div class="small">
|
||||
<span>Nr Pezzi lanciati</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.NumPezzi}") pz.</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.NumPezzi}") pz.</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -60,11 +85,20 @@
|
||||
<div class="small text-nowrap" style="font-size: .8rem">
|
||||
<span>Nr Pezzi confermati</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.PezziConf}") pz.</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.PezziConf}") pz.</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,11 +108,20 @@
|
||||
<div class="small">
|
||||
<span>Nr pezzi fatti</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>(@($"{RecMSE.PezziProd}") pz.)</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>(@($"{RecMSE.PezziProd}") pz.)</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -86,14 +129,23 @@
|
||||
<div class="small">
|
||||
<span>Efficienza globale</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>@RecMSE.OEE_tot</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@RecMSE.OEE_RT_tot)
|
||||
</span>
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@RecMSE.OEE_tot</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@RecMSE.OEE_RT_tot)
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -101,14 +153,23 @@
|
||||
<div class="small">
|
||||
<span>Efficienza lavoro</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>@RecMSE.OEE_wrk</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@RecMSE.OEE_RT_wrk)
|
||||
</span>
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@RecMSE.OEE_wrk</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@RecMSE.OEE_RT_wrk)
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -116,42 +177,53 @@
|
||||
<div class="small text-nowrap" style="font-size: .8rem">
|
||||
<span>Efficienza teorica</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>@RecMSE.OEE_run</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@RecMSE.OEE_RT_run)
|
||||
</span>
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@RecMSE.OEE_run</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@RecMSE.OEE_RT_run)
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between ">
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
<div class="cardFullHeight p-1">
|
||||
<div class="small">
|
||||
<span>Tc medio</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>
|
||||
@($"{RecMSE.TCMedio:0.###}")
|
||||
</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@($"{RecMSE.TCMedioRt:0.###}"))
|
||||
</span>
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>
|
||||
@($"{RecMSE.TCMedio:0.###}")
|
||||
</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@($"{RecMSE.TCMedioRt:0.###}"))
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -159,14 +231,23 @@
|
||||
<div class="small">
|
||||
<span>Tc lavoro</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.TCLav:0.###}")</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@($"{RecMSE.TCLavRT:0.###}"))
|
||||
</span>
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.TCLav:0.###}")</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@($"{RecMSE.TCLavRT:0.###}"))
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -174,14 +255,23 @@
|
||||
<div class="small">
|
||||
<span>Tc tecnico</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.TCEff:0.###}")</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@($"{RecMSE.TCEffRT:0.###}"))
|
||||
</span>
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span>@($"{RecMSE.TCEff:0.###}")</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
<span>
|
||||
(@($"{RecMSE.TCEffRT:0.###}"))
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 p-1 flex-fill">
|
||||
@@ -189,11 +279,20 @@
|
||||
<div class="small text-nowrap" style="font-size: .8rem">
|
||||
<span>Tc impostato</span>
|
||||
</div>
|
||||
<div class="text-center fw-bold">
|
||||
<span> @($"{RecMSE.TCAssegnato:0.###}")</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
@if (RecMSE != null)
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
<span> @($"{RecMSE.TCAssegnato:0.###}")</span>
|
||||
</div>
|
||||
<div class="text-center small">
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-center fw-bold">
|
||||
n.a.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class=" col-4 col-sm-4 col-md-4 col-lg-2 flex-fill ">
|
||||
<div class=" col-4 col-sm-4 col-md-4 col-lg-2 flex-fill2 ">
|
||||
<div class="p-2 h-100 w-100">
|
||||
<div class="@objCss text-center card w-100 h-100" @onclick="() => ReportSelected()">
|
||||
<div class="card-body text-light">
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
@foreach (var item in ListComplete)
|
||||
@foreach (var item in listCauScarto)
|
||||
{
|
||||
<div class="col-6 col-lg-4 col-xl-3 mt-2">
|
||||
<button class="btn w-100 btn-lg @($"btn-{item.cssClass}")" @onclick="() => doSave(item)">
|
||||
<i class="@item.icona"></i> <span style="font-size: 1rem;">@item.label</span>
|
||||
<i class="@item.icona"></i><span cs="fs-5 ps-2">@item.label</span>
|
||||
</button>
|
||||
<asp:LinkButton ID="hlRegistra" runat="server" OnClick="hlRegistra_Click" CommandArgument='<%# Eval("value") %>' CssClass='<%# "btn w-100 btn-lg btn-" + Eval("cssClass")%>'>
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
|
||||
protected string errMsg { get; set; } = "";
|
||||
protected List<vSelCauScartoModel> ListComplete { get; set; } = new List<vSelCauScartoModel>();
|
||||
protected List<vSelCauScartoModel> listCauScarto { get; set; } = new List<vSelCauScartoModel>();
|
||||
|
||||
[Inject]
|
||||
protected MessageService MServ { get; set; } = null!;
|
||||
@@ -124,7 +124,11 @@ namespace MP_TAB3.Components
|
||||
|
||||
protected async Task ReloadData()
|
||||
{
|
||||
ListComplete = await TabServ.VSCS_getAll();
|
||||
var rawData = await TabServ.VSCS_getAll();
|
||||
listCauScarto = rawData
|
||||
.Where(x => x.isEnabled)
|
||||
.OrderBy(x => x.label)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
protected void resetDate()
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
|
||||
DateTime fine = DateTime.Today.AddDays(1);
|
||||
DateTime inizio = fine.AddDays(-8);
|
||||
DateTime inizio = fine.AddDays(-3);
|
||||
CurrPeriodo = new Periodo(inizio, fine);
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
|
||||
<div class="row align-items-center flex-wrap">
|
||||
@*<div class="col-12 text-end">
|
||||
<div class="form-check form-switch fs-3">
|
||||
<input class="form-check-input" type="checkbox" @bind="@ShowMS">
|
||||
<label class="form-check-label">@txtSelMS</label>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-8">
|
||||
<div class="row align-items-center flex-wrap my-3">
|
||||
<div class="col-12 col-md-8">
|
||||
@if (tcMode == "mc")
|
||||
{
|
||||
<div class="input-group">
|
||||
@@ -16,13 +10,31 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="input-group my-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">@labelTempoIN</span>
|
||||
<input type="time" class="form-control" @bind="@selTempoMS" step="1">
|
||||
<select @bind="@selOre" class="form-select">
|
||||
@for (int i = 0; i < 24; i++)
|
||||
{
|
||||
<option value="@i">@i.ToString("00")</option>
|
||||
}
|
||||
</select>
|
||||
<select @bind="@selMin" class="form-select">
|
||||
@for (int i = 0; i < 60; i++)
|
||||
{
|
||||
<option value="@i">@i.ToString("00")</option>
|
||||
}
|
||||
</select>
|
||||
<select @bind="@selSec" class="form-select">
|
||||
@for (int i = 0; i < 60; i++)
|
||||
{
|
||||
<option value="@i">@i.ToString("00")</option>
|
||||
}
|
||||
</select>
|
||||
@* <input type="time" class="form-control" @bind="@selTempoMS" step="1"> *@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-12 col-md-4">
|
||||
→ @lblTempo
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.Services;
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace MP_TAB3.Components
|
||||
{
|
||||
@@ -83,11 +85,6 @@ namespace MP_TAB3.Components
|
||||
/// </summary>
|
||||
protected decimal _tempoMC { get; set; } = 0;
|
||||
|
||||
//protected timeMode modoTempo
|
||||
//{
|
||||
// get => ShowMS ? timeMode.MS : timeMode.MC;
|
||||
//}
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
@@ -104,6 +101,34 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected int selOre
|
||||
{
|
||||
get => TempoMS.Hours;
|
||||
set
|
||||
{
|
||||
TempoMS = new TimeSpan(value, selMin, selSec);
|
||||
E_TCRich.InvokeAsync(TempoMC);
|
||||
}
|
||||
}
|
||||
protected int selMin
|
||||
{
|
||||
get => TempoMS.Minutes;
|
||||
set
|
||||
{
|
||||
TempoMS = new TimeSpan(selOre,value, selSec);
|
||||
E_TCRich.InvokeAsync(TempoMC);
|
||||
}
|
||||
}
|
||||
protected int selSec
|
||||
{
|
||||
get => TempoMS.Seconds;
|
||||
set
|
||||
{
|
||||
TempoMS = new TimeSpan(selOre, selMin, value);
|
||||
E_TCRich.InvokeAsync(TempoMC);
|
||||
}
|
||||
}
|
||||
|
||||
protected bool ShowMS { get; set; } = true;
|
||||
|
||||
[Inject]
|
||||
@@ -146,7 +171,7 @@ namespace MP_TAB3.Components
|
||||
/// <returns></returns>
|
||||
protected TimeSpan minCent2Sec(decimal valore)
|
||||
{
|
||||
TimeSpan answ = TimeSpan.FromSeconds((double)valore * 60);
|
||||
TimeSpan answ = TimeSpan.FromSeconds(Math.Round((double)(valore * 60)));
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -186,7 +211,7 @@ namespace MP_TAB3.Components
|
||||
/// <summary>
|
||||
/// tempo min:sec
|
||||
/// </summary>
|
||||
private TimeSpan _tempoMS { get; set; } = TimeSpan.FromSeconds(1);
|
||||
private TimeSpan _tempoMS { get; set; } = TimeSpan.FromSeconds(3599);
|
||||
|
||||
private string baseLang
|
||||
{
|
||||
@@ -208,7 +233,7 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "ore:min:sec";
|
||||
answ = "h:m:s";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,9 @@ namespace MP_TAB3.Components
|
||||
protected bool ListArtDisabled { get => string.IsNullOrEmpty(SearchVal) || SearchVal.Length < SearchMinChar; }
|
||||
protected Dictionary<string, string>? ListArticoli { get; set; } = null;
|
||||
protected Dictionary<string, string> ListArticoliAll { get; set; } = new Dictionary<string, string>();
|
||||
protected Dictionary<string, string> ListMacchineAll {
|
||||
get => MServ.DictMacchine;
|
||||
protected Dictionary<string, string> ListMacchineAll
|
||||
{
|
||||
get => MServ.DictMacchine;
|
||||
set => MServ.DictMacchine = value;
|
||||
}
|
||||
|
||||
@@ -148,7 +149,8 @@ namespace MP_TAB3.Components
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
BaseAddr = config.GetValue<string>("OptConf:BaseAddr") ?? "";
|
||||
// Cerco in ServerConf e se non trovato in OptConf...
|
||||
BaseAddr = config.GetValue<string>("ServerConf:BaseAddr") ?? (config.GetValue<string>("OptConf:BaseAddr") ?? "");
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
|
||||
@@ -49,14 +49,15 @@ namespace MP_TAB3.Components
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (RecMSE != null)
|
||||
if (RecMSE != null && !RecMSE.MostlyEquals(lastRecMSE))
|
||||
{
|
||||
CodArticolo = RecMSE.CodArticolo;
|
||||
IdxMaccSel = RecMSE.IdxMacchina;
|
||||
IdxOdl = RecMSE.IdxOdl ?? 0;
|
||||
lastRecMSE = RecMSE;
|
||||
await ReloadData();
|
||||
checkReset();
|
||||
}
|
||||
await ReloadData();
|
||||
checkReset();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
@@ -64,9 +65,7 @@ namespace MP_TAB3.Components
|
||||
#region Private Fields
|
||||
|
||||
private string CodArticolo = "";
|
||||
|
||||
private bool inAttr = false;
|
||||
|
||||
private bool isProcessing = false;
|
||||
|
||||
#endregion Private Fields
|
||||
@@ -74,8 +73,8 @@ namespace MP_TAB3.Components
|
||||
#region Private Properties
|
||||
|
||||
private string IdxMaccSel { get; set; } = "";
|
||||
|
||||
private int IdxOdl { get; set; } = 0;
|
||||
private MappaStatoExpl? lastRecMSE { get; set; } = null;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
@@ -91,16 +90,13 @@ namespace MP_TAB3.Components
|
||||
// SOLO SE ho articolo senn� niente reset...
|
||||
if (!string.IsNullOrEmpty(CodArticolo))
|
||||
{
|
||||
// controllo se la macchina � in attrezzaggio...
|
||||
// controllo se la macchina sia in attrezzaggio...
|
||||
var rigaStato = TabDServ.StatoMacchina(IdxMaccSel);
|
||||
if (rigaStato != null)
|
||||
{
|
||||
inAttr = (rigaStato.IdxStato == 2);
|
||||
}
|
||||
}
|
||||
#if false
|
||||
cmp_ST_objCheck.checkInputData();
|
||||
#endif
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
|
||||
@@ -44,9 +44,18 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
if (IdxOdl > 0 && !string.IsNullOrEmpty(CodGruppo))
|
||||
{
|
||||
await ReloadData();
|
||||
if (CodArticolo != codArticoloLast || IdxOdl != idxOdlLast || CodGruppo!=codGruppoLast)
|
||||
{
|
||||
codArticoloLast = CodArticolo;
|
||||
idxOdlLast = IdxOdl;
|
||||
codGruppoLast = CodGruppo;
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
private int idxOdlLast = 0;
|
||||
private string codArticoloLast = "";
|
||||
private string codGruppoLast = "";
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TabServ { get; set; } = null!;
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
if (IdxOdl > 0)
|
||||
{
|
||||
var rawData = TabDServ.STAR_pendByOdl(IdxOdl);
|
||||
showChecks = rawData.Count > 0;
|
||||
var rawData = TabDServ.STAR_pendByOdl(IdxOdl);
|
||||
showChecks = rawData.Count > 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -52,7 +52,6 @@ namespace MP_TAB3.Components
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await processInput();
|
||||
//await InvokeAsync(() => StateHasChanged());
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
@@ -70,13 +69,20 @@ namespace MP_TAB3.Components
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
checkInputData();
|
||||
if (CodArticolo != codArticoloLast || IdxOdl != idxOdlLast)
|
||||
{
|
||||
codArticoloLast = CodArticolo;
|
||||
idxOdlLast = IdxOdl;
|
||||
checkInputData();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string codArticoloLast = "";
|
||||
private int idxOdlLast = 0;
|
||||
private string lastBCodeVal = "";
|
||||
private string MessageCss = "";
|
||||
private string MessageText = "";
|
||||
|
||||
@@ -3,13 +3,18 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2401.511</Version>
|
||||
<Version>6.16.2403.711</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Components\MseSampler.razor.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="compilerconfig.json" />
|
||||
<Content Remove="Components\MseSampler.razor" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -20,14 +25,14 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2312.1510" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2312.1510" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2402.2311" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2402.2311" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Data\" />
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Data\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+1
-1
@@ -39,8 +39,8 @@
|
||||
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="Info" writeTo="consoleTarget" />-->
|
||||
<logger name="*" minlevel="Trace" writeTo="consoleTarget" />
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/alarms"
|
||||
@inherits BasePage
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,63 +1,15 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class Alarms
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data;
|
||||
using MP.Data.Services;
|
||||
using Newtonsoft.Json;
|
||||
using NLog.Fluent;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
/// <summary>
|
||||
/// Pagina base da cui ereditare metodi x refresh dati da RedisChannel (MessagePipe)
|
||||
/// </summary>
|
||||
public partial class BasePage : IDisposable
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dato di dettaglio MSE per macchina
|
||||
/// </summary>
|
||||
public MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Macchina selezionata
|
||||
/// </summary>
|
||||
public string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
public MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
public TabDataFeeder TDFeeder { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Metodo dispose
|
||||
/// </summary>
|
||||
public virtual void Dispose()
|
||||
{
|
||||
IdxMacc = "";
|
||||
CurrMSE = null;
|
||||
TDFeeder.dataPipe.EA_NewMessage -= DataPipe_EA_NewMessage;
|
||||
TDFeeder.blinkPipe.EA_NewMessage -= BlinkPipe_EA_NewMessage;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Override Oninit x aggancio evento update da MessagePipe
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
TDFeeder.dataPipe.EA_NewMessage += DataPipe_EA_NewMessage;
|
||||
TDFeeder.blinkPipe.EA_NewMessage += BlinkPipe_EA_NewMessage;
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo refresh con controllo salvataggio in LocalStorage ogni 5 sec
|
||||
/// </summary>
|
||||
/// <param name="ListMSE"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task RefreshData(List<MappaStatoExpl> ListMSE)
|
||||
{
|
||||
// se vecchio salvo sul browser...
|
||||
if (DateTime.Now.Subtract(lastSave).TotalSeconds > 5)
|
||||
{
|
||||
// salvo in LocalStorage...
|
||||
await MsgServ.SaveMse(ListMSE);
|
||||
lastSave = DateTime.Now;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await RefreshMBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refresh con rilettura da LocalStorage
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task RefreshMBlock()
|
||||
{
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
}
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool doBlink = false;
|
||||
|
||||
/// <summary>
|
||||
/// DateTime ultimo salvataggio in LocalStorage
|
||||
/// </summary>
|
||||
private DateTime lastSave = DateTime.Now;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Ricezione evento blink
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void BlinkPipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
{
|
||||
PubSubEventArgs currArgs = (PubSubEventArgs)e;
|
||||
// conversione on-the-fly List<string> --> allarmi
|
||||
if (!string.IsNullOrEmpty(currArgs.newMessage))
|
||||
{
|
||||
try
|
||||
{
|
||||
var dataRaw = JsonConvert.DeserializeObject<string>(currArgs.newMessage);
|
||||
if (dataRaw != null)
|
||||
{
|
||||
bool.TryParse($"{dataRaw}", out doBlink);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricevuto nuovi dati da mostrare!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void DataPipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
{
|
||||
PubSubEventArgs currArgs = (PubSubEventArgs)e;
|
||||
// conversione on-the-fly List<string> --> allarmi
|
||||
if (!string.IsNullOrEmpty(currArgs.newMessage))
|
||||
{
|
||||
try
|
||||
{
|
||||
List<MappaStatoExpl>? dataList = JsonConvert.DeserializeObject<List<MappaStatoExpl>>(currArgs.newMessage);
|
||||
if (dataList != null)
|
||||
{
|
||||
InvokeAsync(() => RefreshData(dataList));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
@page "/CardDemo"
|
||||
|
||||
@if (CardTitles == null || CardTitles.Count == 0)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12 my-2 alert alert-secondary fs-3">
|
||||
waiting on browser
|
||||
</div>
|
||||
@for (int i = 0; i < 9; i++)
|
||||
{
|
||||
<div class="col-4 my-2">
|
||||
<CardTest Title="Loading" DoPlaceholder="true" CardCss="bg-secondary">
|
||||
</CardTest>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 my-2 alert alert-success fs-3">
|
||||
loaded on browser
|
||||
</div>
|
||||
@foreach (var item in CardTitles)
|
||||
{
|
||||
<div class="col-4 my-2">
|
||||
<CardTest Title="@item">
|
||||
<div>
|
||||
Demo content page for <b>@item</b>
|
||||
</div>
|
||||
<div>
|
||||
This is an example Blazor component!
|
||||
</div>
|
||||
</CardTest>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
protected List<string>? CardTitles { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
CardTitles = null;
|
||||
await Task.Delay(300);
|
||||
CardTitles = new List<string>();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await Task.Delay(300);
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
CardTitles.Add($"Card {i + 1:00}");
|
||||
}
|
||||
await Task.Delay(10);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/controls"
|
||||
@inherits BasePage
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null || IsLoading)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class Controls
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
@@ -27,27 +23,10 @@ namespace MP_TAB3.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
protected void SetMacc(string selIdxMacc)
|
||||
{
|
||||
IdxMaccSubSel = selIdxMacc;
|
||||
@@ -58,24 +37,14 @@ namespace MP_TAB3.Pages
|
||||
#region Private Fields
|
||||
|
||||
private string IdxMaccSubSel = "";
|
||||
|
||||
private bool IsLoading = false;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@page "/declarations"
|
||||
@inherits BasePage
|
||||
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,46 +1,15 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class Declarations
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
protected void SetMacc(string selIdxMacc)
|
||||
{
|
||||
IdxMaccSubSel = selIdxMacc;
|
||||
@@ -53,22 +22,5 @@ namespace MP_TAB3.Pages
|
||||
private string IdxMaccSubSel = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,4 @@
|
||||
|
||||
<img src="images/LogoEgw.png" />
|
||||
|
||||
@code {
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
}
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data;
|
||||
using MP.Data.Services;
|
||||
using MP_TAB3.Shared;
|
||||
using NLog.Fluent;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class Index : IDisposable
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//GC.Collect();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/iob-info"
|
||||
@inherits BasePage
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,63 +1,15 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class IobInfo
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,41 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Components.Routing;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.Web.Virtualization;
|
||||
using Microsoft.JSInterop;
|
||||
using MP_TAB3;
|
||||
using MP_TAB3.Shared;
|
||||
using MP_TAB3.Components;
|
||||
using MP.Data;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.DTO;
|
||||
using MP.Data.Services;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using EgwCoreLib.Razor;
|
||||
using Blazored.LocalStorage;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class Logout
|
||||
public partial class Logout : IDisposable
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//GC.Collect();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected ILocalStorageService localStorage { get; set; } = null!;
|
||||
[Inject]
|
||||
protected TabDataService TDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TDService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
MsgServ.RigaOper = null;
|
||||
return base.OnAfterRenderAsync(firstRender);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -60,5 +65,7 @@ namespace MP_TAB3.Pages
|
||||
MsgServ.RigaOper = null;
|
||||
NavMan.NavigateTo("reg-new-device", true);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
@page "/machine-detail"
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@inherits BasePage
|
||||
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
using NLog;
|
||||
|
||||
@@ -9,12 +8,6 @@ namespace MP_TAB3.Pages
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected SharedMemService MStor { get; set; } = null!;
|
||||
|
||||
@@ -27,39 +20,15 @@ namespace MP_TAB3.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
await base.OnInitializedAsync();
|
||||
// recupero parametri configurazione...
|
||||
await setupConf();
|
||||
if (enableSchedaTecnica)
|
||||
{
|
||||
checkLottiOdl();
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await RefreshMBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task RefreshMBlock()
|
||||
{
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
|
||||
protected void SetMacc(string selIdxMacc)
|
||||
{
|
||||
IdxMaccSubSel = selIdxMacc;
|
||||
@@ -73,6 +42,7 @@ namespace MP_TAB3.Pages
|
||||
private bool enableMagLotti = false;
|
||||
private bool enableSchedaTecnica = false;
|
||||
private string IdxMaccSubSel = "";
|
||||
private DateTime lastSave = DateTime.Now;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -102,27 +72,7 @@ namespace MP_TAB3.Pages
|
||||
#endif
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
}
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in ReloadData{Environment.NewLine}{exc}");
|
||||
}
|
||||
// recupero parametri configurazione...
|
||||
await setupConf();
|
||||
}
|
||||
|
||||
|
||||
private async Task setupConf()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/notes"
|
||||
@inherits BasePage
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,63 +1,15 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class Notes
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/odl"
|
||||
@inherits BasePage
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,53 +1,12 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
using NLog;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class ODL
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await RefreshMBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task RefreshMBlock()
|
||||
{
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
protected void SetMacc(string selIdxMacc)
|
||||
@@ -59,34 +18,8 @@ namespace MP_TAB3.Pages
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private string IdxMaccSubSel = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
}
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in ReloadData{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/parameters"
|
||||
@inherits BasePage
|
||||
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,63 +1,14 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class Parameters
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/prod-plan"
|
||||
@inherits BasePage
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,72 +1,15 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
using NLog;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class ProdPlan
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccerione in ReloadData{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/prod-stop"
|
||||
@inherits BasePage
|
||||
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
@@ -17,13 +16,20 @@ else
|
||||
<div class="d-flex justify-content-between flex-wrap align-items-center mb-3">
|
||||
@if (!string.IsNullOrEmpty(lblOut))
|
||||
{
|
||||
<div class="alert @alertCss fs-5 w-100">
|
||||
@lblOut
|
||||
<div class="alert @alertCss shadow-lg fs-1 text-center p-5 w-100">
|
||||
<b>@titleOut</b>
|
||||
<div>
|
||||
@lblOut
|
||||
</div>
|
||||
<button class="btn btn-success" @onclick="ForceReloadPage"><i class="fa-solid fa-rotate-right"></i> Reload page</button>
|
||||
</div>
|
||||
}
|
||||
@foreach (var item in events2show)
|
||||
else
|
||||
{
|
||||
<ProdStopMan objCss="@item.CssClass" objIcon="@item.Icon" objTxt="@(item.label)" IdxEvento="@item.value" E_EventSelected="EventRecord"></ProdStopMan>
|
||||
@foreach (var item in events2show)
|
||||
{
|
||||
<ProdStopMan objCss="@item.CssClass" objIcon="@item.Icon" objTxt="@(item.label)" IdxEvento="@item.value" E_EventSelected="EventRecord"></ProdStopMan>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Routing;
|
||||
using MP.Data;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
@@ -12,10 +13,16 @@ namespace MP_TAB3.Pages
|
||||
#region Protected Fields
|
||||
|
||||
protected int dltMinRealtime = 1;
|
||||
|
||||
protected bool isProcessing = false;
|
||||
|
||||
protected string lblOut = "";
|
||||
protected int minAnticipoRicalcolo = 1;
|
||||
|
||||
protected bool rdm_ChkOnly = false;
|
||||
|
||||
protected int rdm_nEvCheck = 1;
|
||||
|
||||
protected int rdm_nEvStep = 1;
|
||||
|
||||
#endregion Protected Fields
|
||||
@@ -24,14 +31,10 @@ namespace MP_TAB3.Pages
|
||||
|
||||
protected string alertCss { get; set; } = "alert-danger";
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
|
||||
protected DateTime DtRif { get; set; } = DateTime.Now;
|
||||
|
||||
protected List<vSelEventiBCodeModel> events2show { get; set; } = new List<vSelEventiBCodeModel>();
|
||||
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Determina se insert sia Realtime o batch con DataOra (in base a diff tra DataOra
|
||||
/// selezionata e realtime, se superiore ad X minuti NON � realtime)
|
||||
@@ -49,14 +52,9 @@ namespace MP_TAB3.Pages
|
||||
}
|
||||
}
|
||||
|
||||
protected string lblOut { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected StatusData MDataService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MessageService MServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
@@ -182,12 +180,13 @@ namespace MP_TAB3.Pages
|
||||
TabDServ.MacchinaSetInsEnab(IdxMacc, true);
|
||||
}
|
||||
// mostro esito
|
||||
alertCss = "alert-succes";
|
||||
lblOut = $"Registrata dichiarazione fermata [{rigaEvento.Nome}] alle {DateTime.Now:HH:mm:ss}";
|
||||
alertCss = "alert-primary";
|
||||
titleOut = rigaEvento.Nome;
|
||||
lblOut = $"Registrata dichiarazione fermata alle {DateTime.Now:HH:mm:ss}";
|
||||
}
|
||||
else
|
||||
{
|
||||
alertCss = "alert-danger";
|
||||
alertCss = "alert-warning";
|
||||
lblOut = $"Codice evento non valido! {IdxEv}";
|
||||
}
|
||||
}
|
||||
@@ -198,7 +197,7 @@ namespace MP_TAB3.Pages
|
||||
if (ListMSE != null)
|
||||
{
|
||||
// salvo in LocalStorage...
|
||||
await MServ.SaveMse(ListMSE);
|
||||
await MsgServ.SaveMse(ListMSE);
|
||||
// aggiorno MSE attuale
|
||||
CurrMSE = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
}
|
||||
@@ -206,35 +205,49 @@ namespace MP_TAB3.Pages
|
||||
// se non era realtime --> rimando a commenti
|
||||
if (needReload)
|
||||
{
|
||||
await MServ.LastOpenedPageSet("notes");
|
||||
await MsgServ.LastOpenedPageSet("notes");
|
||||
NavMan.NavigateTo("notes");
|
||||
}
|
||||
}
|
||||
|
||||
protected void ForceReloadPage()
|
||||
{
|
||||
NavMan.NavigateTo(NavMan.Uri, true);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
dltMinRealtime = SMServ.GetConfInt("dltMinRealtime");
|
||||
minAnticipoRicalcolo = SMServ.GetConfInt("minAnticipoRicalcolo");
|
||||
rdm_nEvStep = SMServ.GetConfInt("rdm_nEvStep");
|
||||
rdm_nEvCheck = SMServ.GetConfInt("rdm_nEvCheck");
|
||||
rdm_ChkOnly = SMServ.GetConfBool("rdm_ChkOnly");
|
||||
}
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
// leggo gli altri dati
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
protected override async Task ReloadData()
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
try
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
await base.ReloadData();
|
||||
// recupero eventi
|
||||
var eventsAll = await TabDServ.AnagEventiGetByMacch(IdxMacc);
|
||||
if (eventsAll != null)
|
||||
{
|
||||
events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x => x.label).ToList();
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (Exception exc)
|
||||
{
|
||||
await ReloadData();
|
||||
Log.Error($"ProdStop: Eccezione in reloadData {Environment.NewLine}{exc}");
|
||||
await MsgServ.LastOpenedPageSet("/");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -249,6 +262,7 @@ namespace MP_TAB3.Pages
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private string titleOut = "";
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -256,39 +270,9 @@ namespace MP_TAB3.Pages
|
||||
|
||||
private int MatrOpr
|
||||
{
|
||||
get => MServ.MatrOpr;
|
||||
get => MsgServ.MatrOpr;
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
try
|
||||
{
|
||||
IdxMacc = await MServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
var eventsAll = await TabDServ.AnagEventiGetByMacch(IdxMacc);
|
||||
if (eventsAll != null)
|
||||
{
|
||||
events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x => x.label).ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"ProdStop: Eccezione in reloadData {Environment.NewLine}{exc}");
|
||||
await MServ.LastOpenedPageSet("/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
@if (ShowScanBarcode)
|
||||
{
|
||||
|
||||
<BarcodeReader ScanResult="(e) => ScanDoneHandler(e)"
|
||||
Close="ToggleCodeScan"
|
||||
ScanBtnTitle="Scan"
|
||||
@@ -19,7 +20,7 @@
|
||||
UseBuiltinDiv="false"
|
||||
@ref="barcodeReaderCustom"
|
||||
SelectDeviceBtnTitle="Select Device">
|
||||
</BarcodeReader>
|
||||
</BarcodeReader>
|
||||
|
||||
<div @ref="barcodeReaderCustom.Element" class="d-flex justify-content-center">
|
||||
<div class="col-12 col-md-8 col-lg-6">
|
||||
@@ -37,14 +38,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@if (oprsList.Count > 0)
|
||||
@if (oprList.Count > 0)
|
||||
{
|
||||
<div class="mb-1">
|
||||
<span class="fs-5 fw-bold">Selezionare un operatore</span>
|
||||
<select class="form-select" @bind="matrOpr">
|
||||
@foreach (var opr in oprsList)
|
||||
@foreach (var opr in oprList)
|
||||
{
|
||||
<option value="@opr.MatrOpr">@($"{opr.Cognome} {opr.Nome}")</option>
|
||||
}
|
||||
|
||||
@@ -9,12 +9,25 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class RegNewDevice
|
||||
public partial class RegNewDevice : IDisposable
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
txtError = "";
|
||||
matrOpr = 0;
|
||||
oprList = new List<AnagOperatoriModel>();
|
||||
//GC.Collect();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected int expDays = 1;
|
||||
|
||||
protected string txtError = "";
|
||||
protected DateTime vetoScan = DateTime.Now;
|
||||
|
||||
#endregion Protected Fields
|
||||
@@ -41,16 +54,14 @@ namespace MP_TAB3.Pages
|
||||
}
|
||||
}
|
||||
|
||||
protected EgwCoreLib.Razor.BarcodeReader barcodeReaderCustom { get; set; } = null!;
|
||||
protected string CurrOprTknLS { get; set; } = null!;
|
||||
|
||||
protected string CurrOprTknRedis { get; set; } = null!;
|
||||
|
||||
protected int matrOpr
|
||||
{
|
||||
get
|
||||
{
|
||||
return _matrOpr;
|
||||
}
|
||||
get { return _matrOpr; }
|
||||
set => _matrOpr = value;
|
||||
}
|
||||
|
||||
@@ -60,31 +71,20 @@ namespace MP_TAB3.Pages
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
protected List<AnagOperatoriModel> oprsList { get; set; } = new List<AnagOperatoriModel>();
|
||||
protected List<AnagOperatoriModel> oprList { get; set; } = new List<AnagOperatoriModel>();
|
||||
|
||||
protected AnagOperatoriModel rigaOpr { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TDService { get; set; } = null!;
|
||||
[Inject]
|
||||
protected SharedMemService SMServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TDService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task ToggleCodeScan()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
ShowScanBarcode = !ShowScanBarcode;
|
||||
}
|
||||
|
||||
protected string txtError = "";
|
||||
|
||||
protected string Traduci(string lemma)
|
||||
{
|
||||
return SMServ.Traduci($"EN_{lemma}".ToUpper());
|
||||
}
|
||||
protected async Task FirstLogIn()
|
||||
{
|
||||
rigaOpr = await TDService.OperatoreSearch(matrOpr, authKey);
|
||||
@@ -94,6 +94,7 @@ namespace MP_TAB3.Pages
|
||||
var deHash = TDService.DecryptData(authKey);
|
||||
rigaOpr = await TDService.OperatoreSearch(matrOpr, deHash);
|
||||
}
|
||||
await Task.Delay(50);
|
||||
if (rigaOpr != null && rigaOpr.MatrOpr > 0)
|
||||
{
|
||||
userTknDTO newUserTkn = new userTknDTO()
|
||||
@@ -105,9 +106,11 @@ namespace MP_TAB3.Pages
|
||||
var jsonTkn = JsonConvert.SerializeObject(newUserTkn);
|
||||
string hash = TDService.EncryptData(jsonTkn);
|
||||
MsgServ.RigaOper = rigaOpr;
|
||||
await Task.Delay(50);
|
||||
await MsgServ.SetCurrOperDtoLSAsync(hash);
|
||||
await MsgServ.SetLastMatrOprAsync(rigaOpr.MatrOpr);
|
||||
await TDService.OperatoreSetRedis(matrOpr, hash, devGuid);
|
||||
await Task.Delay(50);
|
||||
NavMan.NavigateTo("status-map", true);
|
||||
}
|
||||
else
|
||||
@@ -123,7 +126,13 @@ namespace MP_TAB3.Pages
|
||||
matrOpr = await MsgServ.GetLastMatrOprAsync();
|
||||
TDService.ConfigGetVal("cookieDayExpire", ref expDays);
|
||||
ShowScanBarcode = !SMServ.GetConfBool("TAB_WebCamHide");
|
||||
oprsList = await TDService.ElencoOperatori();
|
||||
oprList = await TDService.ElencoOperatori();
|
||||
// filtro solo abilitati + ordino x nome...
|
||||
oprList = oprList
|
||||
.Where(x => x.isEnabled)
|
||||
.OrderBy(x => x.Cognome)
|
||||
.ThenBy(x => x.Nome)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
protected async Task ScanDoneHandler(string value)
|
||||
@@ -157,15 +166,23 @@ namespace MP_TAB3.Pages
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task ToggleCodeScan()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
ShowScanBarcode = !ShowScanBarcode;
|
||||
}
|
||||
|
||||
protected string Traduci(string lemma)
|
||||
{
|
||||
return SMServ.Traduci($"EN_{lemma}".ToUpper());
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private bool ShowScanBarcode { get; set; } = false;
|
||||
|
||||
protected EgwCoreLib.Razor.BarcodeReader barcodeReaderCustom { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/scrap"
|
||||
@inherits BasePage
|
||||
|
||||
<MseSampler SampleMult="0.25" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,69 +1,27 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class Scrap
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
protected void SetMacc(string selIdxMacc)
|
||||
{
|
||||
IdxMaccSubSel = selIdxMacc;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string IdxMaccSubSel = "";
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,35 @@
|
||||
@page "/status-map"
|
||||
|
||||
<MseSampler SampleMult="1.5" E_Updated="SaveData"></MseSampler>
|
||||
<div class="pe-2">
|
||||
<div class="row mb-2">
|
||||
@if (ListMSE == null || ListMSE.Count == 0 || isCalcSize)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
int maxBlocks = calcMaxBlock();
|
||||
int currIdx = 0;
|
||||
@foreach (var item in ListMSE)
|
||||
<div class="row mb-2">
|
||||
@if (ListMSE == null || ListMSE.Count == 0 || isCalcSize)
|
||||
{
|
||||
currIdx++;
|
||||
<div class="col px-1">
|
||||
<MachineBlock RecMSE="@item" FullMode="true" Width="@Width" Height="@Height" showCard="@ShowCard"></MachineBlock>
|
||||
</div>
|
||||
@if (currIdx >= maxBlocks)
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
int maxBlocks = calcMaxBlock();
|
||||
int currIdx = 0;
|
||||
@foreach (var item in ListMSE)
|
||||
{
|
||||
currIdx = 0;
|
||||
@((MarkupString)"</div>")
|
||||
@((MarkupString)"<div class=\"row mb-2\">")
|
||||
currIdx++;
|
||||
<div class="col px-1">
|
||||
<MachineBlock RecMSE="@item" FullMode="true" Width="@Width" Height="@Height" showCard="@ShowCard" doBlink="@doBlink"></MachineBlock>
|
||||
</div>
|
||||
@if (currIdx >= maxBlocks)
|
||||
{
|
||||
currIdx = 0;
|
||||
@((MarkupString)"</div>")
|
||||
@((MarkupString)"<div class=\"row mb-2\">")
|
||||
}
|
||||
}
|
||||
// controllo se devo "chiudere riga...
|
||||
int currNum = (currIdx % maxBlocks);
|
||||
while (currNum < (maxBlocks))
|
||||
{
|
||||
@((MarkupString)"<div class=\"col px-1 bloccoMacc\"> </div>")
|
||||
currNum++;
|
||||
}
|
||||
}
|
||||
// controllo se devo "chiudere riga...
|
||||
int currNum = (currIdx % maxBlocks);
|
||||
while (currNum < (maxBlocks))
|
||||
{
|
||||
@((MarkupString)"<div class=\"col px-1 bloccoMacc\"> </div>")
|
||||
currNum++;
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data;
|
||||
using MP.Data.Conf;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
using MP_TAB3.Shared;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System.Runtime.ExceptionServices;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class StatusMap
|
||||
public partial class StatusMap : IDisposable
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
ListMSE = null;
|
||||
TDFeeder.dataPipe.EA_NewMessage -= DataPipe_EA_NewMessage;
|
||||
TDFeeder.blinkPipe.EA_NewMessage -= BlinkPipe_EA_NewMessage;
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Public Classes
|
||||
|
||||
public class WindowDimension
|
||||
@@ -29,8 +43,6 @@ namespace MP_TAB3.Pages
|
||||
|
||||
protected bool _showCard = false;
|
||||
|
||||
protected int maxCol = 6;
|
||||
|
||||
protected string showArt = "";
|
||||
|
||||
#endregion Protected Fields
|
||||
@@ -69,18 +81,15 @@ namespace MP_TAB3.Pages
|
||||
[Inject]
|
||||
protected TabDataService TabDServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected TabDataFeeder TDFeeder { get; set; } = null!;
|
||||
|
||||
protected int Width { get; set; } = 0;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task getWDim()
|
||||
{
|
||||
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
|
||||
Height = dimension.Height;
|
||||
Width = dimension.Width;
|
||||
}
|
||||
/// <summary>
|
||||
/// calcola num blocchi max data dimensione larghezza
|
||||
/// </summary>
|
||||
@@ -102,6 +111,13 @@ namespace MP_TAB3.Pages
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected async Task getWDim()
|
||||
{
|
||||
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
|
||||
Height = dimension.Height;
|
||||
Width = dimension.Width;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
@@ -120,8 +136,12 @@ namespace MP_TAB3.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
setDefaults();
|
||||
ListMSE = null;
|
||||
setDefaults();
|
||||
TDFeeder.dataPipe.EA_NewMessage += DataPipe_EA_NewMessage;
|
||||
TDFeeder.blinkPipe.EA_NewMessage += BlinkPipe_EA_NewMessage;
|
||||
Random rnd = new Random();
|
||||
await Task.Delay(rnd.Next(1, 50));
|
||||
SetupConf();
|
||||
var LastOpenedPage = await MsgServ.LastOpenedPageGet();
|
||||
var currMacc = await MsgServ.IdxMaccGet();
|
||||
@@ -132,7 +152,6 @@ namespace MP_TAB3.Pages
|
||||
{
|
||||
NavMan.NavigateTo(LastOpenedPage);
|
||||
}
|
||||
//NavMan.NavigateTo($"machine-detail");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,15 +164,15 @@ namespace MP_TAB3.Pages
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private static System.Timers.Timer slowTimer = new System.Timers.Timer(300000);
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private bool doBlink = false;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string baseLang { get; set; } = "";
|
||||
|
||||
private List<MappaStatoExpl>? ListMSE { get; set; } = null;
|
||||
|
||||
private string tcMode { get; set; } = "";
|
||||
@@ -162,6 +181,63 @@ namespace MP_TAB3.Pages
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Ricezione evento blink
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void BlinkPipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
{
|
||||
PubSubEventArgs currArgs = (PubSubEventArgs)e;
|
||||
// conversione on-the-fly List<string> --> allarmi
|
||||
if (!string.IsNullOrEmpty(currArgs.newMessage))
|
||||
{
|
||||
try
|
||||
{
|
||||
var dataRaw = JsonConvert.DeserializeObject<string>(currArgs.newMessage);
|
||||
if (dataRaw != null)
|
||||
{
|
||||
bool.TryParse($"{dataRaw}", out doBlink);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricevuto nuovi dati da mostrare!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void DataPipe_EA_NewMessage(object? sender, EventArgs e)
|
||||
{
|
||||
PubSubEventArgs currArgs = (PubSubEventArgs)e;
|
||||
// conversione on-the-fly List<string> --> allarmi
|
||||
if (!string.IsNullOrEmpty(currArgs.newMessage))
|
||||
{
|
||||
try
|
||||
{
|
||||
List<MappaStatoExpl>? dataList = JsonConvert.DeserializeObject<List<MappaStatoExpl>>(currArgs.newMessage);
|
||||
if (dataList != null)
|
||||
{
|
||||
SaveData(dataList);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
private void setDefaults()
|
||||
{
|
||||
string df = MsgServ.UserPrefSetup("DefCardMode", "full");
|
||||
@@ -174,9 +250,8 @@ namespace MP_TAB3.Pages
|
||||
private void SetupConf()
|
||||
{
|
||||
// sistemo i parametri opzionali...
|
||||
TabDServ.ConfigGetVal("MON_maxCol", ref maxCol);
|
||||
TabDServ.ConfigGetVal("sART", ref showArt);
|
||||
Log.Info($"setupConf | Effettuato setup parametri | MaxCol: {maxCol}");
|
||||
Log.Info($"setupConf | Effettuato setup parametri | showArt: {showArt}");
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -5,8 +5,19 @@ using NLog;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class TCHistory
|
||||
public partial class TCHistory : IDisposable
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
IdxMacc = "";
|
||||
TotalCount = 0;
|
||||
ListComplete = new List<ODLExpModel>();
|
||||
//GC.Collect();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
#region Protected Fields
|
||||
|
||||
protected string BaseAddr = "";
|
||||
@@ -53,7 +64,7 @@ namespace MP_TAB3.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
BaseAddr = config.GetValue<string>("OptConf:BaseAddr") ?? "";
|
||||
BaseAddr = config.GetValue<string>("ServerConf:BaseAddr") ?? (config.GetValue<string>("OptConf:BaseAddr") ?? "");
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/tech-sheet"
|
||||
@inherits BasePage
|
||||
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using global::Microsoft.AspNetCore.Components;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
@@ -8,12 +7,6 @@ namespace MP_TAB3.Pages
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected TabDataService TabDServ { get; set; } = null!;
|
||||
|
||||
@@ -23,31 +16,17 @@ namespace MP_TAB3.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
await base.OnInitializedAsync();
|
||||
SetupConf();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string disMessage = "Gestione schede tecniche di attrezzaggio, collaudo e verifica procedure di setup. Il modulo opzionale � attivabile su richiesta.";
|
||||
private string disMessage = "Gestione schede tecniche di attrezzaggio, collaudo e verifica procedure di setup. Il modulo opzionale ` attivabile su richiesta.";
|
||||
|
||||
private string disSubtitle = "Funzionalit� disattivata";
|
||||
private string disSubtitle = "Funzionalità disattivata";
|
||||
|
||||
private string disTitle = "Scheda Tecnica";
|
||||
|
||||
@@ -57,19 +36,6 @@ namespace MP_TAB3.Pages
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupConf()
|
||||
{
|
||||
TabDServ.ConfigGetVal("enableSchedaTecnica", ref enableSchedaTecnica);
|
||||
|
||||
@@ -100,206 +100,5 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Inject]
|
||||
private MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
protected async Task setTcMode(string tcMode)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
tcModIns = tcMode;
|
||||
}
|
||||
protected async Task setLang(string lang)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
langIns = lang;
|
||||
}
|
||||
protected async Task setDefCardMode(string defCardMode)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
defCardModeIns = defCardMode;
|
||||
}
|
||||
|
||||
private int MatrOpr
|
||||
{
|
||||
get => MsgServ.MatrOpr;
|
||||
}
|
||||
|
||||
private string UserName
|
||||
{
|
||||
get => MsgServ.CognomeNome;
|
||||
}
|
||||
|
||||
protected string btnMsStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (tcModIns == "ms")
|
||||
{
|
||||
answ = "btn-primary";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "btn-outline-secondary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
protected string btnMcStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (tcModIns == "mc")
|
||||
{
|
||||
answ = "btn-primary";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "btn-outline-secondary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
protected string btnShrinkStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (defCardModeIns == "shrink")
|
||||
{
|
||||
answ = "btn-primary";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "btn-outline-secondary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
protected string btnFullStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (defCardModeIns == "full")
|
||||
{
|
||||
answ = "btn-primary";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "btn-outline-secondary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected string _tcModIns { get; set; } = "";
|
||||
|
||||
protected string tcModIns
|
||||
{
|
||||
get => _tcModIns;
|
||||
set
|
||||
{
|
||||
if (_tcModIns != value)
|
||||
{
|
||||
_tcModIns = value;
|
||||
MsgServ.UserPrefSet("TcMode", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string _langIns { get; set; } = "EN";
|
||||
|
||||
protected string langIns
|
||||
{
|
||||
get => _langIns;
|
||||
set
|
||||
{
|
||||
if (_langIns != value)
|
||||
{
|
||||
_langIns = value;
|
||||
MsgServ.UserPrefSet("Lang", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
protected string _defCardMode { get; set; } = "";
|
||||
|
||||
protected string defCardModeIns
|
||||
{
|
||||
get => _defCardMode;
|
||||
set
|
||||
{
|
||||
if (_defCardMode != value)
|
||||
{
|
||||
_defCardMode = value;
|
||||
MsgServ.UserPrefSet("DefCardMode", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int Height { get; set; } = 0;
|
||||
public int Width { get; set; } = 0;
|
||||
public string currIpv4 { get; set; } = "";
|
||||
|
||||
public class WindowDimension
|
||||
{
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
}
|
||||
protected async override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
//await Task.Delay(500);
|
||||
if (firstRender)
|
||||
{
|
||||
await getWDim();
|
||||
StateHasChanged();
|
||||
Log.Debug($"Dimensioni schermo: {Width}x{Height}");
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected SharedMemService MStor { get; set; } = null!;
|
||||
protected int dtScadLogin { get; set; } = 0;
|
||||
protected async override Task OnInitializedAsync()
|
||||
{
|
||||
tcModIns = MsgServ.UserPrefSetup("TcMode", "ms");
|
||||
langIns = MsgServ.UserPrefSetup("Lang", "IT");
|
||||
defCardModeIns = MsgServ.UserPrefSetup("DefCardMode", "full");
|
||||
dtScadLogin = MStor.GetConfInt("TAB_dtTimerScadLogin");
|
||||
await Task.Delay(1);
|
||||
if (string.IsNullOrEmpty(currIpv4))
|
||||
{
|
||||
// ricalcolo e salvo...
|
||||
if (httpContextAccessor.HttpContext != null)
|
||||
{
|
||||
var remoteIp = $"{httpContextAccessor.HttpContext.Connection?.RemoteIpAddress}";
|
||||
// provo a recuperare ipV4...
|
||||
currIpv4 = EgwCoreLib.Razor.Data.IpUtils.getLocalIpv4(remoteIp);
|
||||
}
|
||||
}
|
||||
}
|
||||
protected async Task getWDim()
|
||||
{
|
||||
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
|
||||
Height = dimension.Height;
|
||||
Width = dimension.Width;
|
||||
}
|
||||
|
||||
protected string mainSize
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "col-12";
|
||||
if (Width > 1021)
|
||||
{
|
||||
answ = "col-6";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
using NLog;
|
||||
|
||||
namespace MP_TAB3.Pages
|
||||
{
|
||||
public partial class User : IDisposable
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public string currIpv4 { get; set; } = "";
|
||||
|
||||
public int Height { get; set; } = 0;
|
||||
|
||||
public int Width { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
//GC.Collect();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Public Classes
|
||||
|
||||
public class WindowDimension
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
#endregion Public Classes
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected string _defCardMode { get; set; } = "";
|
||||
|
||||
protected string _langIns { get; set; } = "EN";
|
||||
|
||||
protected string _tcModIns { get; set; } = "";
|
||||
|
||||
protected string btnFullStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (defCardModeIns == "full")
|
||||
{
|
||||
answ = "btn-primary";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "btn-outline-secondary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected string btnMcStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (tcModIns == "mc")
|
||||
{
|
||||
answ = "btn-primary";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "btn-outline-secondary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected string btnMsStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (tcModIns == "ms")
|
||||
{
|
||||
answ = "btn-primary";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "btn-outline-secondary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected string btnShrinkStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (defCardModeIns == "shrink")
|
||||
{
|
||||
answ = "btn-primary";
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "btn-outline-secondary";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected string defCardModeIns
|
||||
{
|
||||
get => _defCardMode;
|
||||
set
|
||||
{
|
||||
if (_defCardMode != value)
|
||||
{
|
||||
_defCardMode = value;
|
||||
MsgServ.UserPrefSet("DefCardMode", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected int dtScadLogin { get; set; } = 0;
|
||||
|
||||
protected string langIns
|
||||
{
|
||||
get => _langIns;
|
||||
set
|
||||
{
|
||||
if (_langIns != value)
|
||||
{
|
||||
_langIns = value;
|
||||
MsgServ.UserPrefSet("Lang", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string mainSize
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "col-12";
|
||||
if (Width > 1021)
|
||||
{
|
||||
answ = "col-6";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected SharedMemService MStor { get; set; } = null!;
|
||||
|
||||
protected string tcModIns
|
||||
{
|
||||
get => _tcModIns;
|
||||
set
|
||||
{
|
||||
if (_tcModIns != value)
|
||||
{
|
||||
_tcModIns = value;
|
||||
MsgServ.UserPrefSet("TcMode", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task getWDim()
|
||||
{
|
||||
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
|
||||
Height = dimension.Height;
|
||||
Width = dimension.Width;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
//await Task.Delay(500);
|
||||
if (firstRender)
|
||||
{
|
||||
await getWDim();
|
||||
StateHasChanged();
|
||||
Log.Debug($"Dimensioni schermo: {Width}x{Height}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
tcModIns = MsgServ.UserPrefSetup("TcMode", "ms");
|
||||
langIns = MsgServ.UserPrefSetup("Lang", "IT");
|
||||
defCardModeIns = MsgServ.UserPrefSetup("DefCardMode", "full");
|
||||
dtScadLogin = MStor.GetConfInt("TAB_dtTimerScadLogin");
|
||||
await Task.Delay(1);
|
||||
if (string.IsNullOrEmpty(currIpv4))
|
||||
{
|
||||
// ricalcolo e salvo...
|
||||
if (httpContextAccessor.HttpContext != null)
|
||||
{
|
||||
var remoteIp = $"{httpContextAccessor.HttpContext.Connection?.RemoteIpAddress}";
|
||||
// provo a recuperare ipV4...
|
||||
currIpv4 = EgwCoreLib.Razor.Data.IpUtils.getLocalIpv4(remoteIp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task setDefCardMode(string defCardMode)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
defCardModeIns = defCardMode;
|
||||
}
|
||||
|
||||
protected async Task setLang(string lang)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
langIns = lang;
|
||||
}
|
||||
|
||||
protected async Task setTcMode(string tcMode)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
tcModIns = tcMode;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int MatrOpr
|
||||
{
|
||||
get => MsgServ.MatrOpr;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
private MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
private string UserName
|
||||
{
|
||||
get => MsgServ.CognomeNome;
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/workshift"
|
||||
@inherits BasePage
|
||||
|
||||
<MseSampler SampleMult="0.5" E_Updated="RefreshData"></MseSampler>
|
||||
@if (string.IsNullOrEmpty(IdxMacc) || CurrMSE == null)
|
||||
{
|
||||
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
||||
|
||||
@@ -8,12 +8,7 @@ namespace MP_TAB3.Pages
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected MappaStatoExpl? CurrMSE { get; set; } = null;
|
||||
protected TurniMaccModel currTurni { get; set; } = new TurniMaccModel();
|
||||
protected string IdxMacc { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
protected bool T1
|
||||
{
|
||||
@@ -68,46 +63,23 @@ namespace MP_TAB3.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RefreshData(List<MappaStatoExpl> newList)
|
||||
{
|
||||
var ListMSE = newList;
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
var rawData = ListMSE.Find(x => x.IdxMacchina == IdxMacc);
|
||||
if (rawData != null)
|
||||
{
|
||||
CurrMSE = rawData;
|
||||
}
|
||||
else
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
protected override async Task ReloadData()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
IdxMacc = await MsgServ.IdxMaccGet();
|
||||
// recupero MSE macchina....
|
||||
await base.ReloadData();
|
||||
if (!string.IsNullOrEmpty(IdxMacc))
|
||||
{
|
||||
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
|
||||
// recupero turni
|
||||
currTurni = await TabServ.TurnoMacchinaGet(IdxMacc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -15,14 +15,12 @@
|
||||
<link rel="shortcut icon" href="images/favicon.ico" />
|
||||
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
|
||||
<base href="~/" />
|
||||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="lib/font-awesome/css/all.min.css" />
|
||||
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="css/font.min.css" />
|
||||
<link rel="stylesheet" href="css/site.css" />
|
||||
<link rel="stylesheet" href="MP-TAB3.styles.css" />
|
||||
<component type="typeof(HeadOutlet)" render-mode="Server" />
|
||||
@* <component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" /> *@
|
||||
</head>
|
||||
<body>
|
||||
@RenderBody()
|
||||
@@ -38,9 +36,78 @@
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
@*<script src="~/lib//BarcodeReade.razor.js"></script>*@
|
||||
<script src="lib/Utils.js"></script>
|
||||
<script src="lib/WindowSize.js"></script>
|
||||
<script src="lib/bootstrap/js/bootstrap.bundle.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
|
||||
@* <script src="_framework/blazor.server.js"></script> *@
|
||||
|
||||
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
|
||||
<script src="_framework/blazor.server.js" autostart="false"></script>
|
||||
<script>
|
||||
Blazor.start({
|
||||
reconnectionOptions: {
|
||||
maxRetries: 600,
|
||||
retryIntervalMilliseconds: 1000
|
||||
},
|
||||
}).then(() => {
|
||||
Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
|
||||
console.log("Client reconnected, waiting 5 sec and reload!");
|
||||
setTimeout(function () {
|
||||
document.location.reload();
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@* <script>
|
||||
Blazor.start({
|
||||
reconnectionOptions: {
|
||||
maxRetries: 600,
|
||||
retryIntervalMilliseconds: 1000
|
||||
},
|
||||
reconnectionHandler: {
|
||||
onConnectionDown: (options, error) => console.error(error),
|
||||
onConnectionUp: () => console.log("Client reconnected!")
|
||||
}
|
||||
}).then(() => {
|
||||
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
|
||||
get() {
|
||||
return this.__reconnectionDisplay;
|
||||
},
|
||||
set(value) {
|
||||
this.__reconnectionDisplay = {
|
||||
show: () => value.show(),
|
||||
update: (d) => value.update(d),
|
||||
rejected: (d) => document.location.reload()
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script> *@
|
||||
@* <script>
|
||||
Blazor.start({
|
||||
reconnectionOptions: {
|
||||
maxRetries: Infinity,
|
||||
retryIntervalMilliseconds: 1000
|
||||
},
|
||||
reconnectionHandler: {
|
||||
onConnectionDown: (options, error) => {
|
||||
Blazor.defaultReconnectionHandler.onConnectionDown(options, error);
|
||||
Blazor.defaultReconnectionHandler._reconnectionDisplay.rejected = function () {
|
||||
window.location.reload();
|
||||
}
|
||||
},
|
||||
onConnectionUp: () => {
|
||||
console.log("Client reconnected!");
|
||||
document.location.reload();
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
</script> *@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+24
-1
@@ -2,9 +2,12 @@ using Blazored.LocalStorage;
|
||||
using Blazored.SessionStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using MP.Data;
|
||||
using MP.Data.Services;
|
||||
using StackExchange.Redis;
|
||||
using static Org.BouncyCastle.Math.EC.ECCurve;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -24,6 +27,9 @@ builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddServerSideBlazor();
|
||||
|
||||
builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
|
||||
builder.Services.AddSingleton<TabDataFeeder>();
|
||||
|
||||
builder.Services.AddSingleton<StatusData>();
|
||||
builder.Services.AddSingleton<ListSelectDataSrv>();
|
||||
builder.Services.AddSingleton<OrderDataSrv>();
|
||||
@@ -43,7 +49,8 @@ builder.Services.AddHttpContextAccessor();
|
||||
var app = builder.Build();
|
||||
|
||||
// aggiunt base URL x routing corretto
|
||||
app.UsePathBase(configuration["OptConf:BaseUrl"]);
|
||||
var pathBase= configuration.GetValue<string>("ServerConf:BaseUrlTab") ?? (configuration.GetValue<string>("OptConf:BaseUrlTab") ?? "");
|
||||
app.UsePathBase(pathBase);
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
@@ -57,6 +64,22 @@ app.UseHttpsRedirection();
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
// gestione static files: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-8.0
|
||||
string BasePathDisegni = configuration.GetValue<string>("ServerConf:BasePathDisegni") ?? configuration.GetValue<string>("OptConf:BasePathDisegni")?? "";
|
||||
if (!string.IsNullOrEmpty(BasePathDisegni))
|
||||
{
|
||||
// verifico esista folder disegni
|
||||
if (Directory.Exists(BasePathDisegni))
|
||||
{
|
||||
// gestione cartella x PDF
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(BasePathDisegni),
|
||||
RequestPath = "/disegni",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.MapBlazorHub();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2401.511</h4>
|
||||
<h4>Versione: 6.16.2403.711</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2401.511
|
||||
6.16.2403.711
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2401.511</version>
|
||||
<version>6.16.2403.711</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
<PageTitle>MP-TAB3</PageTitle>
|
||||
|
||||
<div class="page" @onclick="()=>handleBodyClick()">
|
||||
<div class="page" @onclick="()=>HandleBodyClick()">
|
||||
<main>
|
||||
<CmpTop TypeScadLogin="@typeScadLogin" CurrMenuItems="@CurrMenuItems" EA_UserIsOk="checkIfUserOk"></CmpTop>
|
||||
<CmpTop TypeScadLogin="@typeScadLogin" CurrMenuItems="@CurrMenuItems" EA_UserIsOk="SetUserOk" EA_ReloadMStor="ForceReloadMStor"></CmpTop>
|
||||
@if (userIsOk || NavMan.Uri.Contains("reg-new-device"))
|
||||
{
|
||||
<article class="content pt-1 d-flex mb-5">
|
||||
@@ -24,5 +24,5 @@
|
||||
</main>
|
||||
</div>
|
||||
<div class="fixed-bottom">
|
||||
<CmpFooter TypeScadLogin="@typeScadLogin" DtScadLogin="@dtScadLogin"></CmpFooter>
|
||||
<CmpFooter TypeScadLogin="@typeScadLogin" DtScadLogin="@dtScadLogin" MatrOper="@MatrOpr" CurrDevGuid="@currDevGuid"></CmpFooter>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Components.Routing;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.Services;
|
||||
using MP_TAB3.Components;
|
||||
using NLog;
|
||||
|
||||
namespace MP_TAB3.Shared
|
||||
@@ -94,23 +93,25 @@ namespace MP_TAB3.Shared
|
||||
|
||||
protected async Task checkDtDiff2Logout()
|
||||
{
|
||||
TimeSpan tsDeltaAct = DateTime.Now.Subtract(MsgServ.dtLastAction);
|
||||
TimeSpan tsDeltaSave = DateTime.Now.Subtract(MsgServ.dtLastSave);
|
||||
DateTime adesso = DateTime.Now;
|
||||
TimeSpan tsDeltaAct = adesso.Subtract(MsgServ.dtLastAction);
|
||||
TimeSpan tsDeltaSave = adesso.Subtract(MsgServ.dtLastSave);
|
||||
string userTkn = "";
|
||||
switch (typeScadLogin)
|
||||
{
|
||||
case 1:
|
||||
if (tsDeltaAct.TotalMinutes >= dtScadLogin)
|
||||
{
|
||||
var userTkn = await TDataService.OperatoreGetRedis(MatrOpr, currDevGuid);
|
||||
if (!string.IsNullOrEmpty(userTkn))
|
||||
userTkn = await TDataService.OperatoreGetRedis(MatrOpr, currDevGuid);
|
||||
if (string.IsNullOrEmpty(userTkn))
|
||||
{
|
||||
await MsgServ.DoLogIn(userTkn, true);
|
||||
MsgServ.dtLastAction = DateTime.Now;
|
||||
MsgServ.dtLastSave = DateTime.Now;
|
||||
NavMan.NavigateTo("logout");
|
||||
}
|
||||
else
|
||||
{
|
||||
NavMan.NavigateTo("logout");
|
||||
await MsgServ.DoLogIn(userTkn, true);
|
||||
MsgServ.dtLastAction = adesso;
|
||||
MsgServ.dtLastSave = adesso;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -118,21 +119,35 @@ namespace MP_TAB3.Shared
|
||||
// se fosse oltre 1 minuto da ultimo save --> salvo!
|
||||
if (tsDeltaSave.TotalMinutes > 1)
|
||||
{
|
||||
var userTkn = await TDataService.OperatoreGetRedis(MatrOpr, currDevGuid);
|
||||
userTkn = await TDataService.OperatoreGetRedis(MatrOpr, currDevGuid);
|
||||
if (!string.IsNullOrEmpty(userTkn))
|
||||
{
|
||||
await MsgServ.DoLogIn(userTkn, true);
|
||||
MsgServ.dtLastAction = DateTime.Now;
|
||||
MsgServ.dtLastSave = DateTime.Now;
|
||||
MsgServ.dtLastAction = adesso;
|
||||
MsgServ.dtLastSave = adesso;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (tsDeltaAct.TotalMinutes >= dtScadLogin)
|
||||
// se fosse oltre 1 minuto da ultimo save --> salvo!
|
||||
if (tsDeltaSave.TotalMinutes > 1)
|
||||
{
|
||||
NavMan.NavigateTo("logout");
|
||||
// mitigazione controlli: solo ogni 1 minuto...
|
||||
if (tsDeltaSave.TotalMinutes > 1)
|
||||
{
|
||||
MsgServ.dtLastSave = adesso;
|
||||
userTkn = await TDataService.OperatoreGetRedis(MatrOpr, currDevGuid);
|
||||
if (string.IsNullOrEmpty(userTkn))
|
||||
{
|
||||
NavMan.NavigateTo("logout");
|
||||
}
|
||||
if (tsDeltaAct.TotalMinutes >= dtScadLogin)
|
||||
{
|
||||
NavMan.NavigateTo("logout");
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -145,13 +160,12 @@ namespace MP_TAB3.Shared
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task checkIfUserOk(bool isOk)
|
||||
protected async Task ForceReloadMStor(bool isOk)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
userIsOk = isOk;
|
||||
await ReloadMemStor();
|
||||
}
|
||||
|
||||
protected async Task handleBodyClick()
|
||||
protected async Task HandleBodyClick()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
if (!pageOk)
|
||||
@@ -160,6 +174,15 @@ namespace MP_TAB3.Shared
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
currDevGuid = await MsgServ.GetCurrDevGuidLSAsync();
|
||||
// rileggo scadenza ultima...
|
||||
DateTime adesso = DateTime.Now;
|
||||
TimeSpan tsScadenza = TDataService.OperatoreGetGuidTTL(MatrOpr, currDevGuid);
|
||||
MsgServ.dtLastSave = adesso.Subtract(TimeSpan.FromMinutes(dtScadLogin)).Add(tsScadenza);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Init struttura dati
|
||||
/// </summary>
|
||||
@@ -184,11 +207,6 @@ namespace MP_TAB3.Shared
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
currDevGuid = await MsgServ.GetCurrDevGuidLSAsync();
|
||||
}
|
||||
|
||||
protected async Task ReloadMemStor()
|
||||
{
|
||||
// in primis svuoto...
|
||||
@@ -223,6 +241,12 @@ namespace MP_TAB3.Shared
|
||||
TDataService.SetupConfig();
|
||||
}
|
||||
|
||||
protected async Task SetUserOk(bool isOk)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
userIsOk = isOk;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
@@ -61,6 +61,6 @@
|
||||
await MsgServ.IdxMaccSet("");
|
||||
}
|
||||
await MsgServ.LastOpenedPageSet(tgtUrl);
|
||||
navManager.NavigateTo(tgtUrl);
|
||||
navManager.NavigateTo(tgtUrl, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "iis01.egalware.com:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
|
||||
"MP.All": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
|
||||
"MP.Mon": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
|
||||
"MP.IS": "Server=SQL2016DEV;Database=MoonPro_IS_EdilChim; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
|
||||
"MP.Tab": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
|
||||
"MP.Mag": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;"
|
||||
},
|
||||
"OptConf": {
|
||||
"msRefresh": "1500",
|
||||
"CodModulo": "MP-TAB3"
|
||||
},
|
||||
"ServerConf": {
|
||||
"BaseAddr": "https://iis04.egalware.com/MP/TAB3/",
|
||||
"BasePathDisegni": "C:\\Steamware\\disegni",
|
||||
"BaseUrlTab": "/MP/TAB3",
|
||||
"ImgBasePath": "https://iis04.egalware.com/MP/images/macchine/small/"
|
||||
},
|
||||
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net"
|
||||
}
|
||||
@@ -9,20 +9,21 @@
|
||||
"CodApp": "MP.TAB",
|
||||
"ConnectionStrings": {
|
||||
"Redis": "iis01.egalware.com:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
|
||||
//"Redis": "localhost:6379,DefaultDatabase=1,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
|
||||
"MP.All": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
|
||||
"MP.Mon": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
|
||||
"Mp.IS": "Server=SQL2016DEV;Database=MoonPro_IS_EdilChim; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
|
||||
"MP.IS": "Server=SQL2016DEV;Database=MoonPro_IS_EdilChim; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.INVE;",
|
||||
"MP.Tab": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;",
|
||||
"MP.Mag": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.TAB3;"
|
||||
},
|
||||
"OptConf": {
|
||||
"msRefresh": "4000",
|
||||
"msRefresh": "1100",
|
||||
"CodModulo": "MP-TAB3"
|
||||
},
|
||||
"ServerConf": {
|
||||
"BaseAddr": "https://localhost:7295/MP/TAB3/",
|
||||
"BaseUrl": "/MP/TAB3",
|
||||
"ImgBasePath": "https://iis01.egalware.com/MP/images/macchine/small/",
|
||||
"ImgStBasePath": "C:\\Steamware\\images\\ST",
|
||||
"CodModulo": "MoonPro"
|
||||
"BasePathDisegni": "\\\\iis01\\W$\\Files\\Disegni",
|
||||
"BaseUrlTab": "/MP/TAB3",
|
||||
"ImgBasePath": "https://iis01.egalware.com/MP/images/macchine/small/"
|
||||
},
|
||||
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net",
|
||||
"MailKitMailSettings": {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,3 @@
|
||||
function isDevice() {
|
||||
return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i.test(navigator.userAgent);
|
||||
}
|
||||
@@ -4,9 +4,11 @@
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
public static readonly string ACT_BLINK_KEY = $"{BASE_HASH}:Current:Blink";
|
||||
public static readonly string MON_ACT_BLINK_KEY = $"{BASE_HASH}:MON:Current:Blink";
|
||||
public static readonly string MON_ACT_MSE_DATA_KEY = $"{BASE_HASH}:MON:Current:MSE";
|
||||
|
||||
public static readonly string ACT_MSE_DATA_KEY = $"{BASE_HASH}:Current:MSE";
|
||||
public static readonly string TAB_ACT_BLINK_KEY = $"{BASE_HASH}:TAB:Current:Blink";
|
||||
public static readonly string TAB_ACT_MSE_DATA_KEY = $"{BASE_HASH}:TAB:Current:MSE";
|
||||
|
||||
public static readonly string BROADCAST_M_PIPE = $"BroadCastMsg";
|
||||
public static readonly string BROADCAST_CURR_KEY = $"{BASE_HASH}:Current:BroadCast";
|
||||
@@ -19,6 +21,7 @@
|
||||
|
||||
|
||||
|
||||
public static string redisMacchine = "MP:MON:Cache:Macchine";
|
||||
public static string redisMseKey = "MP:MON:Cache:MSE";
|
||||
public static string redisMseKeySingle = "MP:MON:Cache:MseSingle";
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.Data.DatabaseModels;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -84,6 +85,49 @@ namespace MP.Data.Controllers
|
||||
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>
|
||||
|
||||
@@ -21,5 +21,6 @@ namespace MP.Data.DatabaseModels
|
||||
public bool isAdmin { get; set; } = false;
|
||||
public string authKey { get; set; }
|
||||
public string CodOprExt { get; set; }
|
||||
public bool isEnabled { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data;
|
||||
|
||||
#nullable disable
|
||||
// <Auto-Generated>
|
||||
@@ -159,5 +160,195 @@ namespace MP.Data.DatabaseModels
|
||||
return PezziProd >= NumPezzi;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is MappaStatoExpl item))
|
||||
return false;
|
||||
|
||||
if (RowNum != item.RowNum)
|
||||
return false;
|
||||
|
||||
if (LastUpdate != item.LastUpdate)
|
||||
return false;
|
||||
|
||||
if (IdxMacchina != item.IdxMacchina)
|
||||
return false;
|
||||
|
||||
if (CodMacchina != item.CodMacchina)
|
||||
return false;
|
||||
|
||||
if (Nome != item.Nome)
|
||||
return false;
|
||||
|
||||
if (Url != item.Url)
|
||||
return false;
|
||||
|
||||
if (IdxOdl != item.IdxOdl)
|
||||
return false;
|
||||
|
||||
if (IdxPOdl != item.IdxPOdl)
|
||||
return false;
|
||||
|
||||
if (CodArticolo != item.CodArticolo)
|
||||
return false;
|
||||
|
||||
if (Disegno != item.Disegno)
|
||||
return false;
|
||||
|
||||
if (NumPezzi != item.NumPezzi)
|
||||
return false;
|
||||
|
||||
if (TCAssegnato != item.TCAssegnato)
|
||||
return false;
|
||||
|
||||
if (DataInizioOdl != item.DataInizioOdl)
|
||||
return false;
|
||||
|
||||
if (Semaforo != item.Semaforo)
|
||||
return false;
|
||||
|
||||
if (IdxStato != item.IdxStato)
|
||||
return false;
|
||||
|
||||
if (DescrizioneStato != item.DescrizioneStato)
|
||||
return false;
|
||||
|
||||
if (Durata != item.Durata)
|
||||
return false;
|
||||
|
||||
if (PezziProd != item.PezziProd)
|
||||
return false;
|
||||
|
||||
if (PezziConf != item.PezziConf)
|
||||
return false;
|
||||
|
||||
if (TempoOn != item.TempoOn)
|
||||
return false;
|
||||
|
||||
if (TempoAuto != item.TempoAuto)
|
||||
return false;
|
||||
|
||||
if (TempoRun != item.TempoRun)
|
||||
return false;
|
||||
|
||||
if (TCMedio != item.TCMedio)
|
||||
return false;
|
||||
|
||||
if (TCLav != item.TCLav)
|
||||
return false;
|
||||
|
||||
if (TCEff != item.TCEff)
|
||||
return false;
|
||||
|
||||
if (TCMedioRt != item.TCMedioRt)
|
||||
return false;
|
||||
|
||||
if (TCLavRT != item.TCLavRT)
|
||||
return false;
|
||||
|
||||
if (TCEffRT != item.TCEffRT)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public bool MostlyEquals(object obj)
|
||||
{
|
||||
if (!(obj is MappaStatoExpl item))
|
||||
return false;
|
||||
|
||||
if (RowNum != item.RowNum)
|
||||
return false;
|
||||
|
||||
//if (LastUpdate != item.LastUpdate)
|
||||
// return false;
|
||||
|
||||
if (IdxMacchina != item.IdxMacchina)
|
||||
return false;
|
||||
|
||||
if (CodMacchina != item.CodMacchina)
|
||||
return false;
|
||||
|
||||
if (Nome != item.Nome)
|
||||
return false;
|
||||
|
||||
if (Url != item.Url)
|
||||
return false;
|
||||
|
||||
if (IdxOdl != item.IdxOdl)
|
||||
return false;
|
||||
|
||||
if (IdxPOdl != item.IdxPOdl)
|
||||
return false;
|
||||
|
||||
if (CodArticolo != item.CodArticolo)
|
||||
return false;
|
||||
|
||||
if (Disegno != item.Disegno)
|
||||
return false;
|
||||
|
||||
if (NumPezzi != item.NumPezzi)
|
||||
return false;
|
||||
|
||||
if (TCAssegnato != item.TCAssegnato)
|
||||
return false;
|
||||
|
||||
if (DataInizioOdl != item.DataInizioOdl)
|
||||
return false;
|
||||
|
||||
if (Semaforo != item.Semaforo)
|
||||
return false;
|
||||
|
||||
if (IdxStato != item.IdxStato)
|
||||
return false;
|
||||
|
||||
//if (DescrizioneStato != item.DescrizioneStato)
|
||||
// return false;
|
||||
|
||||
//if (Durata != item.Durata)
|
||||
// return false;
|
||||
|
||||
if (PezziProd != item.PezziProd)
|
||||
return false;
|
||||
|
||||
if (PezziConf != item.PezziConf)
|
||||
return false;
|
||||
|
||||
//if (TempoOn != item.TempoOn)
|
||||
// return false;
|
||||
|
||||
//if (TempoAuto != item.TempoAuto)
|
||||
// return false;
|
||||
|
||||
//if (TempoRun != item.TempoRun)
|
||||
// return false;
|
||||
|
||||
//if (TCMedio != item.TCMedio)
|
||||
// return false;
|
||||
|
||||
//if (TCLav != item.TCLav)
|
||||
// return false;
|
||||
|
||||
//if (TCEff != item.TCEff)
|
||||
// return false;
|
||||
|
||||
//if (TCMedioRt != item.TCMedioRt)
|
||||
// return false;
|
||||
|
||||
//if (TCLavRT != item.TCLavRT)
|
||||
// return false;
|
||||
|
||||
//if (TCEffRT != item.TCEffRT)
|
||||
// return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,5 +16,6 @@ namespace MP.Data.DatabaseModels
|
||||
public string label { get; set; } = "";
|
||||
public string cssClass { get; set; } = "";
|
||||
public string icona { get; set; } = "";
|
||||
public bool isEnabled { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,10 @@ namespace MP.Data
|
||||
//Subscribe to the channel named messages
|
||||
sub.Subscribe(_channel, (channel, message) =>
|
||||
{
|
||||
Log.Trace($"req setup ch {channel} | {message}");
|
||||
if (enableLog)
|
||||
{
|
||||
Log.Trace($"req setup ch {channel} | {message}");
|
||||
}
|
||||
// messaggio
|
||||
PubSubEventArgs mea = new PubSubEventArgs(message);
|
||||
// se qualcuno ascolta sollevo evento nuovo valore...
|
||||
@@ -122,7 +125,10 @@ namespace MP.Data
|
||||
EA_NewMessage(this, mea);
|
||||
}
|
||||
});
|
||||
Log.Info($"Subscribed {_channel}");
|
||||
if (enableLog)
|
||||
{
|
||||
Log.Info($"Subscribed {_channel}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -49,14 +49,14 @@ namespace MP.Data
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("Mp.Data");
|
||||
string connString = _configuration.GetConnectionString("MP.Data");
|
||||
if (string.IsNullOrEmpty(connString))
|
||||
{
|
||||
connString = _configuration.GetConnectionString("Mp.Mon");
|
||||
connString = _configuration.GetConnectionString("MP.Mon");
|
||||
}
|
||||
if (string.IsNullOrEmpty(connString))
|
||||
{
|
||||
connString = _configuration.GetConnectionString("Mp.STATS");
|
||||
connString = _configuration.GetConnectionString("MP.STATS");
|
||||
}
|
||||
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
|
||||
@@ -113,14 +113,14 @@ namespace MP.Data
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("Mp.Data");
|
||||
string connString = _configuration.GetConnectionString("MP.Data");
|
||||
if (string.IsNullOrEmpty(connString))
|
||||
{
|
||||
connString = _configuration.GetConnectionString("Mp.Mon");
|
||||
connString = _configuration.GetConnectionString("MP.Mon");
|
||||
}
|
||||
if (string.IsNullOrEmpty(connString))
|
||||
{
|
||||
connString = _configuration.GetConnectionString("Mp.STATS");
|
||||
connString = _configuration.GetConnectionString("MP.STATS");
|
||||
}
|
||||
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace MP.Data
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("Mp.IS");
|
||||
string connString = _configuration.GetConnectionString("MP.IS");
|
||||
if (!string.IsNullOrEmpty(connString))
|
||||
{
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace MP.Data
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("Mp.Inve");
|
||||
string connString = _configuration.GetConnectionString("MP.Inve");
|
||||
if (!string.IsNullOrEmpty(connString))
|
||||
{
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace MP.Data
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("Mp.Mag");
|
||||
string connString = _configuration.GetConnectionString("MP.Mag");
|
||||
if (!string.IsNullOrEmpty(connString))
|
||||
{
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace MP.Data
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("Mp.Stats");
|
||||
string connString = _configuration.GetConnectionString("MP.Stats");
|
||||
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
//optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user