From ee2e6b633e58b8148fffd057a06427322488a0e6 Mon Sep 17 00:00:00 2001 From: wlx Date: Mon, 24 Oct 2011 06:09:40 +0000 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4WATER=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=A1=B9=EF=BC=8C=E6=95=B0=E6=8D=AE=E6=9C=8D=E5=8A=A1=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E5=88=86=E4=B8=BA=E9=80=9A=E8=BF=87=E5=92=8C=E6=8B=92?= =?UTF-8?q?=E7=BB=9D=EF=BC=8C=E7=94=B3=E8=AF=B7=E6=95=B0=E4=BB=8Eofflineap?= =?UTF-8?q?p=E7=9B=B4=E6=8E=A5=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/StatController.php | 24 +++++++++---------- .../admin/views/scripts/stat/water.phtml | 12 ++++++---- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/application/admin/controllers/StatController.php b/application/admin/controllers/StatController.php index 3b3744b3..3d303143 100644 --- a/application/admin/controllers/StatController.php +++ b/application/admin/controllers/StatController.php @@ -119,11 +119,11 @@ class Admin_StatController extends Zend_Controller_Action function waterAction() { - $sql="select count(k.keyword) as num,k.keyword from dataorder d join metadata m on d.uuid=m.uuid - left join keyword k on m.id=k.id - where (d.status=5 or d.status=-1) and m.source!='' - and (k.keyword='航空遥感' or k.keyword='卫星遥感' or k.keyword='气象水文' or k.keyword='上游寒区水文试验区' or k.keyword='森林水文试验区' or k.keyword='中游干旱区水文试验区') - group by k.keyword order by num desc"; + $sql="select count(k.keyword) as num,d.status,k.keyword from dataorder d left join metadata m on d.uuid=m.uuid + left join keyword k on m.id=k.id + where (d.status=5 or d.status=-1) and m.source='0595169a-279e-4b95-819f-129d0ba4280d' + and (k.keyword='航空遥感' or k.keyword='卫星遥感' or k.keyword='气象水文' or k.keyword='上游寒区水文试验区' or k.keyword='森林水文试验区' or k.keyword='中游干旱区水文试验区') + group by k.keyword,d.status order by k.keyword desc,d.status desc"; $re =$this->db->query($sql); $type =$re->fetchAll();//按分类 @@ -141,13 +141,13 @@ class Admin_StatController extends Zend_Controller_Action $this->view->month = $month; - $sql = "select count(extract(month from o.ts_created)) as c,extract(month from o.ts_created) as m,extract(year from o.ts_created) as y - from - (select distinct(o.id),o.ts_created - from offlineapp o left join dataorder d on d.offlineappid=o.id left join metadata m on m.uuid=d.uuid - where m.source='0595169a-279e-4b95-819f-129d0ba4280d' and (d.status=3 or d.status=5 or d.status=-1) - ) as o - group by extract(month from o.ts_created),extract(year from o.ts_created) + $sql = "select + extract(year from o.ts_created) as y,extract(month from o.ts_created) as m, + count(extract(month from o.ts_created)) as c + from + (select distinct(o.id),o.ts_created + from offlineapp o where o.datalist like '%黑河综合遥感联合试验%') as o + group by extract(month from o.ts_created),extract(year from o.ts_created) order by extract(year from o.ts_created),extract(month from o.ts_created)"; $re=$this->db->query($sql); diff --git a/application/admin/views/scripts/stat/water.phtml b/application/admin/views/scripts/stat/water.phtml index ca3df483..be5cfd81 100644 --- a/application/admin/views/scripts/stat/water.phtml +++ b/application/admin/views/scripts/stat/water.phtml @@ -23,14 +23,18 @@ - - + + + type as $k=>$v) - { - echo ''; + { + if ($v['status']==5) + echo ''; + elseif ($v['status']==-1) + echo ''; } ?>
关键词数据服务次数关键词数据通过数数据拒绝数
'.$v['keyword'].''.$v['num'].'
'.$v['keyword'].''.$v['num'].''.$v['num'].'