Line 82... |
Line 82... |
82 |
sel.addSelect(tableEcriture.getField("LETTRAGE"));
|
82 |
sel.addSelect(tableEcriture.getField("LETTRAGE"));
|
83 |
sel.addSelect(tableEcriture.getField("DATE_VALIDE"));
|
83 |
sel.addSelect(tableEcriture.getField("DATE_VALIDE"));
|
84 |
|
84 |
|
85 |
sel.addFieldOrder(tableEcriture.getField("DATE"));
|
85 |
sel.addFieldOrder(tableEcriture.getField("DATE"));
|
86 |
sel.addFieldOrder(tableMouvement.getField("NUMERO"));
|
86 |
sel.addFieldOrder(tableMouvement.getField("NUMERO"));
|
87 |
sel.setWhere(sel.getWhere().and(new Where(tableEcriture.getField("DEBIT"), "!=", tableEcriture.getField("CREDIT"))));
|
87 |
final Where w = new Where(tableEcriture.getField("DEBIT"), "!=", tableEcriture.getField("CREDIT"));
|
- |
|
88 |
final Where w2 = new Where(tableEcriture.getField("CLOTURE"), "!=", Boolean.TRUE);
|
- |
|
89 |
sel.setWhere(sel.getWhere().and(w).and(w2));
|
88 |
|
90 |
|
89 |
@SuppressWarnings("unchecked")
|
91 |
@SuppressWarnings("unchecked")
|
90 |
final List<Object[]> l = (List<Object[]>) this.getRootSociete().getDBSystemRoot().getDataSource().execute(sel.asString(), new ArrayListHandler());
|
92 |
final List<Object[]> l = (List<Object[]>) this.getRootSociete().getDBSystemRoot().getDataSource().execute(sel.asString(), new ArrayListHandler());
|
91 |
this.data = l;
|
93 |
this.data = l;
|
92 |
return l == null ? 0 : l.size();
|
94 |
return l == null ? 0 : l.size();
|
Line 103... |
Line 105... |
103 |
|
105 |
|
104 |
private final void addField(final List<String> line, final String s) {
|
106 |
private final void addField(final List<String> line, final String s) {
|
105 |
if (s == null) {
|
107 |
if (s == null) {
|
106 |
throw new NullPointerException("Valeur manquante pour remplir la ligne : " + line);
|
108 |
throw new NullPointerException("Valeur manquante pour remplir la ligne : " + line);
|
107 |
}
|
109 |
}
|
108 |
// TODO remove \r
|
110 |
final String escapedString = StringUtils.toAsciiString(s).trim();
|
109 |
line.add(s.trim().replace(ZONE_SEPARATOR, REPLACEMENT).replace(RECORD_SEPARATOR, REPLACEMENT));
|
111 |
line.add(escapedString.replace(ZONE_SEPARATOR, REPLACEMENT).replace(RECORD_SEPARATOR, REPLACEMENT));
|
110 |
}
|
112 |
}
|
111 |
|
113 |
|
112 |
@Override
|
114 |
@Override
|
113 |
protected void export(OutputStream out) throws IOException {
|
115 |
protected void export(OutputStream out) throws IOException {
|
114 |
final Writer bufOut = new OutputStreamWriter(out, StringUtils.ISO8859_15);
|
116 |
final Writer bufOut = new OutputStreamWriter(out, StringUtils.ISO8859_15);
|