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