edit-liche-api
This commit is contained in:
@@ -78,15 +78,22 @@ class Protocol extends CI_Controller{
|
||||
$row = $this->orders_model->get(['id'=>$id]);
|
||||
$contract = $this->contracts_model->get(['o_id'=>$id,'type'=>1]);
|
||||
$total_price = 0;
|
||||
$services = [];
|
||||
if($row){
|
||||
$money_json = json_decode($row['money_json'],true);
|
||||
//获取门店信息
|
||||
$biz = $this->biz_model->get(['id'=>$row['biz_id']]);
|
||||
$row['company'] = $this->sys_company_model->get(["title like '%服务%'"=>null,'status'=>1]);
|
||||
//获取选择代办包
|
||||
$pack_row = $this->package_model->get(['id'=>$row['pack_id']],'srv_ids');
|
||||
if($pack_row['srv_ids']){
|
||||
$services = $this->services_model->select(["id in ({$pack_row['srv_ids']})"=>null],'','','','title');
|
||||
}
|
||||
$this->load->library('receiver/orders_entity');
|
||||
$srv_price = $this->orders_entity->order_srv_money($row['id']);
|
||||
$total_price = $srv_price + $money_json['price_insure'];
|
||||
}
|
||||
$row['services'] = $services;
|
||||
$row['total_price'] = $total_price;
|
||||
$row['info_json'] = json_decode($row['info_json'],true);
|
||||
$row['day'] = $contract ? date('Y年m月d日',$contract['c_time']):date('Y年m月d日');
|
||||
|
||||
Reference in New Issue
Block a user