Merge branch 'develop' into Refactoring_Spedizione__MoreRefact
# Conflicts: # app/build.gradle # app/src/main/java/it/integry/integrywmsnative/gest/main/MainFragment.java
This commit is contained in:
commit
498d213a07
@ -175,7 +175,8 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
cyclicRecover(sessionsIterator, onComplete, onFailed);
|
cyclicRecover(sessionsIterator, onComplete, onFailed);
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
tmpOnFailed.run(ex, recoveredMtbColtID);
|
tmpOnFailed.run(ex, recoveredMtbColtID);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
tmpOnFailed.run(ex, recoveredMtbColtID);
|
tmpOnFailed.run(ex, recoveredMtbColtID);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -31,77 +31,149 @@ public class ProdRecuperoMaterialeHelper {
|
|||||||
|
|
||||||
public void loadLastULVersate(RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void loadLastULVersate(RunnableArgs<List<HistoryVersamentoProdULDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
String sql = "SELECT jtb_fasi.cod_jfas, " +
|
String sql = "WITH ul_list AS ( " +
|
||||||
" jtb_fasi.descrizione AS descrizione_fase, " +
|
" SELECT jtb_fasi.cod_jfas, " +
|
||||||
" mtb_colr.gestione, " +
|
" jtb_fasi.descrizione AS descrizione_fase, " +
|
||||||
" mtb_colr.data_collo, " +
|
" mtb_colr.gestione, " +
|
||||||
" mtb_colr.num_collo, " +
|
" mtb_colr.data_collo, " +
|
||||||
" mtb_colr.ser_collo, " +
|
" mtb_colr.num_collo, " +
|
||||||
" mtb_colr.cod_mart, " +
|
" mtb_colr.ser_collo, " +
|
||||||
" mtb_colr.cod_col, " +
|
" mtb_colr.cod_mart, " +
|
||||||
" mtb_colr.cod_tagl, " +
|
" mtb_colr.cod_col, " +
|
||||||
" SUM(mtb_colr.qta_col) AS qta_col, " +
|
" mtb_colr.cod_tagl, " +
|
||||||
" SUM(mtb_colr.num_cnf) AS num_cnf, " +
|
" SUM(mtb_colr.qta_col) AS qta_col, " +
|
||||||
" mtb_colr.ser_collo, " +
|
" SUM(mtb_colr.num_cnf) AS num_cnf, " +
|
||||||
" mtb_colr.partita_mag, " +
|
" mtb_colr.partita_mag, " +
|
||||||
" mtb_colr.cod_jcom, " +
|
" mtb_colr.cod_jcom, " +
|
||||||
" mtb_colr.num_collo_rif, " +
|
" mtb_colr.num_collo_rif, " +
|
||||||
" mtb_colr.data_collo_rif, " +
|
" mtb_colr.data_collo_rif, " +
|
||||||
" mtb_colr.ser_collo_rif, " +
|
" mtb_colr.ser_collo_rif, " +
|
||||||
" mtb_colr.gestione_rif, " +
|
" mtb_colr.gestione_rif, " +
|
||||||
" mtb_colt.segno, " +
|
" mtb_colt.segno, " +
|
||||||
" ISNULL(mtb_aart.descrizione_estesa, mtb_aart.descrizione) AS descrizione_art, " +
|
" ISNULL(mtb_aart.descrizione_estesa, mtb_aart.descrizione) AS descrizione_art, " +
|
||||||
" mtb_aart.unt_mis, " +
|
" mtb_aart.unt_mis, " +
|
||||||
" MAX(datetime_row) AS datetime_row, " +
|
" MAX(datetime_row) AS datetime_row, " +
|
||||||
" dtb_ord_steps.num_ord, " +
|
" dtb_ord_steps.num_ord, " +
|
||||||
" dtb_ord_steps.data_ord, " +
|
" dtb_ord_steps.data_ord, " +
|
||||||
" dtb_ord_steps.gestione as gestione_ord, " +
|
" dtb_ord_steps.gestione as gestione_ord, " +
|
||||||
" dtb_ord_steps.hr_num as hr, " +
|
" dtb_ord_steps.hr_num as hr, " +
|
||||||
" mtb_colr.riga_ord, " +
|
" mtb_colr.riga_ord, " +
|
||||||
" CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo)) * 100, 0)) as percentage_hr " +
|
" CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / " +
|
||||||
"FROM mtb_colr " +
|
" SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " +
|
||||||
"INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
" 0)) as percentage_hr " +
|
||||||
"AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
" FROM mtb_colr " +
|
||||||
"AND mtb_colr.ser_collo = mtb_colt.ser_collo " +
|
" INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
||||||
"AND mtb_colr.gestione = mtb_colt.gestione " +
|
" AND mtb_colr.data_collo = mtb_colt.data_collo " +
|
||||||
|
" AND mtb_colr.ser_collo = mtb_colt.ser_collo " +
|
||||||
|
" AND mtb_colr.gestione = mtb_colt.gestione " +
|
||||||
|
" INNER JOIN dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " +
|
||||||
|
" AND dtb_ord_steps.gestione = mtb_colr.gestione " +
|
||||||
|
" AND dtb_ord_steps.num_ord = mtb_colr.num_ord " +
|
||||||
|
" AND dtb_ord_steps.data_iniz is not null " +
|
||||||
|
" AND dtb_ord_steps.data_fine is null " +
|
||||||
|
" INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
||||||
|
" LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
||||||
|
" WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
||||||
|
" AND segno = -1 " +
|
||||||
|
" AND mtb_colr.data_collo > DATEADD(DAY, -5, GETDATE()) " +
|
||||||
|
" GROUP BY jtb_fasi.cod_jfas, " +
|
||||||
|
" jtb_fasi.descrizione, " +
|
||||||
|
" mtb_colr.gestione, " +
|
||||||
|
" mtb_colr.data_collo, " +
|
||||||
|
" mtb_colr.num_collo, " +
|
||||||
|
" mtb_colr.ser_collo, " +
|
||||||
|
" mtb_colr.cod_mart, " +
|
||||||
|
" mtb_colr.cod_col, " +
|
||||||
|
" mtb_colr.cod_tagl, " +
|
||||||
|
" mtb_colr.ser_collo, " +
|
||||||
|
" mtb_colr.partita_mag, " +
|
||||||
|
" mtb_colr.cod_jcom, " +
|
||||||
|
" mtb_aart.descrizione_estesa, " +
|
||||||
|
" mtb_aart.descrizione, " +
|
||||||
|
" mtb_aart.unt_mis, " +
|
||||||
|
" mtb_colr.num_collo_rif, " +
|
||||||
|
" mtb_colr.data_collo_rif, " +
|
||||||
|
" mtb_colr.ser_collo_rif, " +
|
||||||
|
" mtb_colr.gestione_rif, " +
|
||||||
|
" mtb_colt.segno, " +
|
||||||
|
" dtb_ord_steps.num_ord, " +
|
||||||
|
" dtb_ord_steps.data_ord, " +
|
||||||
|
" dtb_ord_steps.gestione, " +
|
||||||
|
" mtb_colr.riga_ord, " +
|
||||||
|
" dtb_ord_steps.hr_num " +
|
||||||
|
" HAVING SUM(mtb_colr.qta_col) > 0 " +
|
||||||
|
"), max_ul AS ( " +
|
||||||
|
" SELECT " +
|
||||||
|
" cod_jfas, " +
|
||||||
|
" descrizione_fase, " +
|
||||||
|
" gestione, " +
|
||||||
|
" cod_mart, " +
|
||||||
|
" cod_col, " +
|
||||||
|
" cod_tagl, " +
|
||||||
|
" ser_collo, " +
|
||||||
|
" partita_mag, " +
|
||||||
|
" cod_jcom, " +
|
||||||
|
" descrizione_art, " +
|
||||||
|
" unt_mis, " +
|
||||||
|
" num_collo_rif, " +
|
||||||
|
" data_collo_rif, " +
|
||||||
|
" ser_collo_rif, " +
|
||||||
|
" gestione_rif, " +
|
||||||
|
" segno, " +
|
||||||
|
" num_ord, " +
|
||||||
|
" data_ord, " +
|
||||||
|
" gestione_ord, " +
|
||||||
|
" riga_ord, " +
|
||||||
|
" hr, " +
|
||||||
|
" MAX (datetime_row) as max_datetime_row " +
|
||||||
|
" FROM ul_list " +
|
||||||
|
" GROUP BY cod_jfas, " +
|
||||||
|
" descrizione_fase, " +
|
||||||
|
" gestione, " +
|
||||||
|
" cod_mart, " +
|
||||||
|
" cod_col, " +
|
||||||
|
" cod_tagl, " +
|
||||||
|
" ser_collo, " +
|
||||||
|
" partita_mag, " +
|
||||||
|
" cod_jcom, " +
|
||||||
|
" descrizione_art, " +
|
||||||
|
" unt_mis, " +
|
||||||
|
" num_collo_rif, " +
|
||||||
|
" data_collo_rif, " +
|
||||||
|
" ser_collo_rif, " +
|
||||||
|
" gestione_rif, " +
|
||||||
|
" segno, " +
|
||||||
|
" num_ord, " +
|
||||||
|
" data_ord, " +
|
||||||
|
" gestione_ord, " +
|
||||||
|
" riga_ord, " +
|
||||||
|
" hr " +
|
||||||
|
") " +
|
||||||
" " +
|
" " +
|
||||||
"INNER JOIN dtb_ord_steps ON dtb_ord_steps.data_ord = mtb_colr.data_ord " +
|
"SELECT qta_col, num_cnf, * FROM max_ul " +
|
||||||
" AND dtb_ord_steps.gestione = mtb_colr.gestione " +
|
"LEFT OUTER JOIN ul_list ON " +
|
||||||
" AND dtb_ord_steps.num_ord = mtb_colr.num_ord " +
|
" ISNULL(max_ul.cod_jfas, '') = ISNULL(ul_list.cod_jfas, '') AND " +
|
||||||
" AND dtb_ord_steps.data_iniz is not null " +
|
" ISNULL(max_ul.descrizione_fase, '') = ISNULL(ul_list.descrizione_fase, '') AND " +
|
||||||
" AND dtb_ord_steps.data_fine is null " +
|
" ISNULL(max_ul.gestione, '') = ISNULL(ul_list.gestione, '') AND " +
|
||||||
"INNER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
" ISNULL(max_ul.cod_mart, '') = ISNULL(ul_list.cod_mart, '') AND " +
|
||||||
"LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
" ISNULL(max_ul.cod_col, '') = ISNULL(ul_list.cod_col, '') AND " +
|
||||||
"WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
" ISNULL(max_ul.cod_tagl, '') = ISNULL(ul_list.cod_tagl, '') AND " +
|
||||||
" AND segno = -1 " +
|
" ISNULL(max_ul.ser_collo, '') = ISNULL(ul_list.ser_collo, '') AND " +
|
||||||
" AND mtb_colr.data_collo > DATEADD(DAY, -5, GETDATE()) " +
|
" ISNULL(max_ul.partita_mag, '') = ISNULL(ul_list.partita_mag, '') AND " +
|
||||||
"GROUP BY jtb_fasi.cod_jfas, " +
|
" ISNULL(max_ul.cod_jcom, '') = ISNULL(ul_list.cod_jcom, '') AND " +
|
||||||
" jtb_fasi.descrizione, " +
|
" ISNULL(max_ul.descrizione_art, '') = ISNULL(ul_list.descrizione_art, '') AND " +
|
||||||
" mtb_colr.gestione, " +
|
" ISNULL(max_ul.unt_mis, '') = ISNULL(ul_list.unt_mis, '') AND " +
|
||||||
" mtb_colr.data_collo, " +
|
" ISNULL(max_ul.num_collo_rif, '') = ISNULL(ul_list.num_collo_rif, '') AND " +
|
||||||
" mtb_colr.num_collo, " +
|
" ISNULL(max_ul.data_collo_rif, '') = ISNULL(ul_list.data_collo_rif, '') AND " +
|
||||||
" mtb_colr.ser_collo, " +
|
" ISNULL(max_ul.ser_collo_rif, '') = ISNULL(ul_list.ser_collo_rif, '') AND " +
|
||||||
" mtb_colr.cod_mart, " +
|
" ISNULL(max_ul.gestione_rif, '') = ISNULL(ul_list.gestione_rif, '') AND " +
|
||||||
" mtb_colr.cod_col, " +
|
" ISNULL(max_ul.segno, '') = ISNULL(ul_list.segno, '') AND " +
|
||||||
" mtb_colr.cod_tagl, " +
|
" ISNULL(max_ul.num_ord, '') = ISNULL(ul_list.num_ord, '') AND " +
|
||||||
" mtb_colr.ser_collo, " +
|
" ISNULL(max_ul.data_ord, '') = ISNULL(ul_list.data_ord, '') AND " +
|
||||||
" mtb_colr.partita_mag, " +
|
" ISNULL(max_ul.gestione_ord, '') = ISNULL(ul_list.gestione_ord, '') AND " +
|
||||||
" mtb_colr.cod_jcom, " +
|
" ISNULL(max_ul.riga_ord, '') = ISNULL(ul_list.riga_ord, '') AND " +
|
||||||
" mtb_aart.descrizione_estesa, " +
|
" ISNULL(max_ul.hr, '') = ISNULL(ul_list.hr, '') AND " +
|
||||||
" mtb_aart.descrizione, " +
|
" max_ul.max_datetime_row = ul_list.datetime_row";
|
||||||
" mtb_aart.unt_mis, " +
|
|
||||||
" mtb_colr.num_collo_rif, " +
|
|
||||||
" mtb_colr.data_collo_rif, " +
|
|
||||||
" mtb_colr.ser_collo_rif, " +
|
|
||||||
" mtb_colr.gestione_rif, " +
|
|
||||||
" mtb_colt.segno, " +
|
|
||||||
" dtb_ord_steps.num_ord, " +
|
|
||||||
" dtb_ord_steps.data_ord, " +
|
|
||||||
" dtb_ord_steps.gestione, " +
|
|
||||||
" mtb_colr.riga_ord, " +
|
|
||||||
" dtb_ord_steps.hr_num " +
|
|
||||||
"HAVING SUM(mtb_colr.qta_col) > 0 " +
|
|
||||||
"ORDER BY data_collo DESC";
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {}.getType();
|
Type typeOfObjectsList = new TypeToken<ArrayList<HistoryVersamentoProdULRestDTO>>() {}.getType();
|
||||||
SystemRESTConsumer.processSqlStatic(sql, typeOfObjectsList, new ISimpleOperationCallback<List<HistoryVersamentoProdULRestDTO>>() {
|
SystemRESTConsumer.processSqlStatic(sql, typeOfObjectsList, new ISimpleOperationCallback<List<HistoryVersamentoProdULRestDTO>>() {
|
||||||
|
|||||||
@ -45,6 +45,7 @@ public class HoneyWellBarcodeReader implements BarcodeReaderInterface {
|
|||||||
List<String> compatibleModels = new ArrayList<String>();
|
List<String> compatibleModels = new ArrayList<String>();
|
||||||
compatibleModels.add("EDA50");
|
compatibleModels.add("EDA50");
|
||||||
compatibleModels.add("EDA51");
|
compatibleModels.add("EDA51");
|
||||||
|
compatibleModels.add("CT60");
|
||||||
|
|
||||||
if(compatibleModels.contains(model)) {
|
if(compatibleModels.contains(model)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user