修改各砂站统计bug
parent
258669997a
commit
3474015be8
|
|
@ -2013,10 +2013,15 @@ public class OrderStatService {
|
|||
}
|
||||
|
||||
List<String> ids = new ArrayList<>();
|
||||
String cidsql = "";
|
||||
for (Record r : customer_sale_list) {
|
||||
ids.add(r.getStr("customer_id"));
|
||||
}
|
||||
|
||||
if(!ids.isEmpty()){
|
||||
cidsql = " c.id in(" + StrKit.join(ids, ",") + ") or ";
|
||||
}
|
||||
|
||||
List<Record> customer_pre_list = Db.find("select\n" +
|
||||
" a.customer_id,\n" +
|
||||
" tp.id customer_type_id,\n" +
|
||||
|
|
@ -2034,7 +2039,7 @@ public class OrderStatService {
|
|||
" ) a on c.id = a.customer_id \n" +
|
||||
" left join customer_type tp on tp.id = c.customer_type_id\n" +
|
||||
" left join prepay_customer p on p.customer_id = c.id\n" +
|
||||
" where c.id in(" + StrKit.join(ids, ",") + ") or a.customer_id is not null \n" + // 查询时间段内有购砂、起始时间年内有充值的
|
||||
" where " + cidsql + " a.customer_id is not null \n" + // 查询时间段内有购砂、起始时间年内有充值的
|
||||
" union\n" +
|
||||
" select 0 customer_id, 99 customer_type_id, '零散' customer_type_name, '零散客户' customer_name, '零散客户' name, null prepay_total_amount, null prepay_surplus", tm);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue