Compare commits
103 Commits
v1.46.04(4
...
v1.46.23(5
| Author | SHA1 | Date | |
|---|---|---|---|
| c620e9cb96 | |||
| 6ef4961074 | |||
| 12796b11e5 | |||
| 688a8e4bad | |||
| f7dc857587 | |||
| f99c0e5514 | |||
| f1c304eaeb | |||
| 7b3fde1d71 | |||
| 3c337fc138 | |||
| 021f6974f1 | |||
| 92abfe1da4 | |||
| 6338c1dfa6 | |||
| 657d85be86 | |||
| 97c907c992 | |||
| caed709b64 | |||
| 13800eecab | |||
| c4357f662c | |||
| 67a8ca94db | |||
| 0bfd56c011 | |||
| eead844ac1 | |||
| 65cfadcb6e | |||
| 00067ca1c9 | |||
| 73ca8bb366 | |||
| 3ffdb2c220 | |||
| a5479595c7 | |||
| cff971bef8 | |||
| a5d3388665 | |||
| 22ad23c5b7 | |||
| b1d5e10db4 | |||
| bde41d21be | |||
| 9d8228419c | |||
| ad7d9059c0 | |||
| 4831a7ce19 | |||
| 552b82feda | |||
| 6d62a7b10e | |||
| 667f4aea74 | |||
| f80225b7bf | |||
| 7a02e1d8ad | |||
| 9cc70f4ee6 | |||
| 7c4c5da1d6 | |||
| b960b6319a | |||
| 08ddaa7a11 | |||
| bcce40094c | |||
| 960388adf8 | |||
| e76722018f | |||
| fc30017021 | |||
| e1dd4f2140 | |||
| 67a0679de7 | |||
| dfc87f7aec | |||
| 886ef6ba08 | |||
| fe77f90a7a | |||
| 7a1f0d6cf6 | |||
| 004bc3b926 | |||
| be5ebb89d7 | |||
| 5a0b45c6f9 | |||
| f81d61c4c5 | |||
| 634bc502ce | |||
| d13dbf1ad3 | |||
| 2f9ee642da | |||
| afecc11364 | |||
| b33d566abd | |||
| 69d880b587 | |||
| aeadea42e1 | |||
| f5c3dcfdc9 | |||
| d30af1e2a6 | |||
| 71a18e9ffa | |||
| 40e1fb4f83 | |||
| f3f0fd8fd8 | |||
| ed53b9e3b4 | |||
| 37ac05b8ab | |||
| 823d0d7a33 | |||
| 5b07ff5efa | |||
| c5639a643a | |||
| 012f75198b | |||
| d7e0e858d2 | |||
| 339a5e5b68 | |||
| 02a13911d8 | |||
| b6f51971f1 | |||
| 57079c0062 | |||
| 63c353a83c | |||
| c069d21cbf | |||
| afeb9ecc23 | |||
| 2ff8d80da3 | |||
| 891e2641fa | |||
| ca79107809 | |||
| 5c37b986ce | |||
| c426250cd5 | |||
| f090c11146 | |||
| 5c90f22a49 | |||
| f1ddaa1fca | |||
| 8490553a32 | |||
| 66824fccb1 | |||
| 39dce4d23f | |||
| c1dbbde905 | |||
| 8d2d0ad195 | |||
| 927b14c9fc | |||
| f342cd0e5f | |||
| c287852ce6 | |||
| edc9470e9b | |||
| 7adeee589e | |||
| 52a393c260 | |||
| 60a405536c | |||
| 5f5117c0f6 |
35
.idea/codeStyles/Project.xml
generated
35
.idea/codeStyles/Project.xml
generated
@@ -1,5 +1,40 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<code_scheme name="Project" version="173">
|
<code_scheme name="Project" version="173">
|
||||||
|
<JavaCodeStyleSettings>
|
||||||
|
<option name="IMPORT_LAYOUT_TABLE">
|
||||||
|
<value>
|
||||||
|
<package name="" withSubpackages="true" static="false" module="true" />
|
||||||
|
<package name="android" withSubpackages="true" static="true" />
|
||||||
|
<package name="androidx" withSubpackages="true" static="true" />
|
||||||
|
<package name="com" withSubpackages="true" static="true" />
|
||||||
|
<package name="junit" withSubpackages="true" static="true" />
|
||||||
|
<package name="net" withSubpackages="true" static="true" />
|
||||||
|
<package name="org" withSubpackages="true" static="true" />
|
||||||
|
<package name="java" withSubpackages="true" static="true" />
|
||||||
|
<package name="javax" withSubpackages="true" static="true" />
|
||||||
|
<package name="" withSubpackages="true" static="true" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="android" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="androidx" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="com" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="junit" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="net" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="org" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="java" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="javax" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
<package name="" withSubpackages="true" static="false" />
|
||||||
|
<emptyLine />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</JavaCodeStyleSettings>
|
||||||
<JetCodeStyleSettings>
|
<JetCodeStyleSettings>
|
||||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||||
</JetCodeStyleSettings>
|
</JetCodeStyleSettings>
|
||||||
|
|||||||
4
.idea/deploymentTargetSelector.xml
generated
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2025-03-17T09:16:48.549771200Z">
|
<DropdownSelection timestamp="2025-05-14T09:45:15.341614500Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=21088B8EFD" />
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=23324B682F" />
|
||||||
</handle>
|
</handle>
|
||||||
</Target>
|
</Target>
|
||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
|
|||||||
72
Jenkinsfile.groovy
Normal file
72
Jenkinsfile.groovy
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'master'
|
||||||
|
}
|
||||||
|
|
||||||
|
options {
|
||||||
|
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '10'))
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
// ANDROID_HOME = "/usr/local/android/sdk" // Cambia in base al tuo sistema
|
||||||
|
JAVA_HOME = tool 'JDK 17.0.6 x64' // Nome dello strumento configurato in Jenkins
|
||||||
|
PATH = "${env.JAVA_HOME}\\bin;${env.PATH}"
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
|
||||||
|
stage('Preparing') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
return env.GIT_BRANCH == "master-beta"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
bat "./gradlew addBetaSuffix"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
bat "./gradlew assembleRelease"
|
||||||
|
archiveArtifacts artifacts: 'app/build/outputs/apk/release/', onlyIfSuccessful: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish') {
|
||||||
|
steps {
|
||||||
|
azureUpload allowAnonymousAccess: true, fileShareName: 'storage-ci', filesPath: 'app/build/outputs/apk/release/*', removePrefixPath: 'app/build/outputs/apk/release/', storageCredentialId: '83a86793-c1d6-4776-b20f-1ff652a57fee', storageType: 'filestorage', uploadArtifactsOnlyIfSuccessful: true, verbose: true, virtualPath: 'wms'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
script {
|
||||||
|
bat 'curl -k "https://devservices.studioml.it/ems-api/updateWMSApp?overrideForced=false"'
|
||||||
|
bat 'curl -k "https://devservices.studioml.it/ems-api/updateWMSApp?overrideForced=false&suffix=beta"'
|
||||||
|
bat 'curl -k "https://services.studioml.it/ems-api/updateWMSApp?overrideForced=false"'
|
||||||
|
bat 'curl -k "https://services.studioml.it/ems-api/updateWMSApp?overrideForced=false&suffix=beta"'
|
||||||
|
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "master-beta") {
|
||||||
|
office365ConnectorSend adaptiveCards: true, color: '#008000', message: 'WMS è stato compilato con successo', status: 'SUCCESS', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unstable {
|
||||||
|
script {
|
||||||
|
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "master-beta") {
|
||||||
|
office365ConnectorSend adaptiveCards: true, color: '#FFDE21', message: 'WMS è INSTABILE', status: 'UNSTABLE', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
if (env.GIT_BRANCH == "master" || env.GIT_BRANCH == "master-beta") {
|
||||||
|
office365ConnectorSend adaptiveCards: true, color: '#FF2C2C', message: 'Errore di compilazione su WMS', status: 'FAILURE', webhookUrl: 'https://prod-89.westeurope.logic.azure.com:443/workflows/260580715a9d4447a54dea861a865536/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=EMqPHohvE5o5IGj_gir_iQaAufR4r8ZJxlFx52jklSE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 492
|
def appVersionCode = 511
|
||||||
def appVersionName = '1.46.04'
|
def appVersionName = '1.46.23'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@@ -51,9 +51,13 @@ android {
|
|||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
ext.enableCrashlytics = false
|
ext.enableCrashlytics = false
|
||||||
|
// minifyEnabled true // Abilita la minimizzazione del codice
|
||||||
|
// shrinkResources true // Rimuove risorse non utilizzate
|
||||||
|
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
// minifyEnabled true // Abilita la minimizzazione del codice
|
||||||
|
// shrinkResources true // Rimuove risorse non utilizzate
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
@@ -74,12 +78,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
build {
|
|
||||||
doLast {
|
|
||||||
delete "$projectDir/build/outputs/apk/release/version.txt"
|
|
||||||
file("$projectDir/build/outputs/apk/release/version.txt").text = appVersionCode + '\n' + appVersionName + '\n' + 'forced=true'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
tasks.withType(JavaCompile.class).tap {
|
tasks.withType(JavaCompile.class).tap {
|
||||||
@@ -101,36 +100,33 @@ configurations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
// androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
|
// androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
|
||||||
// exclude group: 'com.android.support', module: 'support-annotations'
|
// exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
// })
|
// })
|
||||||
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||||
|
|
||||||
implementation 'com.github.lupaulus:logger:2.3.2'
|
implementation 'com.github.lupaulus:logger:2.3.2'
|
||||||
|
|
||||||
//Firebase
|
|
||||||
|
|
||||||
// Import the Firebase BoM
|
// Import the Firebase BoM
|
||||||
implementation platform('com.google.firebase:firebase-bom:33.9.0')
|
implementation platform('com.google.firebase:firebase-bom:33.14.0')
|
||||||
implementation 'com.google.firebase:firebase-analytics'
|
implementation 'com.google.firebase:firebase-analytics'
|
||||||
implementation 'com.google.firebase:firebase-crashlytics'
|
implementation 'com.google.firebase:firebase-crashlytics'
|
||||||
implementation 'com.google.firebase:firebase-perf'
|
implementation 'com.google.firebase:firebase-perf'
|
||||||
implementation 'com.google.android.gms:play-services-basement:18.5.0'
|
implementation 'com.google.android.gms:play-services-basement:18.7.0'
|
||||||
|
|
||||||
//JJWT
|
//JJWT
|
||||||
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
|
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
|
||||||
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
|
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
|
||||||
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
|
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
|
||||||
|
|
||||||
implementation 'com.google.guava:guava:33.4.0-android'
|
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
||||||
implementation 'com.google.android.material:material:1.12.0'
|
implementation 'com.google.android.material:material:1.12.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.4.0'
|
implementation 'androidx.recyclerview:recyclerview:1.4.0'
|
||||||
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||||
|
|
||||||
implementation('androidx.preference:preference-ktx:1.2.1') {
|
implementation('androidx.preference:preference-ktx:1.2.1') {
|
||||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
||||||
@@ -138,19 +134,18 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.11.0'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.11.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
|
||||||
implementation 'com.annimon:stream:1.2.2'
|
implementation 'com.annimon:stream:1.2.2'
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.8.7'
|
implementation 'androidx.lifecycle:lifecycle-runtime:2.9.0'
|
||||||
implementation 'org.apache.commons:commons-text:1.9'
|
implementation 'org.apache.commons:commons-text:1.9'
|
||||||
|
|
||||||
//MVVM
|
//MVVM
|
||||||
def dagger2_version = '2.55'
|
def dagger2_version = '2.55'
|
||||||
api "com.google.dagger:dagger:$dagger2_version"
|
implementation "com.google.dagger:dagger:$dagger2_version"
|
||||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
implementation "com.google.dagger:dagger-android:$dagger2_version"
|
||||||
api "com.google.dagger:dagger-android-support:$dagger2_version"
|
implementation "com.google.dagger:dagger-android-support:$dagger2_version"
|
||||||
// if you use the support libraries
|
// if you use the support libraries
|
||||||
annotationProcessor "com.google.dagger:dagger-android-processor:$dagger2_version"
|
annotationProcessor "com.google.dagger:dagger-android-processor:$dagger2_version"
|
||||||
|
|
||||||
@@ -162,7 +157,7 @@ dependencies {
|
|||||||
implementation 'com.github.pedromassango:doubleClick:3.0'
|
implementation 'com.github.pedromassango:doubleClick:3.0'
|
||||||
|
|
||||||
//SQLite ROOM
|
//SQLite ROOM
|
||||||
def room_version = "2.6.1"
|
def room_version = "2.7.1"
|
||||||
|
|
||||||
implementation "androidx.room:room-runtime:$room_version"
|
implementation "androidx.room:room-runtime:$room_version"
|
||||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||||
@@ -191,10 +186,7 @@ dependencies {
|
|||||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||||
|
|
||||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
|
||||||
|
|
||||||
//Barcode generator
|
//Barcode generator
|
||||||
// implementation group: 'com.google.zxing', name: 'core', version: '3.5.3'
|
|
||||||
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,3 +195,49 @@ repositories {
|
|||||||
google()
|
google()
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register('addBetaSuffix') {
|
||||||
|
doLast {
|
||||||
|
def gradleFile = file("build.gradle")
|
||||||
|
def content = gradleFile.text
|
||||||
|
|
||||||
|
// Modifica appVersionName
|
||||||
|
content = content.replaceAll(/appVersionName\s*=\s*'(.*?)'/) { fullMatch, version ->
|
||||||
|
"appVersionName = '${version}-beta'"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modifica outputFileName
|
||||||
|
content = content.replaceAll(/output\.outputFileName\s*=\s*"(.*?)"/) { fullMatch, filename ->
|
||||||
|
"output.outputFileName = \"${filename.replace('.apk', '-beta.apk')}\""
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modifica direttamente la riga che crea 'version.txt' in 'version-beta.txt'
|
||||||
|
content = content.replace(
|
||||||
|
"def versionFile = new File(outputDir, \"version.txt\")",
|
||||||
|
"def versionFile = new File(outputDir, \"version-beta.txt\")"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Sovrascrivi il file
|
||||||
|
gradleFile.write(content)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register('createVersionFile') {
|
||||||
|
doLast {
|
||||||
|
def outputDir = file("${projectDir}/build/outputs/apk/release")
|
||||||
|
def versionFile = new File(outputDir, "version.txt")
|
||||||
|
|
||||||
|
// Cancella il file se esiste
|
||||||
|
if (versionFile.exists()) {
|
||||||
|
versionFile.delete()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Crea il file con i contenuti desiderati
|
||||||
|
versionFile.write("${android.defaultConfig.versionCode}\n${android.defaultConfig.versionName}\nforced=true")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
tasks.assembleRelease.finalizedBy createVersionFile
|
||||||
|
}
|
||||||
|
|||||||
17
app/proguard-rules.pro
vendored
17
app/proguard-rules.pro
vendored
@@ -23,3 +23,20 @@
|
|||||||
# If you keep the line number information, uncomment this to
|
# If you keep the line number information, uncomment this to
|
||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
|
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
|
||||||
|
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||||
|
-keep class * extends com.google.gson.TypeAdapter
|
||||||
|
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||||
|
-keep class * implements com.google.gson.JsonSerializer
|
||||||
|
-keep class * implements com.google.gson.JsonDeserializer
|
||||||
|
# Prevent R8 from leaving Data object members always null
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
<init>(...);
|
||||||
|
@com.google.gson.annotations.SerializedName <fields>;
|
||||||
|
}
|
||||||
|
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
|
||||||
|
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
||||||
|
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
||||||
|
|
||||||
|
-keep class it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse { *; }
|
||||||
|
-keep class * extends it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse { *; }
|
||||||
@@ -313,8 +313,8 @@ public class MainApplicationModule {
|
|||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
DocumentRESTConsumer provideDocumentiRESTConsumer(RESTBuilder restBuilder) {
|
DocumentRESTConsumer provideDocumentiRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService) {
|
||||||
return new DocumentRESTConsumer(restBuilder);
|
return new DocumentRESTConsumer(restBuilder, executorService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ public class MtbAart extends EntityBase {
|
|||||||
|
|
||||||
private List<MtbUntMis> mtbUntMis;
|
private List<MtbUntMis> mtbUntMis;
|
||||||
|
|
||||||
|
private List<MtbAartBarCode> mtbAartBarCode;
|
||||||
|
|
||||||
|
|
||||||
public enum UntMisRifPesoEnum {
|
public enum UntMisRifPesoEnum {
|
||||||
C,
|
C,
|
||||||
@@ -965,6 +967,13 @@ public class MtbAart extends EntityBase {
|
|||||||
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
return getMtbUntMis() != null && !getMtbUntMis().isEmpty() ? getMtbUntMis().get(0) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MtbAartBarCode> getMtbAartBarCode() {
|
||||||
|
return mtbAartBarCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMtbAartBarCode(List<MtbAartBarCode> mtbAartBarCode) {
|
||||||
|
this.mtbAartBarCode = mtbAartBarCode;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class MtbAartBarCode extends EntityBase {
|
||||||
|
private String codBarre;
|
||||||
|
private String codMart;
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
private String flagPrimario;
|
||||||
|
private String tipoCodBarre;
|
||||||
|
|
||||||
|
public MtbAartBarCode() {
|
||||||
|
this.type = "mtb_aart_bar_code";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodBarre() {
|
||||||
|
return codBarre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodBarre(String codBarre) {
|
||||||
|
this.codBarre = codBarre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagPrimario() {
|
||||||
|
return flagPrimario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlagPrimario(String flagPrimario) {
|
||||||
|
this.flagPrimario = flagPrimario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTipoCodBarre() {
|
||||||
|
return tipoCodBarre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoCodBarre(String tipoCodBarre) {
|
||||||
|
this.tipoCodBarre = tipoCodBarre;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ package it.integry.integrywmsnative.core.model.dto;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
public class AlreadyRegisteredUDCDTO {
|
public class AlreadyRegisteredUlDTO {
|
||||||
|
|
||||||
private MtbColt mtbColt;
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ public class AlreadyRegisteredUDCDTO {
|
|||||||
return mtbColt;
|
return mtbColt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AlreadyRegisteredUDCDTO setMtbColt(MtbColt mtbColt) {
|
public AlreadyRegisteredUlDTO setMtbColt(MtbColt mtbColt) {
|
||||||
this.mtbColt = mtbColt;
|
this.mtbColt = mtbColt;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ public class AlreadyRegisteredUDCDTO {
|
|||||||
return canBeRecovered;
|
return canBeRecovered;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AlreadyRegisteredUDCDTO setCanBeRecovered(boolean canBeRecovered) {
|
public AlreadyRegisteredUlDTO setCanBeRecovered(boolean canBeRecovered) {
|
||||||
this.canBeRecovered = canBeRecovered;
|
this.canBeRecovered = canBeRecovered;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ public class AuthInterceptor implements Interceptor {
|
|||||||
public Response intercept(@NonNull Chain chain) throws IOException {
|
public Response intercept(@NonNull Chain chain) throws IOException {
|
||||||
var originalRequest = chain.request();
|
var originalRequest = chain.request();
|
||||||
|
|
||||||
if (SettingsManager.i().getUserSession() != null) {
|
if (SettingsManager.i().getUserSession() != null && SettingsManager.i().getUserSession().getAccessToken() != null) {
|
||||||
|
|
||||||
var accessToken = SettingsManager.i().getUserSession().getAccessToken();
|
var accessToken = SettingsManager.i().getUserSession().getAccessToken();
|
||||||
var accessTokenExpiryDate = SettingsManager.i().getUserSession().getAccessTokenExpiryDate();
|
var accessTokenExpiryDate = SettingsManager.i().getUserSession().getAccessTokenExpiryDate();
|
||||||
@@ -55,21 +55,22 @@ public class AuthInterceptor implements Interceptor {
|
|||||||
.protocol(Protocol.HTTP_1_1)
|
.protocol(Protocol.HTTP_1_1)
|
||||||
.code(401)
|
.code(401)
|
||||||
.message("Unauthorized")
|
.message("Unauthorized")
|
||||||
.body(ResponseBody.create(new byte[0], null))
|
.body(ResponseBody.create(okhttp3.MediaType.get("application/json"), new byte[0]))
|
||||||
.build();
|
.build();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return chain.proceed(originalRequest);
|
return chain.proceed(originalRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Retrieve the new access token after refresh
|
||||||
|
accessToken = SettingsManager.i().getUserSession().getAccessToken();
|
||||||
|
}
|
||||||
|
|
||||||
// Add the access token to the request header
|
// Add the access token to the request header
|
||||||
var authorizedRequest = originalRequest.newBuilder()
|
var authorizedRequest = originalRequest.newBuilder()
|
||||||
.header("Authorization", "Bearer " + SettingsManager.i().getUserSession().getAccessToken())
|
.header("Authorization", "Bearer " + accessToken)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
return chain.proceed(authorizedRequest);
|
return chain.proceed(authorizedRequest);
|
||||||
} else
|
|
||||||
return chain.proceed(originalRequest);
|
|
||||||
} else
|
} else
|
||||||
return chain.proceed(originalRequest);
|
return chain.proceed(originalRequest);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package it.integry.integrywmsnative.core.rest;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
import okhttp3.Interceptor;
|
import okhttp3.Interceptor;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
@@ -31,18 +30,6 @@ public class HttpInterceptor implements Interceptor {
|
|||||||
.addHeader("Accept", "*/*")
|
.addHeader("Accept", "*/*")
|
||||||
.addHeader("x-app-token", APP_TOKEN);
|
.addHeader("x-app-token", APP_TOKEN);
|
||||||
|
|
||||||
|
|
||||||
String accessToken = null;
|
|
||||||
|
|
||||||
//Nel caso in cui il token è scaduto e devo richiamare la refresh non bisogna passare il vecchio token
|
|
||||||
if(SettingsManager.i().getUserSession().getAccessTokenExpiryDate() != null &&
|
|
||||||
UtilityDate.getNowTime().isBefore(SettingsManager.i().getUserSession().getAccessTokenExpiryDate().minusSeconds(20))) {
|
|
||||||
accessToken = SettingsManager.i().getUserSession().getAccessToken();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(accessToken != null)
|
|
||||||
builder.header("Authorization", "Bearer " + accessToken);
|
|
||||||
|
|
||||||
var newRequest = builder
|
var newRequest = builder
|
||||||
.url(url)
|
.url(url)
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
@@ -20,9 +21,11 @@ import retrofit2.Response;
|
|||||||
public class DocumentRESTConsumer extends _BaseRESTConsumer {
|
public class DocumentRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
private final RESTBuilder restBuilder;
|
private final RESTBuilder restBuilder;
|
||||||
|
private final ExecutorService executorService;
|
||||||
|
|
||||||
public DocumentRESTConsumer(RESTBuilder restBuilder) {
|
public DocumentRESTConsumer(RESTBuilder restBuilder, ExecutorService executorService) {
|
||||||
this.restBuilder = restBuilder;
|
this.restBuilder = restBuilder;
|
||||||
|
this.executorService = executorService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createDocsFromColli(List<LoadColliDTO> listColli, RunnableArgs<List<DtbDoct>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void createDocsFromColli(List<LoadColliDTO> listColli, RunnableArgs<List<DtbDoct>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
@@ -40,17 +43,22 @@ public class DocumentRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createDocFromColli(LoadColliDTO loadColliDTO, RunnableArgs<DtbDoct> onComplete, RunnableArgs<Exception> onFailed) {
|
public DtbDoct makeSynchronousCreateDocFromColliRequest(LoadColliDTO loadColliDTO) throws Exception {
|
||||||
DocumentiRESTConsumerService documentiRESTConsumerService = restBuilder.getService(DocumentiRESTConsumerService.class);
|
DocumentiRESTConsumerService documentiRESTConsumerService = restBuilder.getService(DocumentiRESTConsumerService.class);
|
||||||
documentiRESTConsumerService.createDocFromColli(loadColliDTO).enqueue(new ManagedErrorCallback<>() {
|
var response = documentiRESTConsumerService
|
||||||
@Override
|
.createDocFromColli(loadColliDTO)
|
||||||
public void onResponse(Call<ServiceRESTResponse<DtbDoct>> call, Response<ServiceRESTResponse<DtbDoct>> response) {
|
.execute();
|
||||||
analyzeAnswer(response, "createDocFromColli", onComplete, onFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
return analyzeAnswer(response, "createDocFromColli");
|
||||||
public void onFailure(Call<ServiceRESTResponse<DtbDoct>> call, @NonNull final Exception e) {
|
}
|
||||||
onFailed.run(e);
|
|
||||||
|
public void makeCreateDocFromColliRequest(LoadColliDTO loadColliDTO, RunnableArgs<DtbDoct> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
var result = makeSynchronousCreateDocFromColliRequest(loadColliDTO);
|
||||||
|
if (onComplete != null) onComplete.run(result);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
if (onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,8 @@ import androidx.annotation.NonNull;
|
|||||||
|
|
||||||
import com.annimon.stream.Optional;
|
import com.annimon.stream.Optional;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.gson.reflect.TypeToken;
|
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
@@ -21,6 +18,7 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||||
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
||||||
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
||||||
@@ -28,8 +26,7 @@ import it.integry.integrywmsnative.core.rest.model.GetPickingListDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
import it.integry.integrywmsnative.core.rest.model.uds.RetrieveAlreadyRegisteredUdsRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@@ -180,44 +177,27 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBancaliGiaRegistrati(List<OrdineInevasoDTO> orders, GestioneEnum gestione, int segno, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public List<AlreadyRegisteredUlDTO> getBancaliGiaRegistratiSynchronized(List<? extends OrdineInevasoDTO> orders, int segno) throws Exception {
|
||||||
String whereCondGestione = "";
|
OrdiniRESTConsumerService service = restBuilder.getService(OrdiniRESTConsumerService.class);
|
||||||
|
|
||||||
if (gestione != null) {
|
var request = new RetrieveAlreadyRegisteredUdsRequestDTO()
|
||||||
whereCondGestione = "mtb_colt.gestione = " + UtilityDB.valueToString(gestione.getText()) + " ";
|
.setOrdini(orders)
|
||||||
} else {
|
.setSegno(segno);
|
||||||
whereCondGestione = "(mtb_colt.gestione = 'V' OR mtb_colt.gestione = 'L') ";
|
|
||||||
}
|
|
||||||
|
|
||||||
String baseSql = "SELECT DISTINCT mtb_colt.* " +
|
var response = service.retrieveAlreadyRegisteredUDS(request)
|
||||||
"FROM mtb_colt " +
|
.execute();
|
||||||
" INNER JOIN mtb_colr ON " +
|
var data = analyzeAnswer(response, "getBancaliGiaRegistrati");
|
||||||
" mtb_colt.gestione = mtb_colr.gestione " +
|
return data == null || data.getUdsList() == null ? new ArrayList<>() : data.getUdsList();
|
||||||
" AND mtb_colt.ser_collo = mtb_colr.ser_collo " +
|
}
|
||||||
" AND mtb_colt.data_collo = mtb_colr.data_collo " +
|
|
||||||
" AND mtb_colt.num_collo = mtb_colr.num_collo " +
|
|
||||||
" WHERE " + whereCondGestione +
|
|
||||||
" AND mtb_colt.segno = " + UtilityDB.valueToString(segno) + " " +
|
|
||||||
" AND mtb_colt.data_doc IS NULL AND ";
|
|
||||||
|
|
||||||
List<HashMap<String, Object>> whereCondMapList = new ArrayList<>();
|
public void getBancaliGiaRegistrati(List<OrdineInevasoDTO> orders, int segno, RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
for (OrdineInevasoDTO ordineInevaso : orders) {
|
executorService.execute(() -> {
|
||||||
HashMap<String, Object> whereCondMap = new HashMap<>();
|
try {
|
||||||
whereCondMap.put("mtb_colr.data_ord", ordineInevaso.getDataOrdD());
|
var result = getBancaliGiaRegistratiSynchronized(orders, segno);
|
||||||
whereCondMap.put("mtb_colr.num_ord", ordineInevaso.getNumOrd());
|
if (onComplete != null) onComplete.run(result);
|
||||||
whereCondMap.put("mtb_colr.gestione", ordineInevaso.getGestione());
|
} catch (Exception ex) {
|
||||||
|
if (onFailed != null) onFailed.run(ex);
|
||||||
whereCondMapList.add(whereCondMap);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
baseSql += "(" + UtilityQuery.concatFieldListInWhereCond(whereCondMapList) + ")";
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {
|
|
||||||
}.getType();
|
|
||||||
this.mSystemRESTConsumer.<List<MtbColt>>processSql(baseSql, typeOfObjectsList, value -> {
|
|
||||||
if (onComplete != null) onComplete.run(value);
|
|
||||||
}, ex -> {
|
|
||||||
if (onFailed != null) onFailed.run(ex);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import java.util.List;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.RetrieveAlreadyRegisteredUdsRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.uds.RetrieveAlreadyRegisteredUdsResponseDTO;
|
||||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.GetPickingListDTO;
|
import it.integry.integrywmsnative.core.rest.model.GetPickingListDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@@ -23,4 +25,7 @@ public interface OrdiniRESTConsumerService {
|
|||||||
|
|
||||||
@GET("SM2GetOrdiniVenditaInevasi")
|
@GET("SM2GetOrdiniVenditaInevasi")
|
||||||
Call<ServiceRESTResponse<List<OrdineUscitaInevasoDTO>>> getOrdiniInevasi(@Query("codMdep") String codMdep, @Query("gestione") String gestione);
|
Call<ServiceRESTResponse<List<OrdineUscitaInevasoDTO>>> getOrdiniInevasi(@Query("codMdep") String codMdep, @Query("gestione") String gestione);
|
||||||
|
|
||||||
|
@POST("wms/spedizione/retrieveAlreadyRegisteredUDS")
|
||||||
|
Call<ServiceRESTResponse<RetrieveAlreadyRegisteredUdsResponseDTO>> retrieveAlreadyRegisteredUDS(@Body RetrieveAlreadyRegisteredUdsRequestDTO request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,13 +125,12 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public void printClosedOrdersSynchronized(PrintOrderCloseDTO dto, String codMdep) throws Exception {
|
public void printClosedOrdersSynchronized(PrintOrderCloseDTO dto, String codMdep) throws Exception {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrinterRESTConsumerService printerService = restBuilder.getService(PrinterRESTConsumerService.class, 240);
|
PrinterRESTConsumerService printerService = restBuilder.getService(PrinterRESTConsumerService.class, 240);
|
||||||
Call<ServiceRESTResponse<Object>> callable = printerService.printClosedOrders(codMdep, dto);
|
|
||||||
|
|
||||||
var response = callable.execute();
|
var response = printerService.printClosedOrders(codMdep, dto).execute();
|
||||||
analyzeAnswer(response, "printCollo");
|
analyzeAnswer(response, "printCollo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
||||||
|
|
||||||
|
public class RetrieveAlreadyRegisteredUdsRequestDTO {
|
||||||
|
|
||||||
|
private List<? extends OrdineInevasoDTO> ordini;
|
||||||
|
private int segno;
|
||||||
|
|
||||||
|
public List<? extends OrdineInevasoDTO> getOrdini() {
|
||||||
|
return ordini;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RetrieveAlreadyRegisteredUdsRequestDTO setOrdini(List<? extends OrdineInevasoDTO> ordini) {
|
||||||
|
this.ordini = ordini;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSegno() {
|
||||||
|
return segno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RetrieveAlreadyRegisteredUdsRequestDTO setSegno(int segno) {
|
||||||
|
this.segno = segno;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.uds;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
|
|
||||||
|
public class RetrieveAlreadyRegisteredUdsResponseDTO {
|
||||||
|
|
||||||
|
private List<AlreadyRegisteredUlDTO> udsList;
|
||||||
|
|
||||||
|
public List<AlreadyRegisteredUlDTO> getUdsList() {
|
||||||
|
return udsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RetrieveAlreadyRegisteredUdsResponseDTO setUdsList(List<AlreadyRegisteredUlDTO> udsList) {
|
||||||
|
this.udsList = udsList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -97,6 +97,7 @@ public class DBSettingsModel {
|
|||||||
private List<String> allowedCodMgrpForArtCreation;
|
private List<String> allowedCodMgrpForArtCreation;
|
||||||
private boolean flagAccettazioneGroupListForn = false;
|
private boolean flagAccettazioneGroupListForn = false;
|
||||||
private boolean flagSpedizioneEnableFastPicking = false;
|
private boolean flagSpedizioneEnableFastPicking = false;
|
||||||
|
private boolean flagAccettazioneBollaEditableQtaTot = true;
|
||||||
|
|
||||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||||
return flagSpedizioneEnableFakeGiacenza;
|
return flagSpedizioneEnableFakeGiacenza;
|
||||||
@@ -815,4 +816,12 @@ public class DBSettingsModel {
|
|||||||
public void setFlagSpedizioneEnableFastPicking(boolean flagSpedizioneEnableFastPicking) {
|
public void setFlagSpedizioneEnableFastPicking(boolean flagSpedizioneEnableFastPicking) {
|
||||||
this.flagSpedizioneEnableFastPicking = flagSpedizioneEnableFastPicking;
|
this.flagSpedizioneEnableFastPicking = flagSpedizioneEnableFastPicking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFlagAccettazioneBollaEditableQtaTot() {
|
||||||
|
return flagAccettazioneBollaEditableQtaTot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlagAccettazioneBollaEditableQtaTot(boolean flagAccettazioneBollaEditableQtaTot) {
|
||||||
|
this.flagAccettazioneBollaEditableQtaTot = flagAccettazioneBollaEditableQtaTot;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -564,6 +564,12 @@ public class SettingsManager {
|
|||||||
.setKeySection("ENABLE_FAST_PICKING")
|
.setKeySection("ENABLE_FAST_PICKING")
|
||||||
.setSetter(dbSettingsModelIstance::setFlagSpedizioneEnableFastPicking)
|
.setSetter(dbSettingsModelIstance::setFlagSpedizioneEnableFastPicking)
|
||||||
.setDefaultValue(false));
|
.setDefaultValue(false));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE_BOLLA")
|
||||||
|
.setKeySection("FLAG_QTA_TOT_EDITABLE")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagAccettazioneBollaEditableQtaTot)
|
||||||
|
.setDefaultValue(true));
|
||||||
|
|
||||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
@@ -54,7 +55,7 @@ public class BolleAccettazioneRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.enqueue(new ManagedErrorCallback<>() {
|
.enqueue(new ManagedErrorCallback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> call, Response<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> response) {
|
public void onResponse(Call<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> call, Response<ServiceRESTResponse<RetrieveElencoArticoliAccettazioneBollaResponseDTO>> response) {
|
||||||
analyzeAnswer(response, "retrievePickingListBolle", data -> onComplete.run(data.getSitArticoli()), onFailed);
|
analyzeAnswer(response, "retrievePickingListBolle", data -> onComplete.run(data.getSitArticoli() == null ? new ArrayList<>() : data.getSitArticoli()), onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||||
@@ -452,12 +452,12 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUDCDTO> mtbColts) {
|
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUlDTO> mtbColts) {
|
||||||
|
|
||||||
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||||
|
|
||||||
Stream.of(mtbColts)
|
Stream.of(mtbColts)
|
||||||
.map(AlreadyRegisteredUDCDTO::getMtbColt)
|
.map(AlreadyRegisteredUlDTO::getMtbColt)
|
||||||
.toList(),
|
.toList(),
|
||||||
|
|
||||||
input -> Stream.of(mtbColts)
|
input -> Stream.of(mtbColts)
|
||||||
@@ -620,6 +620,7 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
|||||||
.setDataScad(dataScad)
|
.setDataScad(dataScad)
|
||||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||||
.setCanLUBeClosed(true)
|
.setCanLUBeClosed(true)
|
||||||
|
.setQtaTotEditable(SettingsManager.iDB().isFlagAccettazioneBollaEditableQtaTot())
|
||||||
.setCanOverflowOrderQuantity(canOverflowQuantity)
|
.setCanOverflowOrderQuantity(canOverflowQuantity)
|
||||||
.setDisableTracciabilitaCheck(SettingsManager.iDB().isFlagAccettazioneBollaDisableMandatoryTracciabilita());
|
.setDisableTracciabilitaCheck(SettingsManager.iDB().isFlagAccettazioneBollaDisableMandatoryTracciabilita());
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingL
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
@@ -160,7 +160,7 @@ public class AccettazioneBollaPickingViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void retrieveExistentLU(RunnableArgs<List<AlreadyRegisteredUDCDTO>> onComplete) {
|
public void retrieveExistentLU(RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
this.mAccettazioneBollaPickingRESTConsumer.retrieveAlreadyRegisteredUDC(this.mBolle, mtbColtList -> {
|
this.mAccettazioneBollaPickingRESTConsumer.retrieveAlreadyRegisteredUDC(this.mBolle, mtbColtList -> {
|
||||||
|
|||||||
@@ -2,17 +2,17 @@ package it.integry.integrywmsnative.gest.accettazione_bolla_picking.dto;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
|
|
||||||
public class RetrieveAlreadyRegisteredULAccettazioneBollaResponseDTO {
|
public class RetrieveAlreadyRegisteredULAccettazioneBollaResponseDTO {
|
||||||
|
|
||||||
private List<AlreadyRegisteredUDCDTO> udcList;
|
private List<AlreadyRegisteredUlDTO> udcList;
|
||||||
|
|
||||||
public List<AlreadyRegisteredUDCDTO> getUdcList() {
|
public List<AlreadyRegisteredUlDTO> getUdcList() {
|
||||||
return udcList;
|
return udcList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RetrieveAlreadyRegisteredULAccettazioneBollaResponseDTO setUdcList(List<AlreadyRegisteredUDCDTO> udcList) {
|
public RetrieveAlreadyRegisteredULAccettazioneBollaResponseDTO setUdcList(List<AlreadyRegisteredUlDTO> udcList) {
|
||||||
this.udcList = udcList;
|
this.udcList = udcList;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import javax.inject.Inject;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
import it.integry.integrywmsnative.core.rest.handler.ManagedErrorCallback;
|
||||||
@@ -32,7 +32,7 @@ public class AccettazioneBollaPickingRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void retrieveAlreadyRegisteredUDC(List<TestataBollaAccettazioneDTO> bolle, RunnableArgs<List<AlreadyRegisteredUDCDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void retrieveAlreadyRegisteredUDC(List<TestataBollaAccettazioneDTO> bolle, RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
AccettazioneBollaPickingRESTConsumerService service = restBuilder.getService(AccettazioneBollaPickingRESTConsumerService.class);
|
AccettazioneBollaPickingRESTConsumerService service = restBuilder.getService(AccettazioneBollaPickingRESTConsumerService.class);
|
||||||
|
|
||||||
var request = new RetrieveAlreadyRegisteredULAccettazioneBollaRequestDTO()
|
var request = new RetrieveAlreadyRegisteredULAccettazioneBollaRequestDTO()
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||||
@@ -690,11 +690,11 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUDCDTO> mtbColts) {
|
public void startListaBancaliRegistratiActivity(List<AlreadyRegisteredUlDTO> mtbColts) {
|
||||||
|
|
||||||
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||||
|
|
||||||
Stream.of(mtbColts).map(AlreadyRegisteredUDCDTO::getMtbColt).toList(),
|
Stream.of(mtbColts).map(AlreadyRegisteredUlDTO::getMtbColt).toList(),
|
||||||
|
|
||||||
input -> Stream.of(mtbColts).filter(x -> x.getMtbColt() == input).findFirstOrElse(null).isCanBeRecovered(),
|
input -> Stream.of(mtbColts).filter(x -> x.getMtbColt() == input).findFirstOrElse(null).isCanBeRecovered(),
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingL
|
|||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
@@ -198,7 +198,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
|||||||
return mPickingList;
|
return mPickingList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void retrieveExistentLU(RunnableArgs<List<AlreadyRegisteredUDCDTO>> onComplete) {
|
public void retrieveExistentLU(RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
this.mAccettazioneOrdiniPickingRESTConsumer.getBancaliGiaRegistrati(this.mOrders, mtbColtList -> {
|
this.mAccettazioneOrdiniPickingRESTConsumer.getBancaliGiaRegistrati(this.mOrders, mtbColtList -> {
|
||||||
|
|||||||
@@ -2,17 +2,17 @@ package it.integry.integrywmsnative.gest.accettazione_ordini_picking.dto;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
|
|
||||||
public class RetrieveAlreadyRegisteredULAccettazioneOrdineResponseDTO {
|
public class RetrieveAlreadyRegisteredULAccettazioneOrdineResponseDTO {
|
||||||
|
|
||||||
private List<AlreadyRegisteredUDCDTO> udcList;
|
private List<AlreadyRegisteredUlDTO> udcList;
|
||||||
|
|
||||||
public List<AlreadyRegisteredUDCDTO> getUdcList() {
|
public List<AlreadyRegisteredUlDTO> getUdcList() {
|
||||||
return udcList;
|
return udcList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RetrieveAlreadyRegisteredULAccettazioneOrdineResponseDTO setUdcList(List<AlreadyRegisteredUDCDTO> udcList) {
|
public RetrieveAlreadyRegisteredULAccettazioneOrdineResponseDTO setUdcList(List<AlreadyRegisteredUlDTO> udcList) {
|
||||||
this.udcList = udcList;
|
this.udcList = udcList;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import javax.inject.Inject;
|
|||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||||
@@ -33,7 +33,7 @@ public class AccettazioneOrdiniPickingRESTConsumer extends _BaseRESTConsumer {
|
|||||||
this.systemRestConsumer = systemRESTConsumer;
|
this.systemRestConsumer = systemRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBancaliGiaRegistrati(List<OrdineAccettazioneInevasoDTO> ordiniToShow, RunnableArgs<List<AlreadyRegisteredUDCDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void getBancaliGiaRegistrati(List<OrdineAccettazioneInevasoDTO> ordiniToShow, RunnableArgs<List<AlreadyRegisteredUlDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
AccettazioneOrdiniPickingRESTConsumerService service = restBuilder.getService(AccettazioneOrdiniPickingRESTConsumerService.class);
|
AccettazioneOrdiniPickingRESTConsumerService service = restBuilder.getService(AccettazioneOrdiniPickingRESTConsumerService.class);
|
||||||
|
|
||||||
var request = new RetrieveAlreadyRegisteredULAccettazioneOrdineRequestDTO()
|
var request = new RetrieveAlreadyRegisteredULAccettazioneOrdineRequestDTO()
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
|||||||
public final ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
public final ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
||||||
public final ObservableField<String> descrizioneDepo = new ObservableField<>();
|
public final ObservableField<String> descrizioneDepo = new ObservableField<>();
|
||||||
public ObservableField<Boolean> fabVisible = new ObservableField<>(true);
|
public ObservableField<Boolean> fabVisible = new ObservableField<>(true);
|
||||||
public ObservableField<Boolean> recoverFabMenuVisible = new ObservableField<>(false);
|
public Boolean recoverFabMenuVisible = false;
|
||||||
private PopupMenu fabPopupMenu;
|
private PopupMenu fabPopupMenu;
|
||||||
|
|
||||||
private String mReportName;
|
private String mReportName;
|
||||||
@@ -80,7 +80,7 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
boolean canRecoverUL = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
recoverFabMenuVisible = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
||||||
mtbColt.set(DataCache.retrieveItem(getIntent().getStringExtra(Key.MtbColtKey)));
|
mtbColt.set(DataCache.retrieveItem(getIntent().getStringExtra(Key.MtbColtKey)));
|
||||||
mReportName = DataCache.retrieveItem(getIntent().getStringExtra(Key.ReportName));
|
mReportName = DataCache.retrieveItem(getIntent().getStringExtra(Key.ReportName));
|
||||||
|
|
||||||
@@ -102,8 +102,6 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
|||||||
mViewModel.setListener(this);
|
mViewModel.setListener(this);
|
||||||
mViewModel.init(mtbColt.get(), mReportName);
|
mViewModel.init(mtbColt.get(), mReportName);
|
||||||
|
|
||||||
recoverFabMenuVisible.set(canRecoverUL);
|
|
||||||
|
|
||||||
this.initRecyclerView();
|
this.initRecyclerView();
|
||||||
this.initColloInfo();
|
this.initColloInfo();
|
||||||
this.initFab();
|
this.initFab();
|
||||||
@@ -144,6 +142,10 @@ public class ContenutoBancaleActivity extends BaseActivity implements ContenutoB
|
|||||||
fabPopupMenu.getMenu().removeItem(R.id.delete_ul);
|
fabPopupMenu.getMenu().removeItem(R.id.delete_ul);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!recoverFabMenuVisible) {
|
||||||
|
fabPopupMenu.getMenu().removeItem(R.id.recover_ul);
|
||||||
|
}
|
||||||
|
|
||||||
fabPopupMenu.setOnMenuItemClickListener(item -> {
|
fabPopupMenu.setOnMenuItemClickListener(item -> {
|
||||||
int itemId = item.getItemId();
|
int itemId = item.getItemId();
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
package it.integry.integrywmsnative.gest.login.dto;
|
package it.integry.integrywmsnative.gest.login.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class AuthTokenClaimsDTO {
|
public class AuthTokenClaimsDTO {
|
||||||
|
|
||||||
|
@SerializedName("deviceId")
|
||||||
private long deviceId;
|
private long deviceId;
|
||||||
|
|
||||||
|
@SerializedName("userDTO")
|
||||||
private User userDTO;
|
private User userDTO;
|
||||||
|
|
||||||
|
@SerializedName("profilesData")
|
||||||
private HashMap<String, AuthTokenProfileDetails> profilesData;
|
private HashMap<String, AuthTokenProfileDetails> profilesData;
|
||||||
|
|
||||||
public long getDeviceId() {
|
public long getDeviceId() {
|
||||||
@@ -36,11 +42,22 @@ public class AuthTokenClaimsDTO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class User {
|
public class User {
|
||||||
|
@SerializedName("username")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
|
@SerializedName("email")
|
||||||
private Object email;
|
private Object email;
|
||||||
|
|
||||||
|
@SerializedName("fullname")
|
||||||
private String fullname;
|
private String fullname;
|
||||||
|
|
||||||
|
@SerializedName("keyGroup")
|
||||||
private int keyGroup;
|
private int keyGroup;
|
||||||
|
|
||||||
|
@SerializedName("attivo")
|
||||||
private boolean attivo;
|
private boolean attivo;
|
||||||
|
|
||||||
|
@SerializedName("type")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
@@ -99,6 +116,7 @@ public class AuthTokenClaimsDTO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class AuthTokenProfileDetails {
|
public static class AuthTokenProfileDetails {
|
||||||
|
@SerializedName("defaultDepo")
|
||||||
private AuthTokenDepoDetails defaultDepo;
|
private AuthTokenDepoDetails defaultDepo;
|
||||||
|
|
||||||
public AuthTokenDepoDetails getDefaultDepo() {
|
public AuthTokenDepoDetails getDefaultDepo() {
|
||||||
@@ -112,8 +130,13 @@ public class AuthTokenClaimsDTO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class AuthTokenDepoDetails {
|
public static class AuthTokenDepoDetails {
|
||||||
|
@SerializedName("codMdep")
|
||||||
private String codMdep;
|
private String codMdep;
|
||||||
|
|
||||||
|
@SerializedName("descrizione")
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
|
|
||||||
|
@SerializedName("codJfas")
|
||||||
private String codJfas;
|
private String codJfas;
|
||||||
|
|
||||||
public String getCodMdep() {
|
public String getCodMdep() {
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
package it.integry.integrywmsnative.gest.login.dto;
|
package it.integry.integrywmsnative.gest.login.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
public class AuthenticationJwtResponseDTO {
|
public class AuthenticationJwtResponseDTO {
|
||||||
|
|
||||||
|
@SerializedName("accessToken")
|
||||||
private String accessToken;
|
private String accessToken;
|
||||||
|
|
||||||
|
@SerializedName("refreshToken")
|
||||||
private String refreshToken;
|
private String refreshToken;
|
||||||
|
|
||||||
|
@SerializedName("expiryDate")
|
||||||
private LocalDateTime expiryDate;
|
private LocalDateTime expiryDate;
|
||||||
|
|
||||||
|
@SerializedName("expireIn")
|
||||||
private long expireIn;
|
private long expireIn;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,22 @@
|
|||||||
package it.integry.integrywmsnative.gest.login.dto;
|
package it.integry.integrywmsnative.gest.login.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class LoginAziendaDTO {
|
public class LoginAziendaDTO {
|
||||||
|
|
||||||
|
@SerializedName("profileDb")
|
||||||
private String profileDb;
|
private String profileDb;
|
||||||
|
|
||||||
|
@SerializedName("endpointRestApi")
|
||||||
private String endpointRestApi;
|
private String endpointRestApi;
|
||||||
|
|
||||||
|
@SerializedName("phpApi")
|
||||||
private String phpApi;
|
private String phpApi;
|
||||||
|
|
||||||
|
@SerializedName("repoPhoto")
|
||||||
private String repoPhoto;
|
private String repoPhoto;
|
||||||
|
|
||||||
|
@SerializedName("endpointPvm")
|
||||||
private String endpointPvm;
|
private String endpointPvm;
|
||||||
|
|
||||||
public String getProfileDb() {
|
public String getProfileDb() {
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
package it.integry.integrywmsnative.gest.login.dto;
|
package it.integry.integrywmsnative.gest.login.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class LoginRequestDTO {
|
public class LoginRequestDTO {
|
||||||
|
|
||||||
|
@SerializedName("username")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
|
@SerializedName("password")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@SerializedName("deviceId")
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
|
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
package it.integry.integrywmsnative.gest.login.dto;
|
package it.integry.integrywmsnative.gest.login.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class LoginResponseDTO {
|
public class LoginResponseDTO {
|
||||||
|
|
||||||
|
@SerializedName("fullName")
|
||||||
private String fullName;
|
private String fullName;
|
||||||
private List<String> availableProfiles;
|
|
||||||
|
|
||||||
|
@SerializedName("availableProfiles")
|
||||||
|
private List<String> availableProfiles;
|
||||||
|
|
||||||
public String getFullName() {
|
public String getFullName() {
|
||||||
return fullName;
|
return fullName;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package it.integry.integrywmsnative.gest.login.dto;
|
package it.integry.integrywmsnative.gest.login.dto;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class RefreshRequestDTO {
|
public class RefreshRequestDTO {
|
||||||
|
@SerializedName("refreshToken")
|
||||||
private String refreshToken;
|
private String refreshToken;
|
||||||
|
|
||||||
public String getRefreshToken() {
|
public String getRefreshToken() {
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
|||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
import it.integry.integrywmsnative.core.model.JtbComt;
|
import it.integry.integrywmsnative.core.model.JtbComt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepo;
|
import it.integry.integrywmsnative.core.model.MtbDepo;
|
||||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||||
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
||||||
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
||||||
@@ -806,7 +806,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
Stream.of(this.mOrdiniInevasiMutableData)
|
this.mOrdiniInevasiMutableData.stream()
|
||||||
.forEach(x -> x.getSelectedObservable().set(false));
|
.forEach(x -> x.getSelectedObservable().set(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -842,7 +842,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<MtbColt> alreadyRegisteredMtbColts) {
|
public void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<AlreadyRegisteredUlDTO> alreadyRegisteredMtbColts) {
|
||||||
List<String> codMarts = Stream.of(sitArts)
|
List<String> codMarts = Stream.of(sitArts)
|
||||||
.distinctBy(SitArtOrdDTO::getCodMart)
|
.distinctBy(SitArtOrdDTO::getCodMart)
|
||||||
.map(SitArtOrdDTO::getCodMart)
|
.map(SitArtOrdDTO::getCodMart)
|
||||||
@@ -862,7 +862,6 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
() -> SpedizioneActivity.startActivity(getActivity(),
|
() -> SpedizioneActivity.startActivity(getActivity(),
|
||||||
sitArts,
|
sitArts,
|
||||||
orders,
|
orders,
|
||||||
alreadyRegisteredMtbColts,
|
|
||||||
mCurrentGestioneCol,
|
mCurrentGestioneCol,
|
||||||
mCurrentSegnoCol,
|
mCurrentSegnoCol,
|
||||||
MtbColr.Causale.DEFAULT,
|
MtbColr.Causale.DEFAULT,
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ import it.integry.integrywmsnative.core.exception.NoOrderFoundException;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||||
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
import it.integry.integrywmsnative.core.model.OrdineInevasoDTO;
|
||||||
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
@@ -146,8 +146,7 @@ public class OrdiniUscitaElencoViewModel {
|
|||||||
List<SitArtOrdDTO> finalSitArts = sitArts;
|
List<SitArtOrdDTO> finalSitArts = sitArts;
|
||||||
|
|
||||||
this.mOrdiniRESTConsumer.getBancaliGiaRegistrati(
|
this.mOrdiniRESTConsumer.getBancaliGiaRegistrati(
|
||||||
Stream.of(selectedOrdersBase).map(x -> (OrdineInevasoDTO) x).toList(),
|
selectedOrdersBase.stream().map(x -> (OrdineInevasoDTO) x).collect(Collectors.toList()),
|
||||||
mCurrentGestioneCol,
|
|
||||||
mCurrentSegnoCol,
|
mCurrentSegnoCol,
|
||||||
mtbColtList -> {
|
mtbColtList -> {
|
||||||
this.sendOnOrdersDispatched(selectedOrdersBase, finalSitArts, mtbColtList);
|
this.sendOnOrdersDispatched(selectedOrdersBase, finalSitArts, mtbColtList);
|
||||||
@@ -303,7 +302,7 @@ public class OrdiniUscitaElencoViewModel {
|
|||||||
if (this.mListener != null) mListener.onOrderFiltered(filteredOrders);
|
if (this.mListener != null) mListener.onOrderFiltered(filteredOrders);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendOnOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<MtbColt> alreadyRegisteredMtbColts) {
|
private void sendOnOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<AlreadyRegisteredUlDTO> alreadyRegisteredMtbColts) {
|
||||||
if (this.mListener != null)
|
if (this.mListener != null)
|
||||||
mListener.onOrdersDispatched(orders, sitArts, alreadyRegisteredMtbColts);
|
mListener.onOrdersDispatched(orders, sitArts, alreadyRegisteredMtbColts);
|
||||||
}
|
}
|
||||||
@@ -316,7 +315,7 @@ public class OrdiniUscitaElencoViewModel {
|
|||||||
|
|
||||||
void onOrderFiltered(List<OrdiniUscitaElencoDTO> filteredOrders);
|
void onOrderFiltered(List<OrdiniUscitaElencoDTO> filteredOrders);
|
||||||
|
|
||||||
void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<MtbColt> alreadyRegisteredMtbColts);
|
void onOrdersDispatched(List<OrdineUscitaInevasoDTO> orders, List<SitArtOrdDTO> sitArts, List<AlreadyRegisteredUlDTO> alreadyRegisteredMtbColts);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -338,6 +338,8 @@ public class PickingLiberoViewModel {
|
|||||||
|
|
||||||
if (this.mFlagAskCliente) {
|
if (this.mFlagAskCliente) {
|
||||||
var data = this.sendLUClienteRequired();
|
var data = this.sendLUClienteRequired();
|
||||||
|
if (data == null) return;
|
||||||
|
|
||||||
vtbDest = data.first;
|
vtbDest = data.first;
|
||||||
codJcom = data.second;
|
codJcom = data.second;
|
||||||
}
|
}
|
||||||
@@ -648,7 +650,6 @@ public class PickingLiberoViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void executeDepositChangeIfNeeded(MtbColt refMtbColt) throws Exception {
|
private void executeDepositChangeIfNeeded(MtbColt refMtbColt) throws Exception {
|
||||||
//Considero solo la prima UDC scansionata
|
//Considero solo la prima UDC scansionata
|
||||||
boolean shouldChangeCodMdep = refMtbColt != null && !refMtbColt.getCodMdep().equalsIgnoreCase(mCurrentMtbColt.getCodMdep()) &&
|
boolean shouldChangeCodMdep = refMtbColt != null && !refMtbColt.getCodMdep().equalsIgnoreCase(mCurrentMtbColt.getCodMdep()) &&
|
||||||
@@ -860,7 +861,7 @@ public class PickingLiberoViewModel {
|
|||||||
|
|
||||||
if (this.mDefaultGestione == GestioneEnum.LAVORAZIONE && SettingsManager.iDB().isProduzioneGeneraDocScar()) {
|
if (this.mDefaultGestione == GestioneEnum.LAVORAZIONE && SettingsManager.iDB().isProduzioneGeneraDocScar()) {
|
||||||
|
|
||||||
if(SettingsManager.iDB().getInternalCodAnags() == null || SettingsManager.iDB().getInternalCodAnags().isEmpty())
|
if (SettingsManager.iDB().getInternalCodAnags() == null || SettingsManager.iDB().getInternalCodAnags().isEmpty())
|
||||||
throw new Exception("Nessuna anagrafica aziendale configurata. Assicurarsi di aver abilitato il flag FLAG_USE_COD_ANAG_AZIENDALE.");
|
throw new Exception("Nessuna anagrafica aziendale configurata. Assicurarsi di aver abilitato il flag FLAG_USE_COD_ANAG_AZIENDALE.");
|
||||||
|
|
||||||
closeUDSRequest
|
closeUDSRequest
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.text.InputType;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
@@ -51,6 +53,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView;
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
@@ -68,6 +71,9 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
|||||||
@Inject
|
@Inject
|
||||||
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
Handler handler;
|
||||||
|
|
||||||
private BottomSheetFragmentLUContentViewModel mBottomSheetFragmentLUContentViewModel;
|
private BottomSheetFragmentLUContentViewModel mBottomSheetFragmentLUContentViewModel;
|
||||||
|
|
||||||
private ObservableArrayList<PickingResiListModel> mPickingResiMutableData = new ObservableArrayList<>();
|
private ObservableArrayList<PickingResiListModel> mPickingResiMutableData = new ObservableArrayList<>();
|
||||||
@@ -250,10 +256,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
|||||||
public void createNewLU() {
|
public void createNewLU() {
|
||||||
this.mBindings.mainFab.close(true);
|
this.mBindings.mainFab.close(true);
|
||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
|
this.mViewmodel.createNewLU(null, null, this::onLoadingEnded);
|
||||||
this.mViewmodel.createNewLU(null, null, () -> {
|
|
||||||
this.onLoadingEnded();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeListFilter() {
|
public void removeListFilter() {
|
||||||
@@ -333,7 +336,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
|||||||
mDialogInputQuantityV2View
|
mDialogInputQuantityV2View
|
||||||
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
|
||||||
.setOnComplete(resultDTO -> {
|
.setOnComplete(resultDTO -> {
|
||||||
if(resultDTO == null || resultDTO.isAborted()) {
|
if (resultDTO == null || resultDTO.isAborted()) {
|
||||||
this.mViewmodel.resetMatchedRows();
|
this.mViewmodel.resetMatchedRows();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -369,7 +372,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
|||||||
@Override
|
@Override
|
||||||
public void onRowSaved() {
|
public void onRowSaved() {
|
||||||
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
||||||
.setBackgroundTint(getResources().getColor(R. color. green_500))
|
.setBackgroundTint(getResources().getColor(R.color.green_500))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,21 +388,25 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUOpened(MtbColt mtbColt) {
|
public void onLUOpened(MtbColt mtbColt) {
|
||||||
noLUPresent.set(false);
|
handler.post(() -> {
|
||||||
|
noLUPresent.set(false);
|
||||||
|
|
||||||
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
|
||||||
.setBackgroundTint(getResources().getColor(R. color. green_500))
|
.setBackgroundTint(getResources().getColor(R.color.green_500))
|
||||||
.show();
|
.show();
|
||||||
|
|
||||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt);
|
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUClosed() {
|
public void onLUClosed() {
|
||||||
noLUPresent.set(true);
|
handler.post(() -> {
|
||||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
noLUPresent.set(true);
|
||||||
|
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
||||||
|
|
||||||
if (this.mShouldCloseActivity) super.onBackPressed();
|
if (this.mShouldCloseActivity) super.onBackPressed();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -446,7 +446,6 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
|
|||||||
SpedizioneActivity.startActivity(getActivity(),
|
SpedizioneActivity.startActivity(getActivity(),
|
||||||
sitArtOrdDTOS,
|
sitArtOrdDTOS,
|
||||||
new ArrayList<>(),
|
new ArrayList<>(),
|
||||||
new ArrayList<>(),
|
|
||||||
GestioneEnum.LAVORAZIONE,
|
GestioneEnum.LAVORAZIONE,
|
||||||
+1,
|
+1,
|
||||||
MtbColr.Causale.VERSAMENTO,
|
MtbColr.Causale.VERSAMENTO,
|
||||||
|
|||||||
@@ -201,6 +201,8 @@ public class VerificaGiacenzeFragment extends BaseFragment implements ITitledFra
|
|||||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
.setOnScanSuccessful(onScanSuccessful)
|
.setOnScanSuccessful(onScanSuccessful)
|
||||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(requireContext(), ex, false)));
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(requireContext(), ex, false)));
|
||||||
|
|
||||||
|
BarcodeManager.enable(barcodeScannerIstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
@@ -209,12 +211,12 @@ public class VerificaGiacenzeFragment extends BaseFragment implements ITitledFra
|
|||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
try {
|
try {
|
||||||
this.mViewModel.processBarcodeDTO(data);
|
this.mViewModel.processBarcodeDTO(data);
|
||||||
this.onLoadingEnded();
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.onError(e);
|
this.onError(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.onLoadingEnded();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -279,6 +281,8 @@ public class VerificaGiacenzeFragment extends BaseFragment implements ITitledFra
|
|||||||
.setTotalNumCnfOrd(incomingNumCnf)
|
.setTotalNumCnfOrd(incomingNumCnf)
|
||||||
.setPartitaMag(partitaMag)
|
.setPartitaMag(partitaMag)
|
||||||
.setDataScad(dataScad)
|
.setDataScad(dataScad)
|
||||||
|
.setCanInputZeroQuantity(true)
|
||||||
|
.setCanOverflowOrderQuantity(true)
|
||||||
.setCanLUBeClosed(false);
|
.setCanLUBeClosed(false);
|
||||||
|
|
||||||
if (!dialogInputQuantityV2View.isVisible())
|
if (!dialogInputQuantityV2View.isVisible())
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -24,6 +25,7 @@ import it.integry.integrywmsnative.core.data_store.db.respository_new.VerificaGi
|
|||||||
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
import it.integry.integrywmsnative.core.exception.NoArtsFoundException;
|
||||||
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeMapper;
|
import it.integry.integrywmsnative.core.mapper.VerificaGiacenzeMapper;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAartBarCode;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaPvRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
import it.integry.integrywmsnative.core.rest.model.Ean13PesoModel;
|
||||||
@@ -116,7 +118,7 @@ public class VerificaGiacenzeViewModel {
|
|||||||
|
|
||||||
public void randomizeElements(int elementsCount) {
|
public void randomizeElements(int elementsCount) {
|
||||||
|
|
||||||
for(int i = 0; i < elementsCount; i++) {
|
for (int i = 0; i < elementsCount; i++) {
|
||||||
var randomIndex = (int) (Math.random() * currentLoadedAnagrafiche.size());
|
var randomIndex = (int) (Math.random() * currentLoadedAnagrafiche.size());
|
||||||
var randomAnagrafica = currentLoadedAnagrafiche.get(randomIndex);
|
var randomAnagrafica = currentLoadedAnagrafiche.get(randomIndex);
|
||||||
|
|
||||||
@@ -168,7 +170,7 @@ public class VerificaGiacenzeViewModel {
|
|||||||
|
|
||||||
|
|
||||||
public void save() throws Exception {
|
public void save() throws Exception {
|
||||||
if(currentVerificaRows.getValue().isEmpty()) {
|
if (currentVerificaRows.getValue().isEmpty()) {
|
||||||
delete();
|
delete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -280,10 +282,21 @@ public class VerificaGiacenzeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MtbAart searchAnagraficaByBarcode(String barcode) {
|
public MtbAart searchAnagraficaByBarcode(String barcode) {
|
||||||
return currentLoadedAnagrafiche.parallelStream()
|
MtbAart mtbAart = currentLoadedAnagrafiche.parallelStream()
|
||||||
.filter(mtbAart -> barcode.equals(mtbAart.getBarCode()))
|
.filter(x -> barcode.equals(x.getBarCode()))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
||||||
|
if (mtbAart == null) {
|
||||||
|
mtbAart = currentLoadedAnagrafiche.parallelStream()
|
||||||
|
.filter(x -> x.getMtbAartBarCode() != null &&
|
||||||
|
x.getMtbAartBarCode().stream()
|
||||||
|
.anyMatch(y -> barcode.equals(y.getCodBarre())))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return mtbAart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void insertRow(VerificaGiacenzeRowEntity rowEntity) {
|
public void insertRow(VerificaGiacenzeRowEntity rowEntity) {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
@@ -50,8 +51,10 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||||
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
|
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
@@ -120,7 +123,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
|
|
||||||
private ArrayList<SitArtOrdDTO> mSitArtOrd;
|
private ArrayList<SitArtOrdDTO> mSitArtOrd;
|
||||||
private ArrayList<OrdineUscitaInevasoDTO> mTestateOrdini;
|
private ArrayList<OrdineUscitaInevasoDTO> mTestateOrdini;
|
||||||
private ArrayList<MtbColt> mColliRegistrati;
|
private ArrayList<AlreadyRegisteredUlDTO> mColliRegistrati;
|
||||||
private GestioneEnum mGestioneCol;
|
private GestioneEnum mGestioneCol;
|
||||||
private int mSegnoCol;
|
private int mSegnoCol;
|
||||||
private Integer mDefaultCausaleUL;
|
private Integer mDefaultCausaleUL;
|
||||||
@@ -135,7 +138,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
public static void startActivity(Context context,
|
public static void startActivity(Context context,
|
||||||
List<SitArtOrdDTO> ordini,
|
List<SitArtOrdDTO> ordini,
|
||||||
List<OrdineUscitaInevasoDTO> selectedOrders,
|
List<OrdineUscitaInevasoDTO> selectedOrders,
|
||||||
List<MtbColt> mtbColtList,
|
|
||||||
GestioneEnum gestioneCol,
|
GestioneEnum gestioneCol,
|
||||||
int segnoCol,
|
int segnoCol,
|
||||||
Integer defaultCausaleUL,
|
Integer defaultCausaleUL,
|
||||||
@@ -149,9 +151,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
String keyTestateOrdini = DataCache.addItem(selectedOrders);
|
String keyTestateOrdini = DataCache.addItem(selectedOrders);
|
||||||
myIntent.putExtra("keyTestateOrdini", keyTestateOrdini);
|
myIntent.putExtra("keyTestateOrdini", keyTestateOrdini);
|
||||||
|
|
||||||
String keyColliRegistrati = DataCache.addItem(mtbColtList);
|
|
||||||
myIntent.putExtra("keyColliRegistrati", keyColliRegistrati);
|
|
||||||
|
|
||||||
String keyGestioneCol = DataCache.addItem(gestioneCol);
|
String keyGestioneCol = DataCache.addItem(gestioneCol);
|
||||||
myIntent.putExtra("keyGestioneCol", keyGestioneCol);
|
myIntent.putExtra("keyGestioneCol", keyGestioneCol);
|
||||||
|
|
||||||
@@ -176,7 +175,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
|
|
||||||
mSitArtOrd = DataCache.retrieveItem(getIntent().getStringExtra("keyPickingList"));
|
mSitArtOrd = DataCache.retrieveItem(getIntent().getStringExtra("keyPickingList"));
|
||||||
mTestateOrdini = DataCache.retrieveItem(getIntent().getStringExtra("keyTestateOrdini"));
|
mTestateOrdini = DataCache.retrieveItem(getIntent().getStringExtra("keyTestateOrdini"));
|
||||||
mColliRegistrati = DataCache.retrieveItem(getIntent().getStringExtra("keyColliRegistrati"));
|
|
||||||
mGestioneCol = DataCache.retrieveItem(getIntent().getStringExtra("keyGestioneCol"));
|
mGestioneCol = DataCache.retrieveItem(getIntent().getStringExtra("keyGestioneCol"));
|
||||||
mSegnoCol = DataCache.retrieveItem(getIntent().getStringExtra("keySegnoCol"));
|
mSegnoCol = DataCache.retrieveItem(getIntent().getStringExtra("keySegnoCol"));
|
||||||
mDefaultCausaleUL = DataCache.retrieveItem(getIntent().getStringExtra("keyDefaultCausaleCol"));
|
mDefaultCausaleUL = DataCache.retrieveItem(getIntent().getStringExtra("keyDefaultCausaleCol"));
|
||||||
@@ -229,7 +227,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
canOverflowOrderQuantity,
|
canOverflowOrderQuantity,
|
||||||
mSitArtOrd,
|
mSitArtOrd,
|
||||||
mTestateOrdini,
|
mTestateOrdini,
|
||||||
mColliRegistrati,
|
|
||||||
mGestioneCol, mSegnoCol, mDefaultCausaleUL,
|
mGestioneCol, mSegnoCol, mDefaultCausaleUL,
|
||||||
mEnableQuantityReset,
|
mEnableQuantityReset,
|
||||||
useQtaOrd,
|
useQtaOrd,
|
||||||
@@ -822,25 +819,45 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showCreatedUL() {
|
public void showCreatedUL() {
|
||||||
handler.post(() -> {
|
this.fabPopupMenu.dismiss();
|
||||||
this.fabPopupMenu.dismiss();
|
|
||||||
|
|
||||||
ArrayList<MtbColt> createdMtbColts = this.mViewmodel.getCreatedMtbColts();
|
executorService.execute(() -> {
|
||||||
|
try {
|
||||||
|
ArrayList<AlreadyRegisteredUlDTO> createdMtbColts = this.mViewmodel.getCreatedMtbColts();
|
||||||
|
|
||||||
Intent myIntent = ListaBancaliActivity.createIntent(this, createdMtbColts, true, false);
|
handler.post(() -> {
|
||||||
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
Intent myIntent = ListaBancaliActivity.createIntent(this,
|
||||||
|
|
||||||
|
createdMtbColts.stream()
|
||||||
|
.map(AlreadyRegisteredUlDTO::getMtbColt)
|
||||||
|
.collect(Collectors.toList()),
|
||||||
|
|
||||||
|
input -> createdMtbColts.stream()
|
||||||
|
.filter(x -> x.getMtbColt().equals(input))
|
||||||
|
.findFirst()
|
||||||
|
.map(AlreadyRegisteredUlDTO::isCanBeRecovered)
|
||||||
|
.orElse(false),
|
||||||
|
|
||||||
|
false,
|
||||||
|
|
||||||
|
ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
||||||
|
|
||||||
|
|
||||||
|
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
onError(e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void closeOrder() {
|
public void closeOrder() {
|
||||||
this.fabPopupMenu.dismiss();
|
this.fabPopupMenu.dismiss();
|
||||||
this.onLoadingStarted();
|
|
||||||
|
|
||||||
executorService.execute(() -> {
|
executorService.execute(() -> {
|
||||||
try {
|
try {
|
||||||
this.mViewmodel.closeOrder();
|
this.mViewmodel.closeOrder();
|
||||||
this.onLoadingEnded();
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
onError(e);
|
onError(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||||
import it.integry.integrywmsnative.core.model.VtbVett;
|
import it.integry.integrywmsnative.core.model.VtbVett;
|
||||||
|
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUlDTO;
|
||||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||||
@@ -107,7 +108,6 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
private List<OrdineUscitaInevasoDTO> mTestateOrdini;
|
private List<OrdineUscitaInevasoDTO> mTestateOrdini;
|
||||||
private MutableLiveData<List<PickingObjectDTO>> mPickingList = new MutableLiveData<>();
|
private MutableLiveData<List<PickingObjectDTO>> mPickingList = new MutableLiveData<>();
|
||||||
private List<MtbColt> mColliRegistrati = new ArrayList<>();
|
|
||||||
private List<MtbPartitaMag> mPartitaMagList = new ArrayList<>();
|
private List<MtbPartitaMag> mPartitaMagList = new ArrayList<>();
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
@@ -187,12 +187,11 @@ public class SpedizioneViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void init(String codMdep, boolean enableGiacenza, boolean enableCheckPartitaMag, boolean shouldAskPesoLU, boolean canOverflowOrderQuantity, List<SitArtOrdDTO> pickingList, List<OrdineUscitaInevasoDTO> testateOrdini, List<MtbColt> colliRegistrati, GestioneEnum gestioneCol, int segnoCol, Integer defaultCausaleUL, boolean enableQuantityReset, boolean useQtaOrd, boolean useColliPedana) {
|
public void init(String codMdep, boolean enableGiacenza, boolean enableCheckPartitaMag, boolean shouldAskPesoLU, boolean canOverflowOrderQuantity, List<SitArtOrdDTO> pickingList, List<OrdineUscitaInevasoDTO> testateOrdini, GestioneEnum gestioneCol, int segnoCol, Integer defaultCausaleUL, boolean enableQuantityReset, boolean useQtaOrd, boolean useColliPedana) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
this.mDefaultCodMdep = codMdep;
|
this.mDefaultCodMdep = codMdep;
|
||||||
this.mTestateOrdini = testateOrdini;
|
this.mTestateOrdini = testateOrdini;
|
||||||
this.mColliRegistrati = colliRegistrati;
|
|
||||||
this.mEnableGiacenza = enableGiacenza;
|
this.mEnableGiacenza = enableGiacenza;
|
||||||
this.mEnableCheckPartitaMag = enableCheckPartitaMag;
|
this.mEnableCheckPartitaMag = enableCheckPartitaMag;
|
||||||
this.mCanOverflowOrderQuantity = canOverflowOrderQuantity;
|
this.mCanOverflowOrderQuantity = canOverflowOrderQuantity;
|
||||||
@@ -342,14 +341,6 @@ public class SpedizioneViewModel {
|
|||||||
return mIsOrdTrasf;
|
return mIsOrdTrasf;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onOrderClosedPrintingDone() {
|
|
||||||
if (this.mIsOrdTrasf && !UtilityString.isNullOrEmpty(SettingsManager.iDB().getCodDtipOrdTrasfV())) {
|
|
||||||
this.sendCreateDocsRequest();
|
|
||||||
} else {
|
|
||||||
this.sendOnOrderClosed();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void sendOnLoadingStarted() {
|
private void sendOnLoadingStarted() {
|
||||||
if (this.mListener != null) mListener.onLoadingStarted();
|
if (this.mListener != null) mListener.onLoadingStarted();
|
||||||
@@ -515,7 +506,6 @@ public class SpedizioneViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Pair<Boolean, MtbDepoPosizione> sendLUPositionChangeRequest() {
|
private Pair<Boolean, MtbDepoPosizione> sendLUPositionChangeRequest() {
|
||||||
|
|
||||||
final CountDownLatch latch = new CountDownLatch(1);
|
final CountDownLatch latch = new CountDownLatch(1);
|
||||||
AtomicReference<Pair<Boolean, MtbDepoPosizione>> result = new AtomicReference<>();
|
AtomicReference<Pair<Boolean, MtbDepoPosizione>> result = new AtomicReference<>();
|
||||||
|
|
||||||
@@ -533,9 +523,22 @@ public class SpedizioneViewModel {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendBatchLotSelectionRequest(List<MtbPartitaMag> availableBatchLots, RunnableArgs<MtbPartitaMag> onComplete) {
|
private MtbPartitaMag sendBatchLotSelectionRequest(List<MtbPartitaMag> availableBatchLots) {
|
||||||
if (this.mListener != null)
|
final CountDownLatch latch = new CountDownLatch(1);
|
||||||
mListener.onBatchLotSelectionRequest(availableBatchLots, onComplete);
|
AtomicReference<MtbPartitaMag> result = new AtomicReference<>();
|
||||||
|
|
||||||
|
mListener.onBatchLotSelectionRequest(availableBatchLots, item -> {
|
||||||
|
result.set(item);
|
||||||
|
latch.countDown();
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
latch.await(); // Attende che il dialog venga chiuso
|
||||||
|
return result.get();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
this.sendError(e);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) throws Exception {
|
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO) throws Exception {
|
||||||
@@ -1016,24 +1019,23 @@ public class SpedizioneViewModel {
|
|||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sendBatchLotSelectionRequest(tmp, selected -> {
|
var selected = this.sendBatchLotSelectionRequest(tmp);
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
MtbColr scannedMtbColr = pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().stream()
|
MtbColr scannedMtbColr = pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr().stream()
|
||||||
.filter(x -> x.getCodMart().equalsIgnoreCase(pickingObjectDTO.getMtbAart().getCodMart()) &&
|
.filter(x -> x.getCodMart().equalsIgnoreCase(pickingObjectDTO.getMtbAart().getCodMart()) &&
|
||||||
((x.getPartitaMag() != null && selected.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(selected.getPartitaMag()))
|
((x.getPartitaMag() != null && selected.getPartitaMag() != null && x.getPartitaMag().equalsIgnoreCase(selected.getPartitaMag()))
|
||||||
|| (x.getPartitaMag() == null && selected.getPartitaMag() == null)))
|
|| (x.getPartitaMag() == null && selected.getPartitaMag() == null)))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColr, canPartitaMagBeChanged, executeImmediately);
|
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColr, canPartitaMagBeChanged, executeImmediately);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.sendError(e);
|
this.sendError(e);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColrs.get(0), canPartitaMagBeChanged, executeImmediately);
|
dispatchOrdineRowOnPostBatchLotSelection(pickingObjectDTO, refMtbColt, refMtbColr, scannedMtbColrs.get(0), canPartitaMagBeChanged, executeImmediately);
|
||||||
@@ -1734,13 +1736,8 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
var positionedMtbColts = this.askPositionChange(filledMtbColts);
|
var positionedMtbColts = this.askPositionChange(filledMtbColts);
|
||||||
|
|
||||||
|
|
||||||
this.askPrint((shouldPrint && SettingsManager.iDB().isFlagPrintEtichetteOnLUClose()), positionedMtbColts);
|
this.askPrint((shouldPrint && SettingsManager.iDB().isFlagPrintEtichetteOnLUClose()), positionedMtbColts);
|
||||||
|
|
||||||
positionedMtbColts.stream()
|
|
||||||
.filter(x -> !this.mColliRegistrati.contains(x))
|
|
||||||
.forEach(x -> this.mColliRegistrati.add(x));
|
|
||||||
|
|
||||||
postCloseOperations(positionedMtbColts);
|
postCloseOperations(positionedMtbColts);
|
||||||
|
|
||||||
this.mIsNewLU = false;
|
this.mIsNewLU = false;
|
||||||
@@ -2118,15 +2115,21 @@ public class SpedizioneViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void closeOrder() {
|
public void closeOrder() {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
if (SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose() || SettingsManager.iDB().isFlagPrintPackingListOnOrderClose()) {
|
if (SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose() || SettingsManager.iDB().isFlagPrintPackingListOnOrderClose()) {
|
||||||
var printRequestResult = this.sendOnCloseOrderPrintRequest();
|
var printRequestResult = this.sendOnCloseOrderPrintRequest();
|
||||||
this.onCloseOrderPrintRequest(printRequestResult);
|
this.onCloseOrderPrintRequested(printRequestResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onOrderClosedPrintingDone();
|
if (this.mIsOrdTrasf && !UtilityString.isNullOrEmpty(SettingsManager.iDB().getCodDtipOrdTrasfV())) {
|
||||||
|
this.sendCreateDocsRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.sendOnOrderClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onCloseOrderPrintRequest(PrintOrderCloseDTO dto) {
|
private void onCloseOrderPrintRequested(PrintOrderCloseDTO dto) {
|
||||||
if (!dto.isFlagPrintPackingList() && !dto.isFlagPrintSSCC()) {
|
if (!dto.isFlagPrintPackingList() && !dto.isFlagPrintSSCC()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2142,13 +2145,22 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
dto.setPrintList(closedOrders);
|
dto.setPrintList(closedOrders);
|
||||||
|
|
||||||
|
CountDownLatch latch = new CountDownLatch(1);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
printClosedOrders(dto);
|
printClosedOrders(dto);
|
||||||
|
latch.countDown();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.sendLUPrintError(e, () -> {
|
this.sendLUPrintError(e, () -> {
|
||||||
|
latch.countDown();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
latch.await();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void printClosedOrders(PrintOrderCloseDTO dto) throws Exception {
|
private void printClosedOrders(PrintOrderCloseDTO dto) throws Exception {
|
||||||
@@ -2181,8 +2193,8 @@ public class SpedizioneViewModel {
|
|||||||
return mPartitaMagList;
|
return mPartitaMagList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<MtbColt> getCreatedMtbColts() {
|
public ArrayList<AlreadyRegisteredUlDTO> getCreatedMtbColts() throws Exception {
|
||||||
return (ArrayList<MtbColt>) this.mColliRegistrati;
|
return (ArrayList<AlreadyRegisteredUlDTO>) this.mOrdiniRestConsumerService.getBancaliGiaRegistratiSynchronized(mTestateOrdini, mDefaultSegnoCol);
|
||||||
}
|
}
|
||||||
|
|
||||||
public VtbVett getDefaultVettore() {
|
public VtbVett getDefaultVettore() {
|
||||||
@@ -2190,30 +2202,51 @@ public class SpedizioneViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void createDocs() {
|
void createDocs() {
|
||||||
var loadCollidto = new LoadColliDTO();
|
executorService.execute(() -> {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
List<MtbColt> registeredUds = null;
|
||||||
|
|
||||||
var codAnag = mTestateOrdini.stream()
|
try {
|
||||||
.map(OrdineUscitaInevasoDTO::getCodAnagOrd)
|
var alreadyCreatedUds = getCreatedMtbColts();
|
||||||
.filter(Objects::nonNull)
|
registeredUds = alreadyCreatedUds.stream()
|
||||||
.distinct()
|
.map(AlreadyRegisteredUlDTO::getMtbColt)
|
||||||
.findFirst()
|
.collect(Collectors.toList());
|
||||||
.get();
|
} catch (Exception e) {
|
||||||
|
sendError(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var codVdes = mTestateOrdini.stream().map(OrdineUscitaInevasoDTO::getCodVdes)
|
var loadCollidto = new LoadColliDTO();
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.distinct()
|
|
||||||
.findFirst()
|
|
||||||
.get();
|
|
||||||
|
|
||||||
loadCollidto.setColli(getCreatedMtbColts());
|
var codAnag = mTestateOrdini.stream()
|
||||||
loadCollidto.setCodDtip(SettingsManager.iDB().getCodDtipOrdTrasfV());
|
.map(OrdineUscitaInevasoDTO::getCodAnagOrd)
|
||||||
loadCollidto.setCodMdep(mDefaultCodMdep);
|
.filter(Objects::nonNull)
|
||||||
loadCollidto.setCodAnag(codAnag);
|
.distinct()
|
||||||
loadCollidto.setCodVdes(codVdes);
|
.findFirst()
|
||||||
loadCollidto.setSaveDoc(true);
|
.get();
|
||||||
loadCollidto.setGestione("L");
|
|
||||||
|
|
||||||
this.mDocumentRESTConsumer.createDocFromColli(loadCollidto, doc -> this.sendOnOrderClosed(), this::sendError);
|
var codVdes = mTestateOrdini.stream()
|
||||||
|
.map(OrdineUscitaInevasoDTO::getCodVdes)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.distinct()
|
||||||
|
.findFirst()
|
||||||
|
.get();
|
||||||
|
|
||||||
|
loadCollidto.setColli(registeredUds);
|
||||||
|
loadCollidto.setCodDtip(SettingsManager.iDB().getCodDtipOrdTrasfV());
|
||||||
|
loadCollidto.setCodMdep(mDefaultCodMdep);
|
||||||
|
loadCollidto.setCodAnag(codAnag);
|
||||||
|
loadCollidto.setCodVdes(codVdes);
|
||||||
|
loadCollidto.setSaveDoc(true);
|
||||||
|
loadCollidto.setGestione("L");
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.mDocumentRESTConsumer.makeSynchronousCreateDocFromColliRequest(loadCollidto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
sendError(e);
|
||||||
|
}
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private Integer sendInputDuplicate() {
|
private Integer sendInputDuplicate() {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.DialogInterface;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -63,6 +64,9 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
|||||||
@Inject
|
@Inject
|
||||||
DialogProgressView dialogProgressView;
|
DialogProgressView dialogProgressView;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
Handler handler;
|
||||||
|
|
||||||
public static DialogAskClienteView newInstance(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
|
public static DialogAskClienteView newInstance(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
|
||||||
return new DialogAskClienteView(onComplete, onAbort);
|
return new DialogAskClienteView(onComplete, onAbort);
|
||||||
}
|
}
|
||||||
@@ -119,6 +123,8 @@ public class DialogAskClienteView extends BaseDialogFragment {
|
|||||||
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page1);
|
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page1);
|
||||||
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page2);
|
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page2);
|
||||||
|
|
||||||
|
viewModel1.setHandler(handler);
|
||||||
|
|
||||||
viewModel1.setOnConfirmClickListener(() -> {
|
viewModel1.setOnConfirmClickListener(() -> {
|
||||||
String codAnag = viewModel1.getCurrentCliente();
|
String codAnag = viewModel1.getCurrentCliente();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.Handler;
|
||||||
import android.widget.AutoCompleteTextView;
|
import android.widget.AutoCompleteTextView;
|
||||||
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
@@ -37,9 +38,15 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
|||||||
private Runnable onConfirmClickListener;
|
private Runnable onConfirmClickListener;
|
||||||
private Runnable onAbortClickListener;
|
private Runnable onAbortClickListener;
|
||||||
|
|
||||||
|
private Handler handler;
|
||||||
|
|
||||||
public DialogAskCliente_Page1ViewModel() {
|
public DialogAskCliente_Page1ViewModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setHandler(Handler handler){
|
||||||
|
this.handler = handler;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setContext(Context context) {
|
public void setContext(Context context) {
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
@@ -147,33 +154,33 @@ public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewMod
|
|||||||
|
|
||||||
|
|
||||||
private void initializeAdapter(ArrayList<DialogAskClienteClienteDTO> items) {
|
private void initializeAdapter(ArrayList<DialogAskClienteClienteDTO> items) {
|
||||||
|
handler.post(() -> {
|
||||||
|
var orderedList = Stream.of(items)
|
||||||
|
.sortBy(x -> x.getRagSoc() != null ? x.getRagSoc() : "")
|
||||||
|
.toList();
|
||||||
|
|
||||||
var orderedList = Stream.of(items)
|
DialogAskCliente_Page1_Cliente_ArrayAdapter adapter = new DialogAskCliente_Page1_Cliente_ArrayAdapter(mContext, orderedList);
|
||||||
.sortBy(x -> x.getRagSoc() != null ? x.getRagSoc() : "")
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
DialogAskCliente_Page1_Cliente_ArrayAdapter adapter = new DialogAskCliente_Page1_Cliente_ArrayAdapter(mContext, orderedList);
|
AutoCompleteTextView editTextDropdownCliente = mBinding.dropdownCliente;
|
||||||
|
editTextDropdownCliente.setThreshold(0);
|
||||||
|
editTextDropdownCliente.setAdapter(adapter);
|
||||||
|
editTextDropdownCliente.setOnItemClickListener((parent, view, position, id) -> {
|
||||||
|
refreshCodJcoms(items.get(position));
|
||||||
|
});
|
||||||
|
|
||||||
AutoCompleteTextView editTextDropdownCliente = mBinding.dropdownCliente;
|
DialogAskCliente_Page1_Commessa_ArrayAdapter commessaAdapter = new DialogAskCliente_Page1_Commessa_ArrayAdapter(mContext);
|
||||||
editTextDropdownCliente.setThreshold(0);
|
|
||||||
editTextDropdownCliente.setAdapter(adapter);
|
|
||||||
editTextDropdownCliente.setOnItemClickListener((parent, view, position, id) -> {
|
|
||||||
refreshCodJcoms(items.get(position));
|
|
||||||
});
|
|
||||||
|
|
||||||
|
AutoCompleteTextView editTextDropdownCommessa = mBinding.dropdownCommessa;
|
||||||
|
editTextDropdownCommessa.setThreshold(0);
|
||||||
|
editTextDropdownCommessa.setAdapter(commessaAdapter);
|
||||||
|
|
||||||
DialogAskCliente_Page1_Commessa_ArrayAdapter commessaAdapter = new DialogAskCliente_Page1_Commessa_ArrayAdapter(mContext);
|
codJcoms.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
AutoCompleteTextView editTextDropdownCommessa = mBinding.dropdownCommessa;
|
public void onChanged(ObservableList sender) {
|
||||||
editTextDropdownCommessa.setThreshold(0);
|
commessaAdapter.clear();
|
||||||
editTextDropdownCommessa.setAdapter(commessaAdapter);
|
commessaAdapter.addAll(codJcoms);
|
||||||
|
}
|
||||||
codJcoms.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
});
|
||||||
@Override
|
|
||||||
public void onChanged(ObservableList sender) {
|
|
||||||
commessaAdapter.clear();
|
|
||||||
commessaAdapter.addAll(codJcoms);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
@@ -10,8 +12,8 @@ import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page2.DialogBask
|
|||||||
public class DialogBasketLUModule {
|
public class DialogBasketLUModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
DialogBasketLU_Page1_ViewModel providesDialogBasketLUPage1ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
|
DialogBasketLU_Page1_ViewModel providesDialogBasketLUPage1ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, Handler handler) {
|
||||||
return new DialogBasketLU_Page1_ViewModel(colliMagazzinoRESTConsumer);
|
return new DialogBasketLU_Page1_ViewModel(colliMagazzinoRESTConsumer, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
|||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -36,7 +37,8 @@ public class DialogBasketLUView extends BaseDialogFragment {
|
|||||||
private final RunnableArgs<MtbColt> mOnComplete;
|
private final RunnableArgs<MtbColt> mOnComplete;
|
||||||
private DialogBasketLuBinding mBindings;
|
private DialogBasketLuBinding mBindings;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
Handler handler;
|
||||||
|
|
||||||
public DialogBasketLUView(RunnableArgs<MtbColt> onComplete) {
|
public DialogBasketLUView(RunnableArgs<MtbColt> onComplete) {
|
||||||
mOnComplete = onComplete;
|
mOnComplete = onComplete;
|
||||||
@@ -52,7 +54,7 @@ public class DialogBasketLUView extends BaseDialogFragment {
|
|||||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
mBindings = DialogBasketLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
mBindings = DialogBasketLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||||
|
|
||||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||||
.setView(mBindings.getRoot())
|
.setView(mBindings.getRoot())
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.create();
|
.create();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1;
|
package it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.Handler;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
@@ -30,9 +31,12 @@ public class DialogBasketLU_Page1_ViewModel extends DialogBasketLU_BaseViewModel
|
|||||||
|
|
||||||
private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer;
|
private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer;
|
||||||
|
|
||||||
|
private final Handler handler;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public DialogBasketLU_Page1_ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) {
|
public DialogBasketLU_Page1_ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, Handler handler) {
|
||||||
this.colliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
this.colliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
|
||||||
|
this.handler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -53,16 +57,19 @@ public class DialogBasketLU_Page1_ViewModel extends DialogBasketLU_BaseViewModel
|
|||||||
@Override
|
@Override
|
||||||
public void onShow() {
|
public void onShow() {
|
||||||
this.mBinding.getRoot().requestLayout();
|
this.mBinding.getRoot().requestLayout();
|
||||||
|
|
||||||
mBinding.constraintLayout.setMaxHeight((int) (mContext.getResources().getDisplayMetrics().heightPixels * 0.75));
|
mBinding.constraintLayout.setMaxHeight((int) (mContext.getResources().getDisplayMetrics().heightPixels * 0.75));
|
||||||
|
|
||||||
colliMagazzinoRESTConsumer.retrieveBasketColli(mtbColts -> {
|
colliMagazzinoRESTConsumer.retrieveBasketColli(mtbColts -> {
|
||||||
availableMtbColts = mtbColts;
|
handler.post(() -> {
|
||||||
if(mtbColts != null && !mtbColts.isEmpty()) initRecyclerView(availableMtbColts);
|
availableMtbColts = mtbColts;
|
||||||
|
if(mtbColts != null && !mtbColts.isEmpty()) initRecyclerView(availableMtbColts);
|
||||||
|
|
||||||
mBinding.emptyView.setVisibility(mtbColts != null && !mtbColts.isEmpty() ? View.GONE : View.VISIBLE);
|
mBinding.emptyView.setVisibility(mtbColts != null && !mtbColts.isEmpty() ? View.GONE : View.VISIBLE);
|
||||||
|
});
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
mBinding.emptyView.setVisibility(View.VISIBLE);
|
handler.post(() -> {
|
||||||
|
mBinding.emptyView.setVisibility(View.VISIBLE);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class DialogChooseArtFromListaArtsView extends BaseDialogFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
dismiss();
|
//dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dismiss(MtbAart item) {
|
public void dismiss(MtbAart item) {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public class DialogInputQuantityV2DTO {
|
|||||||
private boolean isNotesAllowed = false;
|
private boolean isNotesAllowed = false;
|
||||||
private boolean isNotesMandatory = false;
|
private boolean isNotesMandatory = false;
|
||||||
private boolean isNumCnfEditable = true;
|
private boolean isNumCnfEditable = true;
|
||||||
|
private boolean isQtaTotEditable = true;
|
||||||
private boolean isFocusOnStart = true;
|
private boolean isFocusOnStart = true;
|
||||||
private boolean canLUBeClosed;
|
private boolean canLUBeClosed;
|
||||||
private boolean saveOnImeDone = false;
|
private boolean saveOnImeDone = false;
|
||||||
@@ -323,6 +324,15 @@ public class DialogInputQuantityV2DTO {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isQtaTotEditable() {
|
||||||
|
return isQtaTotEditable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogInputQuantityV2DTO setQtaTotEditable(boolean qtaTotEditable) {
|
||||||
|
this.isQtaTotEditable = qtaTotEditable;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> getSuggestPartitaMag() {
|
public RunnableArgsWithReturn<DialogInputQuantityV2ViewModel, String> getSuggestPartitaMag() {
|
||||||
return suggestPartitaMag;
|
return suggestPartitaMag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,9 +255,9 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||||
this.onLoadingStarted();
|
handler.post(() -> {
|
||||||
|
this.onLoadingStarted();
|
||||||
|
|
||||||
executorService.execute(() -> {
|
|
||||||
try {
|
try {
|
||||||
this.mViewModel.processBarcodeDTO(data);
|
this.mViewModel.processBarcodeDTO(data);
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
@@ -397,7 +397,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
toggleTextInputLayoutError(textColorsNumCnf, this.mBindings.inputNumCnfLayout, value);
|
toggleTextInputLayoutError(textColorsNumCnf, this.mBindings.inputNumCnfLayout, value);
|
||||||
|
|
||||||
if (this.mViewModel.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
|
if (this.mViewModel.mtbAart.get().isFlagQtaCnfFissaBoolean()) {
|
||||||
this.enabledQtaTot.set(!value);
|
this.enabledQtaTot.set(this.mDialogInputQuantityV2DTO.isQtaTotEditable() && !value);
|
||||||
} else {
|
} else {
|
||||||
if (value) {
|
if (value) {
|
||||||
if (this.mViewModel.blockedQtaCnf.get()) {
|
if (this.mViewModel.blockedQtaCnf.get()) {
|
||||||
@@ -407,7 +407,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.enabledQtaTot.get()) {
|
if (!this.enabledQtaTot.get()) {
|
||||||
this.enabledQtaTot.set(true);
|
this.enabledQtaTot.set(this.mDialogInputQuantityV2DTO.isQtaTotEditable());
|
||||||
} else if (!this.enabledQtaCnf.get()) {
|
} else if (!this.enabledQtaCnf.get()) {
|
||||||
this.enabledQtaCnf.set(true);
|
this.enabledQtaCnf.set(true);
|
||||||
}
|
}
|
||||||
@@ -426,7 +426,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this.enabledQtaTot.get()) {
|
if (!this.enabledQtaTot.get()) {
|
||||||
this.enabledQtaTot.set(true);
|
this.enabledQtaTot.set(this.mDialogInputQuantityV2DTO.isQtaTotEditable());
|
||||||
} else if (!this.enabledNumCnf.get()) {
|
} else if (!this.enabledNumCnf.get()) {
|
||||||
this.enabledNumCnf.set(this.mDialogInputQuantityV2DTO.isNumCnfEditable());
|
this.enabledNumCnf.set(this.mDialogInputQuantityV2DTO.isNumCnfEditable());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ public class DialogScanOrCreateLUViewModel {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
var createUdcRequest = new CreateUDCRequestDTO()
|
var createUdcRequest = new CreateUDCRequestDTO()
|
||||||
.setBarcodeUl(barcodeScanDTO.getStringValue())
|
.setBarcodeUl(ean128Model.Sscc)
|
||||||
.setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
.setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
||||||
|
|
||||||
this.mColliLavorazioneRESTConsumer.createUDC(createUdcRequest, createdMtbColt -> {
|
this.mColliLavorazioneRESTConsumer.createUDC(createUdcRequest, createdMtbColt -> {
|
||||||
|
|||||||
@@ -2,14 +2,23 @@ package it.integry.integrywmsnative.view.dialogs.tracciamento_imballi;
|
|||||||
|
|
||||||
import androidx.databinding.ObservableBoolean;
|
import androidx.databinding.ObservableBoolean;
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class TracciamentoImballoDTO {
|
public class TracciamentoImballoDTO {
|
||||||
|
|
||||||
|
@SerializedName("codTcol")
|
||||||
private final ObservableField<String> codTcol = new ObservableField<>();
|
private final ObservableField<String> codTcol = new ObservableField<>();
|
||||||
|
|
||||||
|
@SerializedName("descrizione")
|
||||||
private final ObservableField<String> descrizione = new ObservableField<>();
|
private final ObservableField<String> descrizione = new ObservableField<>();
|
||||||
|
|
||||||
|
@SerializedName("codMart")
|
||||||
private final ObservableField<String> codMart = new ObservableField<>();
|
private final ObservableField<String> codMart = new ObservableField<>();
|
||||||
|
|
||||||
|
@SerializedName("qta")
|
||||||
private final ObservableField<Integer> qta = new ObservableField<>();
|
private final ObservableField<Integer> qta = new ObservableField<>();
|
||||||
|
|
||||||
|
@SerializedName("editable")
|
||||||
private final ObservableBoolean editable = new ObservableBoolean(true);
|
private final ObservableBoolean editable = new ObservableBoolean(true);
|
||||||
|
|
||||||
public ObservableField<String> getCodTcol() {
|
public ObservableField<String> getCodTcol() {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '2.1.0'
|
kotlin_version = '2.1.0'
|
||||||
agp_version = '8.8.0'
|
agp_version = '8.10.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -14,18 +14,11 @@
|
|||||||
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
# android.enableSeparateAnnotationProcessing = true
|
|
||||||
|
|
||||||
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
||||||
# org.gradle.parallel=true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Enable Gradle Daemon
|
# Enable Gradle Daemon
|
||||||
org.gradle.daemon=true
|
org.gradle.daemon=false
|
||||||
# Enable Configure on demand
|
# Enable Configure on demand
|
||||||
org.gradle.configureondemand=true
|
org.gradle.configureondemand=true
|
||||||
# Enable parallel builds
|
# Enable parallel builds
|
||||||
@@ -33,5 +26,5 @@ org.gradle.parallel=true
|
|||||||
# Enable simple gradle caching
|
# Enable simple gradle caching
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
# Increase memory allotted to JVM
|
# Increase memory allotted to JVM
|
||||||
org.gradle.jvmargs=-Xmx4096m -XX:+UseParallelGC
|
org.gradle.jvmargs=-Xmx2048m -XX:+UseParallelGC -XX:MaxMetaspaceSize=512m
|
||||||
org.gradle.unsafe.configuration-cache=true
|
org.gradle.unsafe.configuration-cache=ON
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
7
gradle/wrapper/gradle-wrapper.properties
vendored
7
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
|||||||
#Mon Feb 13 15:14:43 CET 2023
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
320
gradlew
vendored
320
gradlew
vendored
@@ -1,74 +1,130 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
#
|
||||||
## Gradle start up script for UN*X
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
##
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Attempt to set APP_HOME
|
||||||
DEFAULT_JVM_OPTS=""
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
# Resolve links: $0 may be a link
|
||||||
APP_BASE_NAME=`basename "$0"`
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD=maximum
|
||||||
|
|
||||||
warn ( ) {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
die ( ) {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
case "`uname`" in
|
nonstop=false
|
||||||
CYGWIN* )
|
case "$( uname )" in #(
|
||||||
cygwin=true
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
;;
|
Darwin* ) darwin=true ;; #(
|
||||||
Darwin* )
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
darwin=true
|
NONSTOP* ) nonstop=true ;;
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
PRG="$0"
|
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
|
||||||
ls=`ls -ld "$PRG"`
|
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
|
||||||
PRG="$link"
|
|
||||||
else
|
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
else
|
else
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
@@ -77,84 +133,120 @@ Please set the JAVA_HOME variable in your environment to match the
|
|||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD="java"
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
case $MAX_FD in #(
|
||||||
if [ $? -eq 0 ] ; then
|
max*)
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
MAX_FD="$MAX_FD_LIMIT"
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
ulimit -n $MAX_FD
|
warn "Could not query maximum file descriptor limit"
|
||||||
if [ $? -ne 0 ] ; then
|
esac
|
||||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
case $MAX_FD in #(
|
||||||
fi
|
'' | soft) :;; #(
|
||||||
else
|
*)
|
||||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
fi
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
# For Darwin, add options to specify how the application appears in the dock
|
|
||||||
if $darwin; then
|
|
||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
|
||||||
if $cygwin ; then
|
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
||||||
SEP=""
|
|
||||||
for dir in $ROOTDIRSRAW ; do
|
|
||||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
||||||
SEP="|"
|
|
||||||
done
|
|
||||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
||||||
# Add a user-defined pattern to the cygpath arguments
|
|
||||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
||||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
||||||
fi
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
i=0
|
|
||||||
for arg in "$@" ; do
|
|
||||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
||||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
||||||
|
|
||||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
||||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
||||||
else
|
|
||||||
eval `echo args$i`="\"$arg\""
|
|
||||||
fi
|
|
||||||
i=$((i+1))
|
|
||||||
done
|
|
||||||
case $i in
|
|
||||||
(0) set -- ;;
|
|
||||||
(1) set -- "$args0" ;;
|
|
||||||
(2) set -- "$args0" "$args1" ;;
|
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
function splitJvmOpts() {
|
# * args from the command line
|
||||||
JVM_OPTS=("$@")
|
# * the main class name
|
||||||
}
|
# * -classpath
|
||||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
# * -D...appname settings
|
||||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
|
|||||||
88
gradlew.bat
vendored
88
gradlew.bat
vendored
@@ -1,4 +1,22 @@
|
|||||||
@if "%DEBUG%" == "" @echo off
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@@ -8,26 +26,30 @@
|
|||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS=
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -35,54 +57,36 @@ goto fail
|
|||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
|
||||||
@rem Get command-line arguments, handling Windowz variants
|
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
|
||||||
|
|
||||||
:win9xME_args
|
|
||||||
@rem Slurp the command line arguments.
|
|
||||||
set CMD_LINE_ARGS=
|
|
||||||
set _SKIP=2
|
|
||||||
|
|
||||||
:win9xME_args_slurp
|
|
||||||
if "x%~1" == "x" goto execute
|
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
|
||||||
goto execute
|
|
||||||
|
|
||||||
:4NT_args
|
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
|
||||||
set CMD_LINE_ARGS=%$
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|||||||
Reference in New Issue
Block a user