|
@@ -7,66 +7,67 @@
|
|
|
* 用户详细信息
|
|
|
*/
|
|
|
class Docters extends MongoAr{
|
|
|
- public $_id;
|
|
|
- public $num; // 诊脉编号
|
|
|
- public $xyh_order_id;// 订单编号
|
|
|
- public $status;// 未预约 0 已预约 1 已诊脉 2
|
|
|
- public $user_name;// 医生姓名
|
|
|
- public $diagnos_address;// 诊脉地址
|
|
|
- public $reserve_time;// 预约日期
|
|
|
- public $diagnos_time;// 诊脉日期
|
|
|
- public $report_time;// 报告日期
|
|
|
- public $remarks;// 备注
|
|
|
+ public $_id;
|
|
|
+ public $num; // 诊脉编号
|
|
|
+ public $xyh_order_id;// 订单编号
|
|
|
+ public $status;// 未预约 0 已预约 1 已诊脉 2
|
|
|
+ public $user_name;// 医生姓名
|
|
|
+ public $diagnos_address;// 诊脉地址
|
|
|
+ public $reserve_time;// 预约日期
|
|
|
+ public $diagnos_time;// 诊脉日期
|
|
|
+ public $report_time;// 报告日期
|
|
|
+ public $employe_id;//employe_id
|
|
|
+ public $remarks;// 备注
|
|
|
|
|
|
-
|
|
|
- public function __construct($scenario='insert'){
|
|
|
- $this->setMongoDBComponent(Yii::app()->getComponent('mongodb_o2o'));
|
|
|
- parent::__construct($scenario);
|
|
|
- }
|
|
|
+ public function __construct($scenario='insert'){
|
|
|
+ $this->setMongoDBComponent(Yii::app()->getComponent('mongodb_o2o'));
|
|
|
+ parent::__construct($scenario);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- public static function model($className=__CLASS__)
|
|
|
- {
|
|
|
- return parent::model($className);
|
|
|
- }
|
|
|
+ public static function model($className=__CLASS__)
|
|
|
+ {
|
|
|
+ return parent::model($className);
|
|
|
+ }
|
|
|
|
|
|
- public function getCollectionName()
|
|
|
- {
|
|
|
- return 'docters';
|
|
|
- }
|
|
|
+ public function getCollectionName()
|
|
|
+ {
|
|
|
+ return 'docters';
|
|
|
+ }
|
|
|
|
|
|
- public static function get($_id) {
|
|
|
- if(CommonFn::isMongoId($_id)){
|
|
|
- $criteria = new EMongoCriteria();
|
|
|
- $criteria->_id('==', $_id);
|
|
|
- $model = self::model()->find($criteria);
|
|
|
- return $model;
|
|
|
- }else{
|
|
|
- return false;
|
|
|
+ public static function get($_id) {
|
|
|
+ if(CommonFn::isMongoId($_id)){
|
|
|
+ $criteria = new EMongoCriteria();
|
|
|
+ $criteria->_id('==', $_id);
|
|
|
+ $model = self::model()->find($criteria);
|
|
|
+ return $model;
|
|
|
+ }else{
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- public function parseRow($row,$output=array()){
|
|
|
- $newRow = array();
|
|
|
- $newRow['id'] = (string)$row['_id'];
|
|
|
- $newRow['num'] = CommonFn::get_val_if_isset($row,'num','');
|
|
|
- $newRow['xyh_order_id'] = CommonFn::get_val_if_isset($row,'xyh_order_id','');
|
|
|
- $newRow['status'] = CommonFn::get_val_if_isset($row,'status','');
|
|
|
- $newRow['user_name'] = CommonFn::get_val_if_isset($row,'user_name','');
|
|
|
- $newRow['diagnos_address'] = CommonFn::get_val_if_isset($row,'diagnos_address','');
|
|
|
- $newRow['reserve_time'] = CommonFn::get_val_if_isset($row,'reserve_time','');
|
|
|
- $newRow['diagnos_time'] = CommonFn::get_val_if_isset($row,'diagnos_time','');
|
|
|
- $newRow['report_time'] = CommonFn::get_val_if_isset($row,'report_time','');
|
|
|
- $newRow['remarks'] = CommonFn::get_val_if_isset($row,'remarks','');
|
|
|
+ public function parseRow($row,$output=array()){
|
|
|
+ $newRow = array();
|
|
|
+ $newRow['id'] = (string)$row['_id'];
|
|
|
+ $newRow['num'] = CommonFn::get_val_if_isset($row,'num','');
|
|
|
+ $newRow['xyh_order_id'] = CommonFn::get_val_if_isset($row,'xyh_order_id','');
|
|
|
+ $newRow['status'] = CommonFn::get_val_if_isset($row,'status','');
|
|
|
+ $newRow['user_name'] = CommonFn::get_val_if_isset($row,'user_name','');
|
|
|
+ $newRow['diagnos_address'] = CommonFn::get_val_if_isset($row,'diagnos_address','');
|
|
|
+ $newRow['reserve_time'] = CommonFn::get_val_if_isset($row,'reserve_time','');
|
|
|
+ $newRow['diagnos_time'] = CommonFn::get_val_if_isset($row,'diagnos_time','');
|
|
|
+ $newRow['report_time'] = CommonFn::get_val_if_isset($row,'report_time','');
|
|
|
+ $newRow['remarks'] = CommonFn::get_val_if_isset($row,'remarks','');
|
|
|
+ $newRow['employe_id'] = CommonFn::get_val_if_isset($row,'employe_id','');
|
|
|
|
|
|
- if(APPLICATION=='admin'){
|
|
|
- $newRow['action_user'] = CommonFn::get_val_if_isset($row,'action_user',"");
|
|
|
- $newRow['action_time'] = CommonFn::get_val_if_isset($row,'action_time',"");
|
|
|
- $newRow['action_log'] = CommonFn::get_val_if_isset($row,'action_log',"");
|
|
|
+ if(APPLICATION=='admin'){
|
|
|
+ $newRow['action_user'] = CommonFn::get_val_if_isset($row,'action_user',"");
|
|
|
+ $newRow['action_time'] = CommonFn::get_val_if_isset($row,'action_time',"");
|
|
|
+ $newRow['action_log'] = CommonFn::get_val_if_isset($row,'action_log',"");
|
|
|
|
|
|
+ }
|
|
|
+ return $this->output($newRow,$output);
|
|
|
}
|
|
|
- return $this->output($newRow,$output);
|
|
|
- }
|
|
|
|
|
|
|
|
|
}
|