dev
parent
97ba46f3ab
commit
e11cb40d75
|
|
@ -117,20 +117,12 @@ public class InvoiceUseService {
|
||||||
if (invoice_state == 9) {
|
if (invoice_state == 9) {
|
||||||
logsql += " and t.state = ? \n";
|
logsql += " and t.state = ? \n";
|
||||||
paramlog.add(invoice_state);
|
paramlog.add(invoice_state);
|
||||||
}else if(invoice_state == 5){
|
} else if (invoice_state == 5) {
|
||||||
ordsql += " and l.state = ? \n";
|
ordsql += " and l.state = ? \n";
|
||||||
paramord.add(invoice_state);
|
paramord.add(invoice_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (order_state != null) {
|
|
||||||
logsql += " and o.state = ? \n";
|
|
||||||
ordsql += " and t.state = ? \n";
|
|
||||||
|
|
||||||
paramlog.add(order_state);
|
|
||||||
paramord.add(order_state);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (invoice_type != null) {
|
if (invoice_type != null) {
|
||||||
logsql += " and t.invoice_type = ? \n";
|
logsql += " and t.invoice_type = ? \n";
|
||||||
ordsql += " and t.invoice_type = ? \n";
|
ordsql += " and t.invoice_type = ? \n";
|
||||||
|
|
@ -141,16 +133,42 @@ public class InvoiceUseService {
|
||||||
|
|
||||||
List<Record> list = new ArrayList<>();
|
List<Record> list = new ArrayList<>();
|
||||||
|
|
||||||
if (invoice_state != null) {
|
if (order_state != null) {
|
||||||
if(invoice_state == 9){
|
if (order_state == 9) {
|
||||||
list = Db.find(logsql + " order by t.create_time", paramlog.toArray());
|
logsql += " and o.state = ? \n";
|
||||||
}else if(invoice_state == 5){
|
paramlog.add(order_state);
|
||||||
list = Db.find(ordsql + " order by t.create_time", paramord.toArray());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
paramlog.addAll(paramord);
|
|
||||||
|
|
||||||
list = Db.find("select * from (" + logsql + "\n union \n " + ordsql + ") a order by a.create_time ", paramlog.toArray());
|
list = Db.find(logsql + " order by t.create_time", paramlog.toArray());
|
||||||
|
} else {
|
||||||
|
logsql += " and o.state = ? \n";
|
||||||
|
ordsql += " and t.state = ? \n";
|
||||||
|
paramlog.add(order_state);
|
||||||
|
paramord.add(order_state);
|
||||||
|
|
||||||
|
if (invoice_state != null) {
|
||||||
|
if (invoice_state == 9) {
|
||||||
|
list = Db.find(logsql + " order by t.create_time", paramlog.toArray());
|
||||||
|
} else if (invoice_state == 5) {
|
||||||
|
list = Db.find(ordsql + " order by t.create_time", paramord.toArray());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
paramlog.addAll(paramord);
|
||||||
|
|
||||||
|
list = Db.find("select * from (" + logsql + "\n union \n " + ordsql + ") a order by a.create_time ", paramlog.toArray());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (invoice_state != null) {
|
||||||
|
if (invoice_state == 9) {
|
||||||
|
list = Db.find(logsql + " order by t.create_time", paramlog.toArray());
|
||||||
|
} else if (invoice_state == 5) {
|
||||||
|
list = Db.find(ordsql + " order by t.create_time", paramord.toArray());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
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();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue