コード例 #1
0
 public function getWastageMapDataAction()
 {
     $return = array();
     $year = $this->_request->getParam('year', '');
     $month = $this->_request->getParam('month', '');
     $province = $this->_request->getParam('province', '');
     $district = $this->_request->getParam('district', '');
     $product = $this->_request->getParam('product', '');
     $level = $this->_request->getParam('level', '');
     $geoModel = new Model_Geo();
     $return[0] = $geoModel->getAcceptableWastages($product);
     if ($level == 4) {
         $return[1] = $geoModel->getWastagesDistrict($year, $month, $province, $product);
     } else {
         $return[1] = $geoModel->getWastagesTehsil($year, $month, $province, $district, $product);
     }
     echo Zend_Json::encode($return);
 }