objMCashierPushMoneyDetail = new MCashierPushMoneyDetail($this->onlineUserId,$this->onlineEnterpriseId); } /** * Doc: (des="") * User: XMing * Date: 2020/8/31 * Time: 5:41 下午 */ public function getAll() { $params = $this->request->getRawJson(); if (empty($params)) { parent::sendOutput('参数为空', ErrorCode::$paramError); } if (!isset($params['pushType']) || empty($params['pushType'])){ parent::sendOutput('pushType参数错误',ErrorCode::$paramError); } $pageParams = pageToOffset($params['page'] ?: 1, $params['pageSize'] ?: 10); $params['limit'] = $pageParams['limit']; $params['offset'] = $pageParams['offset']; $result = $this->objMCashierPushMoneyDetail->getAll($params); if (!$result->isSuccess()) { parent::sendOutput($result->getData(), $result->getErrorCode()); } $returnData = $result->getData(); $pageData = [ 'pageIndex' => $params['page'], 'pageSize' => $params['pageSize'], 'pageTotal' => $returnData['total'], ]; parent::sendOutput($returnData['data'], 0, $pageData); } /** * Doc: (des="获取交班记录") * User: XMing * Date: 2020/9/1 * Time: 11:12 上午 */ public function getRecordList() { $params = $this->request->getRawJson(); if (empty($params)) { parent::sendOutput('参数为空', ErrorCode::$paramError); } $pageParams = pageToOffset($params['page'] ?: 1, $params['pageSize'] ?: 10); $params['limit'] = $pageParams['limit']; $params['offset'] = $pageParams['offset']; $result = $this->objMCashierPushMoneyDetail->getRecordList($params); if (!$result->isSuccess()) { parent::sendOutput($result->getData(), $result->getErrorCode()); } $returnData = $result->getData(); $pageData = [ 'pageIndex' => $params['page'], 'pageSize' => $params['pageSize'], 'pageTotal' => $returnData['total'], ]; parent::sendOutput($returnData['data'], 0, $pageData); } /** * Doc: (des="收款记录详情") * User: XMing * Date: 2020/9/1 * Time: 11:35 上午 */ public function getRecordInfo() { $id = $this->request->param('request_id'); if (empty($id)){ parent::sendOutput('id参数错误',ErrorCode::$paramError); } $result = $this->objMCashierPushMoneyDetail->getRecordInfo($id); if (!$result->isSuccess()){ parent::sendOutput($result->getData(),$result->getErrorCode()); } parent::sendOutput($result->getData()); } /** * Doc: (des="1.获取交接详情") * User: XMing * Date: 2020/9/1 * Time: 12:01 下午 */ public function connectDetails() { $shopId = $this->request->param('shopId'); if (empty($shopId)){ parent::sendOutput('shopId参数错误',ErrorCode::$paramError); } $result = $this->objMCashierPushMoneyDetail->connectDetails($shopId); if (!$result->isSuccess()){ parent::sendOutput($result->getData(),$result->getErrorCode()); } parent::sendOutput($result->getData()); } /** * Doc: (des="2.确定交接") * User: XMing * Date: 2020/9/1 * Time: 12:18 下午 */ public function confirmConnect() { $id = $this->request->param('request_id'); if (empty($id)){ parent::sendOutput('缺少id参数',ErrorCode::$paramError); } $offDutyTime = $this->request->param('offDutyTime'); if (empty($offDutyTime) || !is_numeric($offDutyTime)){ parent::sendOutput('offDutyTime参数错误',ErrorCode::$paramError); } $remark = $this->request->param('remark'); $result = $this->objMCashierPushMoneyDetail->confirmConnect($id,$offDutyTime,$remark); if (!$result->isSuccess()){ parent::sendOutput($result->getData(),$result->getErrorCode()); } parent::sendOutput($result->getData()); } /** * Doc: (des="3.收银登陆") * User: XMing * Date: 2020/9/1 * Time: 2:35 下午 */ public function loggerConnect() { $params = $this->request->getRawJson(); /*if (!isset($params['mobile']) || empty($params['mobile'])){ parent::sendOutput('mobile参数错误',ErrorCode::$paramError); }*/ if (!isset($params['shopId']) || empty($params['shopId'])){ parent::sendOutput('shopId参数错误',ErrorCode::$paramError); } $result = $this->objMCashierPushMoneyDetail->loggerConnect($params); if (!$result->isSuccess()){ parent::sendOutput($result->getData(),$result->getErrorCode()); } parent::sendOutput($result->getData()); } }