All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yaml.busSchedule.yaml Maven / Gradle / Ivy

The newest version!
# field_names 之中不能有任何空格,否则会报错!!!!!!!!!!!!!!!

#获取多个班次bus_schedule对应的多个配置车辆schedule_vehicle的 1 已验票数量,2 未验票数量,3 余票,
#未用到,20171209
- id : geSVStatistics
  type : select
  sqls :
      remainSeats : 
             sql :     
                      '
                      SELECT CASE WHEN a > b THEN c - a ELSE c - b END AS remainSeats,svid,  
(select count(1) from passenger_bus_order where PAY_STATUS = "1" and pay_method = "1" and check_status= "1" and schedule_vehicle_id = svid) AS checkNum, 
(select count(1) from passenger_bus_order where PAY_STATUS = "1" and pay_method = "1" and check_status= "0" and schedule_vehicle_id = svid) AS unCheckNum 
                   FROM (SELECT (
                    SELECT IFNULL(SUM(amount), 0)
                    FROM `passenger_bus_order`
                    WHERE schedule_vehicle_id = sv.id
                      AND (pay_status = 1 
                        OR (pay_status = 0
                        AND pay_method = 1
                        AND UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(create_date) 




© 2015 - 2024 Weber Informatics LLC | Privacy Policy