diff --git a/frontend/controllers/CarController.php b/frontend/controllers/CarController.php index 58f77a6..23b1e7a 100644 --- a/frontend/controllers/CarController.php +++ b/frontend/controllers/CarController.php @@ -4150,374 +4150,6 @@ class CarController extends BaseController ]); } -// public function actionSmsMake() -// { -// Yii::$app->response->format = Response::FORMAT_JSON; -// $request = Yii::$app->request; -// $result = array(); -// $result['success'] = false; -// $result['msg'] = '生成失败'; -// -// $order_id = $request->post('order_id'); -// $order_info = OrderT::findOne(['id'=>$order_id]); -// $car_info = $order_info->car; -// -// $total1 = $request->post('total1'); -// $total2 = $request->post('total2'); -// $total3 = $request->post('total3'); -// $total_all = $request->post('total_all'); -// $total_real = $request->post('total_real'); -// $types = $request->post('types'); -// $nopays = $request->post('nopays'); -// -// $insurer_type_items = InsurerTypeT::find()->all(); -// -//// 之前的生成短信内容 -//// $msg = '尊敬的'.$car_info->car_no.'客户您好,人保车险'.$this->my->name.'为您报价:'; -//// $msg .= '交强险'.$total2.'元,'; -//// $msg .= '商业险'.$total1.'元'; -//// $msg .= '(包含'; -//// $bj = ''; -//// foreach($insurer_type_items as $item) { -//// if($item->id == 10 || $item->id == 11) continue; -//// if($types[$item->id] != '' && $types[$item->id] != '否' && $types[$item->id] != '无') { -//// $msg .= $item->name; -//// if($types[$item->id] != '是') -//// $msg .= $types[$item->id]; -//// $msg .= '、'; -//// if(isset($nopays[$item->id]) && ($nopays[$item->id] == 1)) -//// $bj .= $item->code; -//// } -//// } -//// if($bj != '') { -//// $msg .= '不计免赔覆盖'.$bj.'),'; -//// } -//// if($total3 > 0) { -//// $msg .= '车船税'.$total3.'元,'; -//// } -//// $msg .= '发票金额:'.$total_all.'元,'; -//// $msg .= '实收:'.$total_real.'元,'; -//// $msg .= '以上价格仅供参考,价格可能受您的历史理赔情况等的影响,最终价格以出单为准。详情请咨询010-53778188,回复TD拒收。'; -// -// //新的生成短信 -// $msg = '您好,中国人保车险'.$this->my->name.'(工号'.$this->my->username.'), 您的'.$car_info->car_no.':'; -// $msg .= '交强险'.$total2.'元,'; -// if($total3 > 0) { -// $msg .= '车船'.$total3.'元,'; -// } -// $msg .= '商业险'.$total1.'元,'; -// $msg .= '总计'.($total_all).'元,'; -// $msg .= '实收:'.($total_real).'元,'; -// $msg .= '(含'; -// $bj = ''; -// foreach($insurer_type_items as $item) { -// if($item->id == 10 || $item->id == 11) continue; -// if($types[$item->id] != '' && $types[$item->id] != '否' && $types[$item->id] != '无') { -// $msg .= $item->name; -// if($types[$item->id] != '是') -// $msg .= $types[$item->id]; -// $msg .= '、'; -// if(isset($nopays[$item->id]) && ($nopays[$item->id] == 1)) -// $bj .= $item->code; -// } -// } -// if($bj != '') { -// $msg .= '及相应不计免赔),'; -//// $msg .= '不计免赔覆盖'.$bj.'),'; -// } -// if($total1 < 1500){ -// $eleven = '7.(①进口3M封釉全车美容,②四轮定位动平衡,③二十二项全车检测,④保养100元工时抵用券,⑤内饰臭氧杀菌消毒);服务项目五选二'; -// $eight = '8.上门免费办理ETC'; -// $nine = null; -// }elseif($total1 >= 1500){ -// $eleven = '7.(①进口3M封釉全车美容,②四轮定位动平衡,③二十二项全车检测,④保养100元工时抵用券,⑤内饰臭氧杀菌消毒);服务项目五选二'; -// $eight = '8.上门免费办理ETC'; -// $nine = null; -// }else if($total1 >= 2000){ -// $eleven = '7.(①进口3M封釉全车美容,②四轮定位动平衡,③二十二项全车检测,④保养100元工时抵用券,⑤内饰臭氧杀菌消毒);服务项目五选二'; -// $eight = '8.上门免费办理ETC'; -// $nine = null; -// }else{ -// $eleven = '7.上门免费办理ETC'; -// $eight = null; -// $nine = null; -// } -// $msg .= '内含: -//1.客户经理一对一处理事故现场及理赔咨询 -//2.全程代办:上门接送车辆定损维修理赔一站式服务 -//3.一案多修(可维修四处车伤) -//4.单双方事故通定直赔,全程代办(可约代步车) -//5.全年24小时事故救援,非事故救援(搭电,送水,换备胎,拖车等) -//6.送单上门 -//'.$eleven.' -//'.$eight.' -//'.$nine.' -//您有任何问题请拨打'.$this->my->phone.',微信同号。祝您生活愉快! -//回复TD拒收'; -// -// $result['success'] = true; -// $result['msg'] = $msg; -// return $result; -// } - - - -// public function actionSmsMake() -// { -// Yii::$app->response->format = Response::FORMAT_JSON; -// $request = Yii::$app->request; -// $result = array(); -// $result['success'] = false; -// $result['msg'] = '生成失败'; -// -// $order_id = $request->post('order_id'); -// $order_info = OrderT::findOne(['id'=>$order_id]); -// $car_info = $order_info->car; -// -// $total1 = $request->post('total1'); -// $total2 = $request->post('total2'); -// -// $total1_clear = $request->post('total1_clear'); -// -// $total3 = $request->post('total3'); -// $total_all = $request->post('total_all'); -// $total_real = $request->post('total_real'); -// $types = $request->post('types'); -// $nopays = $request->post('nopays'); -// $total1_dis = $request->post('total1_dis'); -// -// $insurer_type_items = InsurerTypeT::find()->all(); -// -//// 之前的生成短信内容 -//// $msg = '尊敬的'.$car_info->car_no.'客户您好,人保车险'.$this->my->name.'为您报价:'; -//// $msg .= '交强险'.$total2.'元,'; -//// $msg .= '商业险'.$total1.'元'; -//// $msg .= '(包含'; -//// $bj = ''; -//// foreach($insurer_type_items as $item) { -//// if($item->id == 10 || $item->id == 11) continue; -//// if($types[$item->id] != '' && $types[$item->id] != '否' && $types[$item->id] != '无') { -//// $msg .= $item->name; -//// if($types[$item->id] != '是') -//// $msg .= $types[$item->id]; -//// $msg .= '、'; -//// if(isset($nopays[$item->id]) && ($nopays[$item->id] == 1)) -//// $bj .= $item->code; -//// } -//// } -//// if($bj != '') { -//// $msg .= '不计免赔覆盖'.$bj.'),'; -//// } -//// if($total3 > 0) { -//// $msg .= '车船税'.$total3.'元,'; -//// } -//// $msg .= '发票金额:'.$total_all.'元,'; -//// $msg .= '实收:'.$total_real.'元,'; -//// $msg .= '以上价格仅供参考,价格可能受您的历史理赔情况等的影响,最终价格以出单为准。详情请咨询010-53778188,回复TD拒收。'; -// -// //新的生成短信 -// $msg ='尊敬的'.$car_info->car_no.'客户您好:人保'.$this->my->name.'(工号'.$this->my->username.')为您报价:'; -//// $msg = '您好,中国人保车险'.$this->my->name.'(工号'.$this->my->username.'), 您的'.$car_info->car_no.':'; -// $msg .= '交强険'.$total2.'元,'; -// if($total3 > 0) { -// $msg .= '车船'.$total3.'元,'; -// } -// $msg .= '商业険'.$total1.'元,'; -// $msg .= '总计'.($total_all).'元,'; -// $msg .= '['; -// $bj = ''; -// foreach($insurer_type_items as $item) { -// if($item->id == 10 || $item->id == 11) continue; -// if($types[$item->id] != '' && $types[$item->id] != '否' && $types[$item->id] != '无') { -// $msg .= $item->name; -// if($types[$item->id] != '是') -// $msg .= $types[$item->id]; -// $msg .= '、'; -// if(isset($nopays[$item->id]) && ($nopays[$item->id] == 1)) -// $bj .= $item->code; -// } -// } -// if($bj != '') { -// $msg .= '不计免赔];'; -// } -//// if($total1_clear < 1000){ -//// $msg .= ' -////您有任何问题请拨打'.$this->my->phone.'联系我,微信同号。祝您生活愉快! -////回复TD拒收'; -//// -//// }else{ -//// if($total1_clear >= 1000 && $total1_clear < 2000){ -//// $eleven = '7.另有超值项目五选二'; -//// $eight = null; -//// $nine = null; -//// }else if($total1_clear >= 2000 && $total1_clear<3000){ -//// $eleven = '7.另有超值项目五选二'; -//// -//// $eight = null; -//// -//// $nine = null; -//// }else if($total1_clear >= 3000){ -//// -////// $eleven = '7.(1.一个部位车伤修复 (含钣金喷漆),2.免费小保养一次 3.整车无机镀晶一次)三选一'; -//// $eleven = '7.另有超值项目五选二'; -//// -//// $eight = null; -//// $nine = null; -//// }else{ -////// $eleven = '7.上门免费办理ETC'; -//// $eleven = null; -//// $eight = null; -//// $nine = null; -//// } -// $msg .= '出单赠送赠送≥'.$total1.'元商业全额保单专享礼包: -//1.'.$total1_dis.'元现金红包 -//2.价值600-1000元升级礼券包(喷漆,保养,镀晶三选一) -//3.价值1200元超值美容包(外观美容封釉,内室臭氧杀菌,空调风道清洗三项) -//4.价值2000元VIP服务包(人伤极速赔、客户经理一对一、全程代办、双方事故直赔、一案多修、升级救援、代步车等15项理赔升级服务,附VIP客户车险服务权益书告知书一份) -//5.赠送470元全国通用体检套餐双人卡1份 -//短信字数有限,详询010-51669518或'.$this->my->phone.'联系我,微信同号。祝您生活愉快! -//回复TD拒收'; -//// } -// -// -// $result['success'] = true; -// $result['msg'] = $msg; -// return $result; -// } - -// public function actionSmsMake() -// { -// Yii::$app->response->format = Response::FORMAT_JSON; -// $request = Yii::$app->request; -// $result = array(); -// $result['success'] = false; -// $result['msg'] = '生成失败'; -// -// $order_id = $request->post('order_id'); -// $order_info = OrderT::findOne(['id'=>$order_id]); -// $car_info = $order_info->car; -// -// $total1 = $request->post('total1'); -// $total2 = $request->post('total2'); -// -// $total1_clear = $request->post('total1_clear'); -// -// $total3 = $request->post('total3'); -// $total_all = $request->post('total_all'); -// $total_real = $request->post('total_real'); -// $types = $request->post('types'); -// $nopays = $request->post('nopays'); -// $total1_dis = $request->post('total1_dis'); -// -// $insurer_type_items = InsurerTypeT::find()->all(); -// -// //保费15% -// $hongbao=$total1_clear * 0.15; -// -// -//// 之前的生成短信内容 -//// $msg = '尊敬的'.$car_info->car_no.'客户您好,人保车险'.$this->my->name.'为您报价:'; -//// $msg .= '交强险'.$total2.'元,'; -//// $msg .= '商业险'.$total1.'元'; -//// $msg .= '(包含'; -//// $bj = ''; -//// foreach($insurer_type_items as $item) { -//// if($item->id == 10 || $item->id == 11) continue; -//// if($types[$item->id] != '' && $types[$item->id] != '否' && $types[$item->id] != '无') { -//// $msg .= $item->name; -//// if($types[$item->id] != '是') -//// $msg .= $types[$item->id]; -//// $msg .= '、'; -//// if(isset($nopays[$item->id]) && ($nopays[$item->id] == 1)) -//// $bj .= $item->code; -//// } -//// } -//// if($bj != '') { -//// $msg .= '不计免赔覆盖'.$bj.'),'; -//// } -//// if($total3 > 0) { -//// $msg .= '车船税'.$total3.'元,'; -//// } -//// $msg .= '发票金额:'.$total_all.'元,'; -//// $msg .= '实收:'.$total_real.'元,'; -//// $msg .= '以上价格仅供参考,价格可能受您的历史理赔情况等的影响,最终价格以出单为准。详情请咨询010-53778188,回复TD拒收。'; -// -// -// //新的生成短信 -// $msg ='尊敬的'.$car_info->car_no.'客户您好:人保'.$this->my->name.'(工号'.$this->my->username.')为您报价:'; -//// $msg = '您好,中国人保车险'.$this->my->name.'(工号'.$this->my->username.'), 您的'.$car_info->car_no.':'; -// $msg .= '交强険'.$total2.'元,'; -// if($total3 > 0) { -// $msg .= '车船'.$total3.'元,'; -// } -// $msg .= '商业険'.$total1.'元,'; -// $msg .= '总计'.($total_all).'元,'; -// $msg .= '['; -// $bj = ''; -// foreach($insurer_type_items as $item) { -// if($item->id == 10 || $item->id == 11) continue; -// if($types[$item->id] != '' && $types[$item->id] != '否' && $types[$item->id] != '无') { -// $msg .= $item->name; -// if($types[$item->id] != '是') -// $msg .= $types[$item->id]; -// $msg .= '、'; -// if(isset($nopays[$item->id]) && ($nopays[$item->id] == 1)) -// $bj .= $item->code; -// } -// } -// if($bj != '') { -// $msg .= '不计免赔];'; -// } -//// if($total1_clear < 1000){ -//// $msg .= ' -////您有任何问题请拨打'.$this->my->phone.'联系我,微信同号。祝您生活愉快! -////回复TD拒收'; -//// -//// }else{ -//// if($total1_clear >= 1000 && $total1_clear < 2000){ -//// $eleven = '7.另有超值项目五选二'; -//// $eight = null; -//// $nine = null; -//// }else if($total1_clear >= 2000 && $total1_clear<3000){ -//// $eleven = '7.另有超值项目五选二'; -//// -//// $eight = null; -//// -//// $nine = null; -//// }else if($total1_clear >= 3000){ -//// -////// $eleven = '7.(1.一个部位车伤修复 (含钣金喷漆),2.免费小保养一次 3.整车无机镀晶一次)三选一'; -//// $eleven = '7.另有超值项目五选二'; -//// -//// $eight = null; -//// $nine = null; -//// }else{ -////// $eleven = '7.上门免费办理ETC'; -//// $eleven = null; -//// $eight = null; -//// $nine = null; -//// } -//// 1.现金红包XXX元(限时),2. 免费升级驾驶员人身意外保障26万。3.赠送VIP卡(包含进口封釉、内饰臭氧杀菌、空调风道清洗、四轮定位等十项服务) -//// 4.尊享VIP服务包(人伤极速赔、客户经理一对一、全程代办、双方事故直赔、一案多修、升级救援、代步车等15项理赔升级服务)5.升级划痕险不用投保享一案多修服务 6.享受北京市600家4S店直赔服务。 -//// 7.享受全国免费事故, -//// 非事故救援(送水,搭电,换备胎,现场小修)8.享受玻璃上门更换 9.享受自然灾害百分百赔付(地震除外) 10.享受无法找到第三方无免赔服务 详询186******联系我,回复TD拒收 -// -// $msg .=' -//1.现金红包'.$total1_dis.'元(限时), -//2. 免费升级驾驶员人身意外保障26万。 -//3.赠送VIP卡(包含进口封釉、内饰臭氧杀菌、空调风道清洗、四轮定位等十项服务) -//4.尊享VIP服务包(人伤极速赔、客户经理一对一、全程代办、双方事故直赔、一案多修、升级救援、代步车等15项理赔升级服务) -//5.升级划痕险不用投保享一案多修服务 -//6.享受全国免费事故,非事故救援(送水,搭电,换备胎,现场小修),免费上门跟换玻璃 -//7.享受无法找到第三方无免赔服务 详询'.$this->my->phone.'加我(微信同号),回复TD拒收'; -// -//// } -// -// -// $result['success'] = true; -// $result['msg'] = $msg; -// return $result; -// } public function actionSmsSend() { Yii::$app->response->format = Response::FORMAT_JSON; @@ -4618,10 +4250,12 @@ class CarController extends BaseController $insurer_type_items = InsurerTypeT::find()->all(); + $tmp_total = $total_real; $msg = '【'.$company_name.'】尊敬的'.$car_info->car_no.'客户您好:'.$company.$this->my->name.'为您报价:'; $msg .= '交强、'; if($total3 > 0) { $msg .= '车船税、'; + $tmp_total += $total3; } // $msg .= '商业'.$total1.'元'; // $msg .= '总计'.($total_all).'元,'; @@ -4662,11 +4296,9 @@ class CarController extends BaseController } $msg .= $msg1; -// $msg .= '总计'.($total_all).'元;'; - $msg .= '保费实收'.($total_real).'元;'; + $msg .= '保费实收'.($tmp_total).'元;'; $msg .= '祝您生活愉快。'; -// } $result['success'] = true;