Aggiunto cod_anag sul collo di Lavorazione e sistemata ri-stampa UDC.

This commit is contained in:
Giuseppe Scorrano 2019-07-23 12:19:25 +02:00
parent 7a44054f9e
commit 59ed15ba55
4 changed files with 83 additions and 54 deletions

View File

@ -50,14 +50,41 @@ public class OrdineAccettazioneInevasoRESTConsumerService {
String sql = "SELECT DISTINCT mtb_colt.* " +
"FROM mtb_colt, mtb_colr " +
"WHERE mtb_colt.gestione = mtb_colr.gestione 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 AND " +
"mtb_colt.gestione + ' ' + CONVERT(VARCHAR(15), mtb_colr.data_ord, 111) + ' ' + CONVERT(VARCHAR, mtb_colr.num_ord) IN (" + colliINCondition +
") AND mtb_colt.data_doc IS NULL ";
String sql = "SELECT " +
"mtb_colt_lavorazione.gestione, " +
"mtb_colt_lavorazione.data_collo, " +
"mtb_colt_lavorazione.num_collo, " +
"mtb_colt_lavorazione.ser_collo, " +
"mtb_colt_lavorazione.posizione, " +
"mtb_colt_lavorazione.preparato_da, " +
"mtb_colt_lavorazione.cod_anag, " +
"mtb_colt_lavorazione.cod_mdep " +
"FROM mtb_colr mtb_colr_lavorazione " +
"INNER JOIN mtb_colt mtb_colt_lavorazione " +
"ON mtb_colt_lavorazione.gestione = mtb_colr_lavorazione.gestione " +
" AND mtb_colt_lavorazione.ser_collo = mtb_colr_lavorazione.ser_collo " +
" AND mtb_colt_lavorazione.data_collo = mtb_colr_lavorazione.data_collo " +
" AND mtb_colt_lavorazione.num_collo = mtb_colr_lavorazione.num_collo " +
"RIGHT OUTER JOIN mtb_colr mtb_colr_accettazione " +
"ON mtb_colr_lavorazione.gestione_rif = mtb_colr_accettazione.gestione " +
" AND mtb_colr_lavorazione.ser_collo_rif = mtb_colr_accettazione.ser_collo " +
" AND mtb_colr_lavorazione.data_collo_rif = mtb_colr_accettazione.data_collo " +
" AND mtb_colr_lavorazione.num_collo_rif = mtb_colr_accettazione.num_collo " +
" AND mtb_colr_lavorazione.riga = mtb_colr_accettazione.riga " +
"WHERE " +
"mtb_colr_lavorazione.gestione = 'L' " +
"AND mtb_colr_accettazione.gestione = 'A' " +
"AND mtb_colt_lavorazione.cod_anag IS NOT NULL " +
"AND mtb_colr_accettazione.gestione + ' ' + CONVERT(VARCHAR(15), mtb_colr_accettazione.data_ord, 111) + ' ' + CONVERT(VARCHAR, mtb_colr_accettazione.num_ord) IN (" + colliINCondition +
") GROUP BY " +
"mtb_colt_lavorazione.gestione, " +
"mtb_colt_lavorazione.data_collo, " +
"mtb_colt_lavorazione.num_collo, " +
"mtb_colt_lavorazione.ser_collo, " +
"mtb_colt_lavorazione.posizione, " +
"mtb_colt_lavorazione.preparato_da, " +
"mtb_colt_lavorazione.cod_anag, " +
"mtb_colt_lavorazione.cod_mdep";
Type typeOfObjectsList = new TypeToken<ArrayList<MtbColt>>() {}.getType();

View File

@ -437,9 +437,9 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
if(defaultPosAccettazioneDTO != null && !UtilityString.isNullOrEmpty(defaultPosAccettazioneDTO.value)) defaultPosAccettazione = defaultPosAccettazioneDTO.value;
MtbColt mtbColtOfBarode = new MtbColt();
mtbColtOfBarode.initDefaultFields();
mtbColtOfBarode
MtbColt mtbColtOfBarcode = new MtbColt();
mtbColtOfBarcode.initDefaultFields();
mtbColtOfBarcode
.setGestione(GestioneEnum.LAVORAZIONE)
.setAnnotazioni(noteString)
.setPosizione(defaultPosAccettazione)
@ -448,11 +448,11 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
if(customNumCollo != null) {
mtbColtOfBarode.setNumCollo(customNumCollo);
mtbColtOfBarcode.setNumCollo(customNumCollo);
}
if(!UtilityString.isNullOrEmpty(customSerCollo)) {
mtbColtOfBarode.setSerCollo(customSerCollo);
mtbColtOfBarcode.setSerCollo(customSerCollo);
}
@ -461,7 +461,7 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
MtbColt mtbColtAccettazione = null;
if(defaultGestioneOfUL == GestioneEnum.ACQUISTO){
mtbColtAccettazione = (MtbColt) mtbColtOfBarode.clone();
mtbColtAccettazione = (MtbColt) mtbColtOfBarcode.clone();
mtbColtAccettazione.setGestione(GestioneEnum.ACQUISTO);
mtbColtAccettazione
@ -470,7 +470,7 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
}
MtbColt mtbColtToAddRefs = mtbColtAccettazione != null ? mtbColtAccettazione : mtbColtOfBarode;
MtbColt mtbColtToAddRefs = mtbColtAccettazione != null ? mtbColtAccettazione : mtbColtOfBarcode;
List<String> codAnags =
@ -481,6 +481,7 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
if(codAnags != null && codAnags.size() == 1){
mtbColtToAddRefs.setCodAnag(codAnags.get(0));
mtbColtOfBarcode.setCodAnag(codAnags.get(0));
}
List<String> rifOrds =
@ -513,7 +514,7 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
Runnable saveColloOfBarcode = () -> ColliMagazzinoRESTConsumer.saveCollo(mtbColtOfBarode, new ISimpleOperationCallback<MtbColt>() {
Runnable saveColloOfBarcode = () -> ColliMagazzinoRESTConsumer.saveCollo(mtbColtOfBarcode, new ISimpleOperationCallback<MtbColt>() {
@Override
public void onSuccess(MtbColt value) {
@ -666,7 +667,7 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
private void printCollo(ProgressDialog progress, Runnable onComplete) {
MtbColt currentMtbColt = mArticoliInColloBottomSheetViewModel.mtbColt.get();
if(currentMtbColt.getDisablePrint() != null && currentMtbColt.getDisablePrint()){
if(currentMtbColt.getDisablePrint()){
postCloseOperations(onComplete);
progress.dismiss();
return;

View File

@ -273,7 +273,8 @@ public class VersamentoMerceViewModel {
//Se le gestioni sono uguali faccio uno storno sulla sorgente e non lavoro con
//i riferimenti
if(sourceMtbColt.getGestioneEnum() == destMtbColt.getGestioneEnum()){
if(sourceMtbColt.getGestioneEnum() == destMtbColt.getGestioneEnum() &&
(sourceMtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || sourceMtbColt.getGestioneEnum() == GestioneEnum.VENDITA)){
destroyMtbColrReferences = true;
MtbColr stornoSourceMtbColr = (MtbColr) destNewMtbColr.get(i).clone();

View File

@ -109,49 +109,49 @@
</RelativeLayout>
<!--<androidx.constraintlayout.widget.ConstraintLayout-->
<!--android:id="@+id/buttons"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginTop="8dp">-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp">
<!--<androidx.constraintlayout.widget.Guideline-->
<!--android:id="@+id/center_guideline"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical"-->
<!--app:layout_constraintGuide_percent="0.5"/>-->
<androidx.constraintlayout.widget.Guideline
android:id="@+id/center_guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5"/>
<!--<com.google.android.material.button.MaterialButton-->
<!--android:id="@+id/negative_button"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--style="@style/Button.PrimaryOutline"-->
<!--android:layout_marginLeft="8dp"-->
<!--android:layout_marginRight="8dp"-->
<!--app:layout_constrainedHeight="true"-->
<!--app:layout_constraintTop_toTopOf="parent"-->
<!--app:layout_constraintStart_toStartOf="parent"-->
<!--app:layout_constraintEnd_toStartOf="@id/center_guideline"-->
<!--android:text="@string/abort"/>-->
<com.google.android.material.button.MaterialButton
android:id="@+id/negative_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="@style/Button.PrimaryOutline"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
app:layout_constrainedHeight="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/center_guideline"
android:text="@string/abort"/>
<!--<com.google.android.material.button.MaterialButton-->
<!--android:id="@+id/positive_button"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="wrap_content"-->
<!--style="@style/Button.PrimaryFull"-->
<!--android:layout_marginLeft="8dp"-->
<!--android:layout_marginRight="8dp"-->
<!--app:layout_constrainedHeight="true"-->
<!--app:layout_constraintTop_toTopOf="parent"-->
<!--app:layout_constraintStart_toStartOf="@id/center_guideline"-->
<!--app:layout_constraintEnd_toEndOf="parent"-->
<!--android:text="@string/confirm"/>-->
<com.google.android.material.button.MaterialButton
android:id="@+id/positive_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="@style/Button.PrimaryFull"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
app:layout_constrainedHeight="true"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="@id/center_guideline"
app:layout_constraintEnd_toEndOf="parent"
android:text="@string/confirm"/>
<!--</androidx.constraintlayout.widget.ConstraintLayout>-->
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>