objMOrderPincking = new MOrderPicking($this->onlineUserId, $this->onlineEnterpriseId); } //重写订单列表 public function getAllOrderPicking() { $params = $this->request->getRawJson(); if (empty($params)) { $this->sendOutput('参数为空', ErrorCode::$paramError); } $pageParams = pageToOffset($params['page'] ?: 1, $params['pageSize'] ?: 10); $selectParams['limit'] = $pageParams['limit']; $selectParams['offset'] = $pageParams['offset']; //根据订单编号查找商品 $selectParams['no'] = getArrayItem($params, 'no',''); if( isset($selectParams['no']) || !empty($selectParams['no']) ){ $tmpSelectParams['no'] = explode('-',$selectParams['no']); if(count($tmpSelectParams['no'])==3){ $selectParams['no'] = $tmpSelectParams['no'][1].'-'.$tmpSelectParams['no'][2]; } } $selectParams['timeName'] = getArrayItem($params,'timeName',''); //时间判断 $selectParams['startTime'] = getArrayItem($params, 'startTime',''); $selectParams['endTime'] = getArrayItem($params, 'endTime',''); $result = $this->objMOrderPincking->getAllOrderPicking($selectParams); if ($result->isSuccess()) { $returnData = $result->getData(); $pageData = [ 'pageIndex' => $params['page'], 'pageSize' => $params['pageSize'], 'pageTotal' => $returnData['total'], ]; parent::sendOutput($returnData['data'], 0, $pageData); } else { parent::sendOutput($result->getData(), $result->getErrorCode()); } } //订单拣货详情 public function getOrderPickingInfo() { $pickingId = $this->request->param('request_id'); if(empty($pickingId)){ $this->sendOutput('参数错误', ErrorCode::$paramError); } $result = $this->objMOrderPincking->getOrderPickingInfo($pickingId); if ($result->isSuccess()) { $this->sendOutput($result->getData()); } else { $this->sendOutput($result->getData(), $result->getErrorCode()); } } /** * 待拣货明细 */ public function getAllPickingGoodsDetail() { $params = $this->request->getRawJson(); if (empty($params)) { $this->sendOutput('参数为空', ErrorCode::$paramError); } $pageParams = pageToOffset($params['page'] ?: 1, $params['pageSize'] ?: 10); $selectParams['limit'] = $pageParams['limit']; $selectParams['offset'] = $pageParams['offset']; //根据订单编号查找商品 $selectParams['no'] = getArrayItem($params, 'no',''); $selectParams['goodsName'] = getArrayItem($params, 'goodsName',''); $selectParams['operatorId'] = getArrayItem($params, 'operatorId',''); $selectParams['start'] = getArrayItem($params, 'start',''); $selectParams['end'] = getArrayItem($params, 'end',''); $result = $this->objMOrderPincking->getAllPickingGoodsDetail($selectParams); if ($result->isSuccess()) { $returnData = $result->getData(); $pageData = [ 'pageIndex' => $params['page'], 'pageSize' => $params['pageSize'], 'pageTotal' => $returnData['total'], ]; parent::sendOutput($returnData['data'], 0, $pageData); } else { parent::sendOutput($result->getData(), $result->getErrorCode()); } } }