OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 142 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 142 Rev 177
Line 19... Line 19...
19
import org.openconcerto.sql.Configuration;
19
import org.openconcerto.sql.Configuration;
20
import org.openconcerto.sql.model.SQLRow;
20
import org.openconcerto.sql.model.SQLRow;
21
import org.openconcerto.sql.model.SQLSelect;
21
import org.openconcerto.sql.model.SQLSelect;
22
import org.openconcerto.sql.model.SQLTable;
22
import org.openconcerto.sql.model.SQLTable;
23
import org.openconcerto.sql.model.Where;
23
import org.openconcerto.sql.model.Where;
-
 
24
import org.openconcerto.utils.StringUtils;
24
 
25
 
25
import java.text.DateFormat;
26
import java.text.DateFormat;
26
import java.util.Date;
27
import java.util.Date;
27
import java.util.HashMap;
28
import java.util.HashMap;
28
import java.util.List;
29
import java.util.List;
Line 154... Line 155...
154
            // SQLRow rowFiche = tableFichePaye.getRow(idFiche);
155
            // SQLRow rowFiche = tableFichePaye.getRow(idFiche);
155
            SQLRow rowFicheElt = tableFichePayeElement.getRow(idFicheElt);
156
            SQLRow rowFicheElt = tableFichePayeElement.getRow(idFicheElt);
156
 
157
 
157
            mapSal.put(new Integer(idSal), "");
158
            mapSal.put(new Integer(idSal), "");
158
 
159
 
-
 
160
            float montantTestTotal = 0;
-
 
161
            if (rowFicheElt.getObject("MONTANT_SAL_AJ") != null) {
-
 
162
                montantTestTotal += rowFicheElt.getFloat("MONTANT_SAL_AJ");
-
 
163
            }
-
 
164
            if (rowFicheElt.getObject("MONTANT_SAL_DED") != null) {
-
 
165
                montantTestTotal -= rowFicheElt.getFloat("MONTANT_SAL_DED");
-
 
166
            }
-
 
167
 
-
 
168
            if (rowFicheElt.getObject("MONTANT_PAT") != null) {
-
 
169
                montantTestTotal += rowFicheElt.getFloat("MONTANT_PAT");
-
 
170
            }
-
 
171
            if (montantTestTotal != 0) {
-
 
172
 
159
            if (rowFicheElt.getString("SOURCE").equalsIgnoreCase("RUBRIQUE_BRUT")) {
173
                if (rowFicheElt.getString("SOURCE").equalsIgnoreCase("RUBRIQUE_BRUT")) {
160
 
174
 
161
                mapRubriqueBrut.put(new Integer(rowFicheElt.getInt("IDSOURCE")), "");
175
                    mapRubriqueBrut.put(new Integer(rowFicheElt.getInt("IDSOURCE")), "");
162
                mapTotal = mapTotalbrut;
176
                    mapTotal = mapTotalbrut;
163
                if (mapSalarieBrut.get(new Integer(idSal)) == null) {
177
                    if (mapSalarieBrut.get(new Integer(idSal)) == null) {
Line 222... Line 236...
222
                montantTotal += rowFicheElt.getFloat("MONTANT_PAT");
236
                    montantTotal += rowFicheElt.getFloat("MONTANT_PAT");
223
 
237
 
224
                mapValue.put(new Integer(rowFicheElt.getInt("IDSOURCE")) + "_PAT", new Float(montant));
238
                    mapValue.put(new Integer(rowFicheElt.getInt("IDSOURCE")) + "_PAT", new Float(montant));
225
                mapTotal.put(new Integer(rowFicheElt.getInt("IDSOURCE")) + "_PAT", new Float(montantTotal));
239
                    mapTotal.put(new Integer(rowFicheElt.getInt("IDSOURCE")) + "_PAT", new Float(montantTotal));
226
            }
240
                }
227
 
241
            }
228
        }
242
        }
229
 
243
 
230
        // Dump
244
        // Dump
231
        /*
245
        /*
232
         * for (int j = 0; j < mapSalarieBrut.keySet().size(); j++) {
246
         * for (int j = 0; j < mapSalarieBrut.keySet().size(); j++) {
Line 285... Line 299...
285
            for (int i = 0; i < mapRubriqueBrut.keySet().size(); i++) {
299
            for (int i = 0; i < mapRubriqueBrut.keySet().size(); i++) {
286
 
300
 
287
                int idRub = ((Number) mapRubriqueBrut.keySet().toArray()[i]).intValue();
301
                int idRub = ((Number) mapRubriqueBrut.keySet().toArray()[i]).intValue();
288
                SQLRow rowRub = tableRubBrut.getRow(idRub);
302
                SQLRow rowRub = tableRubBrut.getRow(idRub);
289
 
303
 
290
                this.mCell.put("A" + posLine, rowRub.getObject("NOM"));
304
                this.mCell.put("A" + posLine, StringUtils.limitLength(rowRub.getString("NOM"), 55));
291
 
305
 
292
                this.mCell.put("B" + posLine, fillLine(mapSalarieBrut, idRub, mapSal, numFirstSal, mapTotalbrut, false));
306
                this.mCell.put("B" + posLine, fillLine(mapSalarieBrut, idRub, mapSal, numFirstSal, mapTotalbrut, false));
293
                this.mCell.put("C" + posLine, fillLine(mapSalarieBrut, idRub, mapSal, numFirstSal, mapTotalbrut, true));
307
                this.mCell.put("C" + posLine, fillLine(mapSalarieBrut, idRub, mapSal, numFirstSal, mapTotalbrut, true));
294
                this.mCell.put("D" + posLine, fillLine(mapSalarieBrut, idRub, mapSal, numFirstSal + 1, mapTotalbrut, false));
308
                this.mCell.put("D" + posLine, fillLine(mapSalarieBrut, idRub, mapSal, numFirstSal + 1, mapTotalbrut, false));
295
                this.mCell.put("E" + posLine, fillLine(mapSalarieBrut, idRub, mapSal, numFirstSal + 1, mapTotalbrut, true));
309
                this.mCell.put("E" + posLine, fillLine(mapSalarieBrut, idRub, mapSal, numFirstSal + 1, mapTotalbrut, true));
Line 301... Line 315...
301
            for (int i = 0; i < mapRubriqueCot.keySet().size(); i++) {
315
            for (int i = 0; i < mapRubriqueCot.keySet().size(); i++) {
302
 
316
 
303
                int idRub = ((Number) mapRubriqueCot.keySet().toArray()[i]).intValue();
317
                int idRub = ((Number) mapRubriqueCot.keySet().toArray()[i]).intValue();
304
                SQLRow rowRub = tableRubCot.getRow(idRub);
318
                SQLRow rowRub = tableRubCot.getRow(idRub);
305
 
319
 
306
                this.mCell.put("A" + posLine, rowRub.getObject("NOM"));
320
                this.mCell.put("A" + posLine, StringUtils.limitLength(rowRub.getString("NOM"), 55));
307
 
321
 
308
                this.mCell.put("B" + posLine, fillLine(mapSalarieCot, idRub, mapSal, numFirstSal, mapTotalCot, false));
322
                this.mCell.put("B" + posLine, fillLine(mapSalarieCot, idRub, mapSal, numFirstSal, mapTotalCot, false));
309
                this.mCell.put("C" + posLine, fillLine(mapSalarieCot, idRub, mapSal, numFirstSal, mapTotalCot, true));
323
                this.mCell.put("C" + posLine, fillLine(mapSalarieCot, idRub, mapSal, numFirstSal, mapTotalCot, true));
310
                this.mCell.put("D" + posLine, fillLine(mapSalarieCot, idRub, mapSal, numFirstSal + 1, mapTotalCot, false));
324
                this.mCell.put("D" + posLine, fillLine(mapSalarieCot, idRub, mapSal, numFirstSal + 1, mapTotalCot, false));
311
                this.mCell.put("E" + posLine, fillLine(mapSalarieCot, idRub, mapSal, numFirstSal + 1, mapTotalCot, true));
325
                this.mCell.put("E" + posLine, fillLine(mapSalarieCot, idRub, mapSal, numFirstSal + 1, mapTotalCot, true));
Line 318... Line 332...
318
            for (int i = 0; i < mapRubriqueNet.keySet().size(); i++) {
332
            for (int i = 0; i < mapRubriqueNet.keySet().size(); i++) {
319
 
333
 
320
                int idRub = ((Number) mapRubriqueNet.keySet().toArray()[i]).intValue();
334
                int idRub = ((Number) mapRubriqueNet.keySet().toArray()[i]).intValue();
321
                SQLRow rowRub = tableRubNet.getRow(idRub);
335
                SQLRow rowRub = tableRubNet.getRow(idRub);
322
 
336
 
323
                this.mCell.put("A" + posLine, rowRub.getObject("NOM"));
337
                this.mCell.put("A" + posLine, StringUtils.limitLength(rowRub.getString("NOM"), 55));
324
 
338
 
325
                this.mCell.put("B" + posLine, fillLine(mapSalarieNet, idRub, mapSal, numFirstSal, mapTotalNet, false));
339
                this.mCell.put("B" + posLine, fillLine(mapSalarieNet, idRub, mapSal, numFirstSal, mapTotalNet, false));
326
                this.mCell.put("C" + posLine, fillLine(mapSalarieNet, idRub, mapSal, numFirstSal, mapTotalNet, true));
340
                this.mCell.put("C" + posLine, fillLine(mapSalarieNet, idRub, mapSal, numFirstSal, mapTotalNet, true));
327
                this.mCell.put("D" + posLine, fillLine(mapSalarieNet, idRub, mapSal, numFirstSal + 1, mapTotalNet, false));
341
                this.mCell.put("D" + posLine, fillLine(mapSalarieNet, idRub, mapSal, numFirstSal + 1, mapTotalNet, false));
328
                this.mCell.put("E" + posLine, fillLine(mapSalarieNet, idRub, mapSal, numFirstSal + 1, mapTotalNet, true));
342
                this.mCell.put("E" + posLine, fillLine(mapSalarieNet, idRub, mapSal, numFirstSal + 1, mapTotalNet, true));