| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?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;
- $option = isset($post['option']) ? $post['option'] : 0;
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->shopId);
- OrderSendService::reach($order, ['option' => $option]);
- }
- //向快递公司发起配送需求
- 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);
- }
- }
|