Ejemplo n.º 1
0
 public function actionInfos()
 {
     $OrganID = Yii::app()->user->getOrganID();
     $ID = Yii::app()->request->getParam('id');
     $cashinfo = CashdepositService::cashgetcash($ID);
     $sql = "SELECT b.OrganName, b.Identity, b.UnionID, c.Behavior, e.Name AS itemName, a.* \n                FROM jpd_llegal_record_dealer AS a LEFT JOIN jpd_organ AS b ON a.OrganID = b.ID LEFT JOIN jpd_irregular AS c on a.SettingsID = c.ID \n                LEFT JOIN jpd_irregular_item AS e ON c.ItemID = e.ID\n                WHERE a.IsDelete = 0 AND a.LlegalNO = '{$cashinfo->BusinessNO}' AND c.`Status` = 1";
     $data = Yii::app()->jpdb->createCommand($sql)->queryAll();
     $TotalScore = LlegalRecord::model()->find("OrganID = '{$OrganID}'")->TotalScore;
     if (!$TotalScore) {
         $TotalScore = 100;
     }
     $this->render('detail', array("data" => $data[0], "TotalScore" => $TotalScore));
 }
Ejemplo n.º 2
0
 public function actionDetail()
 {
     $OrganID = Yii::app()->user->getOrganID();
     $id = Yii::app()->request->getParam('id');
     $Identity = Yii::app()->request->getParam('Identity');
     if ($Identity == 3) {
         $modelname = "jpd_llegal_record_service";
     } else {
         $modelname = "jpd_llegal_record_dealer";
     }
     $sql = "SELECT b.OrganName, b.Identity, b.UnionID, c.Behavior, e.Name AS itemName, a.* \n                FROM " . $modelname . " AS a LEFT JOIN jpd_organ AS b ON a.OrganID = b.ID LEFT JOIN jpd_irregular AS c on a.SettingsID = c.ID \n                LEFT JOIN jpd_irregular_item AS e ON c.ItemID = e.ID\n                WHERE a.IsDelete = 0 AND a.ID = '{$id}' AND c.`Status` = 1";
     $data = Yii::app()->jpdb->createCommand($sql)->queryAll();
     $TotalScore = LlegalRecord::model()->find("OrganID = '{$OrganID}'")->TotalScore;
     if (!$TotalScore) {
         $TotalScore = 100;
     }
     $this->render('detail', array("data" => $data[0], "TotalScore" => $TotalScore));
 }
Ejemplo n.º 3
0
 public static function getrecord($OrganID)
 {
     $recordmodel = LlegalRecord::model()->find("OrganID = '{$OrganID}'");
     if (empty($recordmodel)) {
         $recordmodel = new LlegalRecord();
         $recordmodel->OrganID = $OrganID;
         $recordmodel->save();
     }
     return $recordmodel->TotalScore;
 }