示例#1
0
    if ($requestMethod == 'POST') {
        $postBody = @file_get_contents('php://input');
        $requestData = json_decode($postBody, true);
    }
}
extract($requestData);
$requestHandler = new RequestHandler();
switch ($request) {
    case 'getJournalStatus':
        $result = $requestHandler->getJournalStatus();
        break;
    case 'createDuty':
        $result = $requestHandler->createDuty();
        break;
    case 'completeRunUp':
        $result = $requestHandler->completeRunUp();
        break;
    case 'completeDuty':
        $result = $requestHandler->completeDuty();
        break;
    case 'getDutyList':
        $result = $requestHandler->getDutyList($offset, $pageSize, json_decode($sort, true));
        break;
    case 'getProvisionsData':
        $result = $requestHandler->getProvisionsData(json_decode($sort, true));
        break;
    case 'getProvisionsItems':
        $result = $requestHandler->getProvisionsItems(json_decode($sort, true));
        break;
    case 'saveProvisionsItem':
        $result = $requestHandler->saveProvisionsItem($item, $sort);