|
|
|
@ -8,18 +8,19 @@
|
|
|
|
|
lta.warehouse_name warehouseName, |
|
|
|
|
lta.brand brand, |
|
|
|
|
count(lta.id) totalNum, |
|
|
|
|
count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) needOpenNum, |
|
|
|
|
sum(if(lta.waybill_status='1',1,0)) hasOpenNum, |
|
|
|
|
sum(if(lta.waybill_status = '0',1,0)) noOpenNum, |
|
|
|
|
IFNULL(round(sum(if(lta.waybill_status = '0',1,0))/count(lta.id)*100,2),'0.00') noOpenRate, |
|
|
|
|
sum(if(lta.waybill_status = '0',1,0))-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) noOpenNum, |
|
|
|
|
IFNULL(round((sum(if(lta.waybill_status = '0',1,0))-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))/(count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))*100,2),'0.00') noOpenRate, |
|
|
|
|
sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) noOpenHasFreezeNum, |
|
|
|
|
IFNULL(round(sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0))/count(lta.id)*100,2),'0.00') noOpenHasFreezeRate, |
|
|
|
|
IFNULL(round(sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'0.00') noOpenHasFreezeRate, |
|
|
|
|
sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenNoChaoNum, |
|
|
|
|
IFNULL(round(sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/count(lta.id)*100,2),'0.00') noOpenNoChaoRate, |
|
|
|
|
sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenChaoNum, |
|
|
|
|
IFNULL(round(sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/count(lta.id)*100,2),'0.00') noOpenChaoRate, |
|
|
|
|
IFNULL(round(sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'0.00') noOpenNoChaoRate, |
|
|
|
|
sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenChaoNum, |
|
|
|
|
IFNULL(round(sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'0.00') noOpenChaoRate, |
|
|
|
|
sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) onTimeNum, |
|
|
|
|
sum(IF( lta.waybill_status='1' and lww.create_time > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) overTimeNum, |
|
|
|
|
IFNULL(round(sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 ))/sum(if(lta.waybill_status='1',1,0))*100,2),'0.00') onTimeRate, |
|
|
|
|
sum(IF( lta.waybill_status='1' and lww.create_time > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) overTimeNum, |
|
|
|
|
IFNULL(round(sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 ))/(count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))*100,2),'0.00') onTimeRate, |
|
|
|
|
IFNULL(round(sum(TIMESTAMPDIFF(SECOND, lta.create_time, lww.create_time))/sum(if(lta.waybill_status='1',1,0))/3600,1),'0.0') avgTime |
|
|
|
|
from logpm_trunkline_advance lta |
|
|
|
|
left join logpm_warehouse_warehouse waw on waw.id = lta.warehouse_id |
|
|
|
@ -62,18 +63,19 @@
|
|
|
|
|
lta.warehouse_name warehouseName, |
|
|
|
|
lta.brand brand, |
|
|
|
|
count(lta.id) totalNum, |
|
|
|
|
count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) needOpenNum, |
|
|
|
|
sum(if(lta.waybill_status='1',1,0)) hasOpenNum, |
|
|
|
|
sum(if(lta.waybill_status = '0',1,0)) noOpenNum, |
|
|
|
|
IFNULL(concat(round(sum(if(lta.waybill_status = '0',1,0))/count(lta.id)*100,2),'%'),'0.00%') noOpenRate, |
|
|
|
|
sum(if(lta.waybill_status = '0',1,0))-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) noOpenNum, |
|
|
|
|
IFNULL(concat(round((sum(if(lta.waybill_status = '0',1,0))-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))/(count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))*100,2),'%'),'0.00%') noOpenRate, |
|
|
|
|
sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) noOpenHasFreezeNum, |
|
|
|
|
IFNULL(concat(round(sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0))/count(lta.id)*100,2),'%'),'0.00%') noOpenHasFreezeRate, |
|
|
|
|
IFNULL(concat(round(sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'%'),'0.00%') noOpenHasFreezeRate, |
|
|
|
|
sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenNoChaoNum, |
|
|
|
|
IFNULL(concat(round(sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/count(lta.id)*100,2),'%'),'0.00%') noOpenNoChaoRate, |
|
|
|
|
sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenChaoNum, |
|
|
|
|
IFNULL(concat(round(sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/count(lta.id)*100,2),'%'),'0.00%') noOpenChaoRate, |
|
|
|
|
IFNULL(concat(round(sum(if(lta.waybill_status='0'and now() <= DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'%'),'0.00%') noOpenNoChaoRate, |
|
|
|
|
sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0)) noOpenChaoNum, |
|
|
|
|
IFNULL(concat(round(sum(if(lta.waybill_status='0'and now() > DATE_ADD( lta.create_time, INTERVAL 48 HOUR ),1,0))/sum(if(lta.waybill_status = '0',1,0))*100,2),'%'),'0.00%') noOpenChaoRate, |
|
|
|
|
sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) onTimeNum, |
|
|
|
|
sum(IF( lta.waybill_status='1' and lww.create_time > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) overTimeNum, |
|
|
|
|
IFNULL(concat(round(sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 ))/sum(if(lta.waybill_status='1',1,0))*100,2),'%'),'0.00%') onTimeRate, |
|
|
|
|
sum(IF( lta.waybill_status='1' and lww.create_time > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 )) overTimeNum, |
|
|
|
|
IFNULL(concat(round(sum(IF( lta.waybill_status='1' and lww.create_time <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ), 1, 0 ))/(count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)))*100,2),'%'),'0.00%') onTimeRate, |
|
|
|
|
IFNULL(round(sum(TIMESTAMPDIFF(SECOND, lta.create_time, lww.create_time))/sum(if(lta.waybill_status='1',1,0))/3600,1),'0.0') avgTime |
|
|
|
|
from logpm_trunkline_advance lta |
|
|
|
|
left join logpm_warehouse_warehouse waw on waw.id = lta.warehouse_id |
|
|
|
|