| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- namespace hd\controllers;
- use bizHd\order\services\OrderSendService;
- use bizHd\order\services\OrderService;
- use Yii;
- use common\components\util;
- class OrderSendController extends BaseController
- {
- //发货 ssh 2019.12.16
- public function actionDetail()
- {
- $id = Yii::$app->request->get('id', 0);
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->shopId);
- $list = OrderSendService::sendList($order);
- util::success($list);
- }
- //制单 免填单 填单 ssh 2019.12.16
- public function actionPrintOrder()
- {
- $post = Yii::$app->request->post();
- $id = isset($post['id']) ? $post['id'] : 0;
- $option = isset($post['option']) ? $post['option'] : 0;
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->shopId);
- $orderSn = $order['orderSn'];
- OrderSendService::printOrder(['id' => $id, 'option' => $option, 'orderSn' => $orderSn]);
- }
- //发货 ssh 2019.12.17
- public function actionDeliver()
- {
- $post = Yii::$app->request->post();
- $id = isset($post['id']) ? $post['id'] : 0;
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->shopId);
- $post['merchantId'] = $this->sjId;
- $post['orderSn'] = $order['orderSn'];
- OrderSendService::deliver($post);
- }
- //送达 ssh 2019.12.17
- public function actionReach()
- {
- $post = Yii::$app->request->post();
- $id = isset($post['id']) ? $post['id'] : 0;
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->shopId);
- OrderSendService::reach($order);
- }
- //向快递公司发起配送需求
- public function actionExpress()
- {
- }
- //取消快递
- public function actionCancelExpress()
- {
- $sendSide = 1;
- $sendTime = '10:21';
- }
- //添加小费
- public function actionAddTip()
- {
- }
- //结果回调通知
- public function actionExpressCallback()
- {
- }
- //快递服务提供方
- public function actionExpressProvide()
- {
- $data = ['id' => 1, 'name' => '达达'];
- util::success($data);
- }
- }
|