|
@@ -862,6 +862,51 @@ class ROrderController extends AdminController{
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
+ //更新订单状态
|
|
|
+ /**
|
|
|
+ * @param $orderId => order->orderNo
|
|
|
+ * @param $status "00" 为创建订单,"01"为服务派单,"02"为服务完成
|
|
|
+ * @param $HouseKeepingId 巾帼园自己的订单号 对应order->_id
|
|
|
+ * @param $remark 订单备注
|
|
|
+ * @return bool
|
|
|
+ */
|
|
|
+ public function UpdateStatusForJingBai($orderId,$status,$HouseKeepingId,$remark){
|
|
|
+ $data['key'] = Yii::app()->params['shKey'];
|
|
|
+ $data['version'] = '1.0';
|
|
|
+ $data['serviceType'] = (int)26;
|
|
|
+ $data['orderId'] = (string)$orderId;
|
|
|
+ $data['status'] = $status;
|
|
|
+ ksort($data);
|
|
|
+ $str = '';
|
|
|
+ $dat = '';
|
|
|
+ foreach ($data as $key => $value) {
|
|
|
+ $str .= $key.'='.$value.'&';
|
|
|
+ $dat .= $key.'='.urlencode($value).'&';
|
|
|
+ }
|
|
|
+ $str = rtrim(trim($str),'&');
|
|
|
+
|
|
|
+ $str .= $str.Yii::app()->params['shMd5Key'];
|
|
|
+
|
|
|
+ $data['sign'] = strtoupper(md5($str));
|
|
|
+ $dat .= 'sign='.urlencode($data['sign']);//构建post 参数
|
|
|
+ $url = 'http://test2.app.hiwemeet.com/v2/openpf/home/order/thirdOrder/update'; //调用接口的平台服务地址
|
|
|
+
|
|
|
+ $ch = curl_init();
|
|
|
+ curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false);
|
|
|
+ curl_setopt($ch, CURLOPT_URL, $url);
|
|
|
+ curl_setopt($ch, CURLOPT_POST, 1);
|
|
|
+ curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
|
|
|
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $dat);
|
|
|
+ $result = curl_exec($ch);
|
|
|
+ curl_close($ch);
|
|
|
+ $res = json_decode($result,true);
|
|
|
+ if ($res['code']){
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
public function actionOutputExcel(){
|
|
|
$data = ROrder::model()->findAll(); //
|