OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Rev 182 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 174
Line 67... Line 67...
67
            map(getSource().getField("ID_ADRESSE"), getDestination().getField("ID_ADRESSE"));
67
            map(getSource().getField("ID_ADRESSE"), getDestination().getField("ID_ADRESSE"));
68
        }
68
        }
69
        if (getSource().getTable().contains("ID_ADRESSE_LIVRAISON")) {
69
        if (getSource().getTable().contains("ID_ADRESSE_LIVRAISON")) {
70
            map(getSource().getField("ID_ADRESSE_LIVRAISON"), getDestination().getField("ID_ADRESSE_LIVRAISON"));
70
            map(getSource().getField("ID_ADRESSE_LIVRAISON"), getDestination().getField("ID_ADRESSE_LIVRAISON"));
71
        }
71
        }
-
 
72
        if (getSource().getTable().contains("ID_CATEGORIE_COMPTABLE") && getDestination().getTable().contains("ID_CATEGORIE_COMPTABLE")) {
-
 
73
            map(getSource().getField("ID_CATEGORIE_COMPTABLE"), getDestination().getField("ID_CATEGORIE_COMPTABLE"));
-
 
74
        }
72
    }
75
    }
73
 
76
 
74
    @Override
77
    @Override
75
    protected void merge(SQLRowAccessor srcRow, SQLRowValues rowVals) {
78
    protected void merge(SQLRowAccessor srcRow, SQLRowValues rowVals) {
76
        super.merge(srcRow, rowVals);
79
        super.merge(srcRow, rowVals);
Line 78... Line 81...
78
        // Merge elements
81
        // Merge elements
79
        final SQLTable tableElementSource = getSource().getTable("COMMANDE_CLIENT_ELEMENT");
82
        final SQLTable tableElementSource = getSource().getTable("COMMANDE_CLIENT_ELEMENT");
80
        final SQLTable tableElementDestination = getSource().getTable("BON_DE_LIVRAISON_ELEMENT");
83
        final SQLTable tableElementDestination = getSource().getTable("BON_DE_LIVRAISON_ELEMENT");
81
        final Collection<? extends SQLRowAccessor> myListItem = srcRow.asRow().getReferentRows(tableElementSource);
84
        final Collection<? extends SQLRowAccessor> myListItem = srcRow.asRow().getReferentRows(tableElementSource);
82
 
85
 
83
        transfertReference(srcRow, rowVals, "NOM", "NOM");
-
 
84
        transfertReference(srcRow, rowVals, "INFOS", "INFOS");
-
 
85
 
-
 
86
        transfertNumberReference(srcRow, rowVals, tableElementDestination, "ID_BON_DE_LIVRAISON");
86
        transfertNumberReference(srcRow, rowVals, tableElementDestination, "ID_BON_DE_LIVRAISON");
-
 
87
        transfertReference(srcRow, rowVals, tableElementDestination, "ID_BON_DE_LIVRAISON", "NOM", "NOM");
-
 
88
        transfertReference(srcRow, rowVals, tableElementDestination, "ID_BON_DE_LIVRAISON", "INFOS", "INFOS");
87
 
89
 
88
        if (myListItem.size() != 0) {
90
        if (myListItem.size() != 0) {
89
            final SQLInjector injector = SQLInjector.getInjector(tableElementSource, tableElementDestination);
91
            final SQLInjector injector = SQLInjector.getInjector(tableElementSource, tableElementDestination);
90
            for (SQLRowAccessor rowElt : myListItem) {
92
            for (SQLRowAccessor rowElt : myListItem) {
91
                final SQLRowValues createRowValuesFrom = injector.createRowValuesFrom(rowElt.asRow());
93
                final SQLRowValues createRowValuesFrom = injector.createRowValuesFrom(rowElt.asRow());