|
|
@@ -104,7 +104,7 @@ public class HouseNumberImplDao implements HouseNumberDao {
|
|
|
String sql = "select `id`,`house_id`,`number_name`,`create_id`,`create_date`,`modify_date`from\n" +
|
|
|
"(select * from house_number where house_id = :house_id and status != 0) a\n" +
|
|
|
"where not exists\n" +
|
|
|
- "(select number_id from house_number_status where DATE_FORMAT(set_date,'%Y-%m-%d') >= :order_start_time and DATE_FORMAT(set_date,'%Y-%m-%d') <= :order_end_time and booking_id != :booking_id and `status` >1 and number_id = a.id group by number_id)" +
|
|
|
+ "(select number_id from house_number_status where DATE_FORMAT(set_date,'%Y-%m-%d') >= :order_start_time and DATE_FORMAT(set_date,'%Y-%m-%d') <= :order_end_time and (booking_id != :booking_id or booking_id is null) and close_type >= 1 and status != 0 and number_id = a.id group by number_id)" +
|
|
|
"order by number_name asc";
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("house_id", book.getHouseId());
|