lisai17@sina.com 2020-11-17 16:06:26 +08:00
parent 1aae66c5e1
commit 7f13f2cc11
1 changed files with 14 additions and 10 deletions

View File

@ -129,20 +129,24 @@ public class InvoiceUseService {
List<Record> list = new ArrayList<>(); List<Record> list = new ArrayList<>();
if (invoice_type != null && invoice_type == 1) { if (invoice_state != null) {
list = Db.find(logsql + " order by t.create_time", paramlog.toArray()); list = Db.find(logsql + " order by t.create_time", paramlog.toArray());
} else { } else {
if (invoice_type != null && invoice_type == 2) { if (invoice_type != null && invoice_type == 1) {
logsql += " and t.invoice_type = ? \n"; list = Db.find(logsql + " order by t.create_time", paramlog.toArray());
ordsql += " and t.invoice_type = ? \n"; } else {
if (invoice_type != null && invoice_type == 2) {
logsql += " and t.invoice_type = ? \n";
ordsql += " and t.invoice_type = ? \n";
paramlog.add(invoice_type); paramlog.add(invoice_type);
paramord.add(invoice_type); paramord.add(invoice_type);
}
paramlog.addAll(paramord);
list = Db.find("select * from (" + logsql + "\n union \n " + ordsql + ") a order by a.create_time ", paramlog.toArray());
} }
paramlog.addAll(paramord);
list = Db.find("select * from (" + logsql + "\n union \n " + ordsql + ") a order by a.create_time ", paramlog.toArray());
} }
Record out = new Record(); Record out = new Record();