时段统计,日明细查询接口修改
parent
a3746222e9
commit
7b696a79ff
|
|
@ -89,8 +89,13 @@ public class OrderStatService {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supermarket_id != null && supermarket_id > 0) {
|
if (supermarket_id != null && supermarket_id > 0) {
|
||||||
temp_sql += " and t.supermarket_id = ? \n";
|
if(supermarket_id == 4){
|
||||||
paraTempList.add(supermarket_id);
|
temp_sql += " and t.supermarket_id in (4,5) \n";
|
||||||
|
} else{
|
||||||
|
temp_sql += " and t.supermarket_id = ? \n";
|
||||||
|
paraTempList.add(supermarket_id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trans_co_id != null && trans_co_id > 0) {
|
if (trans_co_id != null && trans_co_id > 0) {
|
||||||
|
|
@ -142,7 +147,7 @@ public class OrderStatService {
|
||||||
" , a.trans_price\n" +
|
" , a.trans_price\n" +
|
||||||
" , a.trans_distance\n" +
|
" , a.trans_distance\n" +
|
||||||
" , a.supermarket_id\n" +
|
" , a.supermarket_id\n" +
|
||||||
" , s.name supermarket_name\n" +
|
" , case when a.supermarket_id = 4 then '巴河' else s.name end as supermarket_name\n" +
|
||||||
" , a.type\n" +
|
" , a.type\n" +
|
||||||
" , a.trans_co_id\n" +
|
" , a.trans_co_id\n" +
|
||||||
" , a.trans_co_name\n" +
|
" , a.trans_co_name\n" +
|
||||||
|
|
@ -1960,7 +1965,7 @@ public class OrderStatService {
|
||||||
" and t.create_time <= ? \n" +
|
" and t.create_time <= ? \n" +
|
||||||
paramsSql +
|
paramsSql +
|
||||||
" group by case when t.supermarket_id in (4,5) then 4 else t.supermarket_id end,t.product_id,t.product_name\n" +
|
" group by case when t.supermarket_id in (4,5) then 4 else t.supermarket_id end,t.product_id,t.product_name\n" +
|
||||||
") a on s.id = a.id where s.type = 0 order by s.id", paramsArray.toArray());
|
") a on s.id = a.id where s.type = 0 and s.id != 5 order by s.id", paramsArray.toArray());
|
||||||
} else {
|
} else {
|
||||||
list = Db.find("select s.id, s.name, a.cnt, a.total_price, a.total_weight from supermarket s\n" +
|
list = Db.find("select s.id, s.name, a.cnt, a.total_price, a.total_weight from supermarket s\n" +
|
||||||
"left join (\n" +
|
"left join (\n" +
|
||||||
|
|
@ -1971,7 +1976,7 @@ public class OrderStatService {
|
||||||
" and t.create_time >= ? \n" +
|
" and t.create_time >= ? \n" +
|
||||||
" and t.create_time <= ? \n" +
|
" and t.create_time <= ? \n" +
|
||||||
" group by case when t.supermarket_id in (4,5) then 4 else t.supermarket_id end\n" +
|
" group by case when t.supermarket_id in (4,5) then 4 else t.supermarket_id end\n" +
|
||||||
") a on s.id = a.id where s.type = 0 order by s.id", paramsArray.toArray());
|
") a on s.id = a.id where s.type = 0 and s.id != 5 order by s.id", paramsArray.toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
Record hj = new Record();
|
Record hj = new Record();
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public class TransportService extends BaseService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<Record> find(PageParam pp, String order_sn, String stm, String etm, String truck_license, Integer supermarket_id, Integer trans_co_id, Integer state, Integer supermarket_type) {
|
public Page<Record> find(PageParam pp, String order_sn, String stm, String etm, String truck_license, Integer supermarket_id, Integer trans_co_id, Integer state, Integer supermarket_type) {
|
||||||
String selectsql = "select t.*, case when t.supermarket_id = 4 then '巴河' else s.name end as supermarket_name ";
|
String selectsql = "select t.*, case when t.supermarket_id = 5 then '巴河' else s.name end as supermarket_name ";
|
||||||
String fromsql = "from transport t \n" +
|
String fromsql = "from transport t \n" +
|
||||||
" left join supermarket s on s.id = t.supermarket_id \n" +
|
" left join supermarket s on s.id = t.supermarket_id \n" +
|
||||||
" where 1=1 "; // 只显示未删除的
|
" where 1=1 "; // 只显示未删除的
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue