dev
parent
22e8946496
commit
f63963ecd9
|
|
@ -163,7 +163,7 @@ public class PrepayService {
|
|||
* @return
|
||||
*/
|
||||
public List<Record> consumption(Integer customer_id, Integer supermarket_id, String stm, String etm, String truck_license) {
|
||||
String sale_sql = " select t.sn, t.supermarket_id, t.truck_license, t.weight, t.total_price, t.paid, t.customer_id, t.customer_name \n" +
|
||||
String sale_sql = " select t.sn, t.supermarket_id, t.truck_license, t.weight, t.total_price, t.paid, t.customer_id, t.customer_name, t.create_time \n" +
|
||||
" from order_sale t \n" +
|
||||
" left join customer c on c.id = t.customer_id \n" +
|
||||
" where t.state = ? \n" +
|
||||
|
|
@ -171,7 +171,7 @@ public class PrepayService {
|
|||
" and t.prepay_customer_id is not null \n" +
|
||||
" and t.create_time >= ? \n" +
|
||||
" and t.create_time <= ? \n";
|
||||
String temp_sql = " select t.sn, t.supermarket_id, t.truck_license, t.weight, t.total_price, t.paid, t.customer_id, t.customer_name \n" +
|
||||
String temp_sql = " select t.sn, t.supermarket_id, t.truck_license, t.weight, t.total_price, t.paid, t.customer_id, t.customer_name, t.create_time \n" +
|
||||
" from order_temp t \n" +
|
||||
" where t.state = ? \n" +
|
||||
" and t.isprepaid = 1 \n" +
|
||||
|
|
@ -252,8 +252,8 @@ public class PrepayService {
|
|||
|
||||
list.sort(new Comparator<Record>() {
|
||||
public int compare(Record o1, Record o2) {
|
||||
long d1 = o1.getDate("arrive_time").getTime();
|
||||
long d2 = o2.getDate("arrive_time").getTime();
|
||||
long d1 = o1.getDate("create_time").getTime();
|
||||
long d2 = o2.getDate("create_time").getTime();
|
||||
|
||||
if (d1 > d2) {
|
||||
return 1;
|
||||
|
|
@ -432,10 +432,10 @@ public class PrepayService {
|
|||
*/
|
||||
public List<Record> flow(Integer customer_id, String stm, String etm) {
|
||||
String sql = "select * from ( \n" +
|
||||
" select a.sn id, p.arrive_time tm, 0 - a.total_price amount, '扣费' type, \n" +
|
||||
" select a.sn id, a.create_time, p.arrive_time tm, 0 - a.total_price amount, '扣费' type, \n" +
|
||||
" case when a.paid > 0 then concat('补差额', a.paid) else '' end memo, a.customer_id, a.customer_name \n" +
|
||||
" from ( \n" +
|
||||
" select t.sn, t.total_price, t.paid, t.customer_id, t.customer_name \n" +
|
||||
" select t.sn, t.total_price, t.paid, t.customer_id, t.customer_name, t.create_time \n" +
|
||||
" from order_sale t \n" +
|
||||
" where t.isprepaid = 1 \n" +
|
||||
" and t.state = ? \n" +
|
||||
|
|
@ -443,7 +443,7 @@ public class PrepayService {
|
|||
" and t.create_time >= ? \n" +
|
||||
" and t.create_time <= ? \n" +
|
||||
" union \n" +
|
||||
" select t.sn, t.total_price, t.paid, t.customer_id, t.customer_name\n" +
|
||||
" select t.sn, t.total_price, t.paid, t.customer_id, t.customer_name, t.create_time \n" +
|
||||
" from order_temp t \n" +
|
||||
" where t.isprepaid = 1 \n" +
|
||||
" and t.state = ? \n" +
|
||||
|
|
|
|||
Loading…
Reference in New Issue