承接 apility/24sevenoffice 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

apility/24sevenoffice

Composer 安装命令:

composer require apility/24sevenoffice

包简介

A simple and independent connector for 24SevenOffice

README 文档

README

A simple and independent PHP webservice connector for the ERP system 24SevenOffice.

Full documentation

Se the full documentation for all services at developer.24sevenoffice.com.

Installation

composer require apility/24sevenoffice

Basic usage

Authenticating and getting a list of companies matching a search:

<?php

use Apility\T4SevenOffice\T4SevenOffice;

T4SevenOffice::setCredentials(
  'user@company.com', // username
  'yourpassword123', // password
  '00000000-0000-0000-0000-000000000000', // applicationId
  '00000000-0000-0000-0000-000000000000' // identityId (optional)
);

// By default, this is set to false, since you most likely would 
// like to save the sessionId from 24SevenOffice some other place
T4SevenOffice::setUsePhpSession(true);

try {
  
  T4SevenOffice::authenticateService();
  
  $companyService = T4SevenOffice::companyService();
  
  $companies = $companyService->GetCompanies([
    'searchParams' => ['CompanyName' => 'Test'],
    'returnProperties' => ['Name', 'Id']
  ]);
  
  var_dump($companies);
  
} catch (Exception $e) {
  die('24SevenOffice Exception: '.$e->getMessage());
}

Preserve session

To avoid authenticating with the webservice every time (and improve performance), you can save the sessionId from 24SevenOffice and use this as long as it is valid.

You can either use PHP Session for this:

<?php

// By default, this is set to false
T4SevenOffice::setUsePhpSession(true);

Or handle the sessionId on your own:

<?php

// Saved from last auth
$sessionId = 'demosw1avyg2h4opyi0demo';

T4SevenOffice::setSessionId($sessionId);

T4SevenOffice::authenticateService();

if ($sessionId !== T4SevenOffice::getSessionId) {
  // Session from last time is no longer valid, and a new one has been created
  // TODO: Save the new sessionId for next time
}

Listing all identities

<?php

T4SevenOffice::setCredentials(
  'user@company.com', // username
  'yourpassword123', // password
  '00000000-0000-0000-0000-000000000000' // applicationId
);

$authService = T4SevenOffice::authenticateService();
  
$identities = $authService->GetIdentities();
  
var_dump($identities);  
  

apility/24sevenoffice 适用场景与选型建议

apility/24sevenoffice 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 63 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 10 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 apility/24sevenoffice 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 apility/24sevenoffice 我们能提供哪些服务?
定制开发 / 二次开发

基于 apility/24sevenoffice 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 63
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-10-08