PHPackages                             imactool/gjpzyx - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. imactool/gjpzyx

ActiveLibrary[API Development](/categories/api)

imactool/gjpzyx
===============

管家婆ERP 管家婆章鱼侠API

v1.0.0(4y ago)12453MITPHP

Since Sep 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/iMactool/gjpzyx)[ Packagist](https://packagist.org/packages/imactool/gjpzyx)[ RSS](/packages/imactool-gjpzyx/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

 gjpzyx
========

[](#-gjpzyx-)

 管家婆ERP 管家婆章鱼侠API.

由于项目里需要用到管家婆或者章鱼侠作为第三方仓库支持，但是 Google、GitHub 一番发现一条都木有。 所以就自己造了一个。 应该是目前第一个比较完善的支持 管家婆 ERP、章鱼侠 ERP 的第三方扩展包了。 使用本扩展之前，请务必确认你已经在 [管家婆-章鱼侠](http://help.mygjp.com/pages/viewpage.action?pageId=48660739) 获取了接口调用权限！

[![Latest Unstable Version](https://camo.githubusercontent.com/2dd4c627b672ee0151b7aca8b8acc43cbf87091eb13f6b300037d0cd47b5b0f4/68747470733a2f2f706f7365722e707567782e6f72672f696d6163746f6f6c2f676a707a79782f762f756e737461626c65)](//packagist.org/packages/imactool/gjpzyx) [![License](https://camo.githubusercontent.com/e0c0c283b55117436eb964844b0b38fbd92230c3043ab5889c0f26da4755457d/68747470733a2f2f706f7365722e707567782e6f72672f696d6163746f6f6c2f676a707a79782f6c6963656e7365)](//packagist.org/packages/imactool/gjpzyx) [![Total Downloads](https://camo.githubusercontent.com/478a2166ba27c1665a33b199894453f7d52a9df6ec9c30f40c686ecb9134c63b/68747470733a2f2f706f7365722e707567782e6f72672f696d6163746f6f6c2f676a707a79782f646f776e6c6f616473)](//packagist.org/packages/imactool/gjpzyx) [![.gitattributes](https://camo.githubusercontent.com/239c3ccbf722dc9c340128b3009e09e43ad900f8efae47bd32f89c0ef7a15336/68747470733a2f2f706f7365722e707567782e6f72672f696d6163746f6f6c2f676a707a79782f67697461747472696275746573)](//packagist.org/packages/imactool/gjpzyx)

Installing
----------

[](#installing)

```
$ composer require imactool/gjpzyx:dev-main -vvv
```

具体索要参数和返回参数请按产品文档查阅

管家婆ERP文档：[点我查看](http://help.mygjp.com/pages/viewpage.action?pageId=48660745)

章鱼侠ERP文档：[点我查看](http://help.zhangyuxia.com.cn/pages/viewpage.action?pageId=48660745)

Usage
-----

[](#usage)

### 管家婆

[](#管家婆)

- 初始化

```
require './vendor/autoload.php';
use Imactool\Gjpzyx\Factory;

$config = [
    'debug'=>false, //是否在测试环境下测试,线上必须设置 false
    'appKey' 	=> '',
    'appSecret' => '',
    'signKey'   => '',
    'token'		=> '',
    'shopKey'	=> '',
    //公司名称
    'CompanyName'=>'',
    //用户名
    'UserId'	=> '',
    //密码
    'Password'	=> '',
    'refreshToken' => '',
    //线上登录获取授权认证码的地址
    'loginUrl'=>'',
    //线上接口调用的地址
    'apiUrl'=>'http://ca.mygjp.com:8002/api/', //注意，需要 / 结尾
    //线上章鱼侠云erp登录地址
    'onlineLoginUrl'=>''
];

$app = Factory::Gjp($config);
如果是章鱼侠ERP
$app = Factory::Zyx($config);
其他调用方式都是一模一样
```

- querySaleQty() 批量获取ERP商品基本资料的库存信息

```
$parsm = [
    'numid'=>'324324324324',
    'ktypeids'=>[154274961429839227,154274961429839299],
    'iscalcsaleqty'=>true,
    'pagesize'=>100,
    'pageno' => 1
];
$productquery = $app->querySaleQty($parsm);
```

- pushStoreInfo() 上载门店信息

```
$storeArr = [
	'Id' =>1,
	'storecode'=>'sdf',
	'storename'=>'测试',
	'storetype'=>3,
	'image'=>'',
	'storephonenumber'=>'18355522221',
	'storeaddress'=>'门店地址'
];

$store = $app->pushStoreInfo($storeArr);
```

- pushOrderRefund() 售后单添加

```
$refundOrder = [
	'refundnumber' =>'1154654656151',
	'tradeid'=>'123123151561561',
	'refundcreatetime'=>'2017-07-11 11:11:11',
	'refundtype'=>0,
	'refundstatus'=>1,
	'oid'=>'2345446546',
	'qty'=>1,
    'refundfee'=>100,
    //...其他参数
];

$result = $app->pushOrderRefund($refundOrder);
```

管家婆API 列表
---------

[](#管家婆api-列表)

### 商品管理

[](#商品管理)

- pushProduct() 宝贝上载
- queryProduct() 商品详情查询

### 订单交易

[](#订单交易)

- pushOrder() 订单批量上载/更新接口
- queryOrderStatus() 查询订单处理状态
- querySaleOrder() 订单查询

### 售后场景

[](#售后场景)

- pushOrderRefund() 售后单上载
- queryOrderRefund() 售后详情查询

### 库存管理

[](#库存管理)

- queryQtyInfo() 仓库详情查询
- querySaleQty() 商品库存查询
- queryMoreSaleQty() 批量库存查询

### 全渠道场景/门店

[](#全渠道场景门店)

- pushStoreInfo() 门店信息上载

---

分割线： 目前由于章鱼侠相关的测试接口无法正常使用。暂不支持。管家婆相关接口正常

---

\##章鱼侠 API 列表

### 商品管理

[](#商品管理-1)

- pushProduct() 宝贝上载
- queryProduct() 商品详情查询

### 订单交易

[](#订单交易-1)

- pushOrder() 订单批量上载/更新接口
- queryOrderStatus() 查询订单处理状态
- querySaleOrder() 订单查询

### 售后场景

[](#售后场景-1)

- pushOrderRefund() 售后单上载
- queryOrderRefund() 售后详情查询

### 库存管理

[](#库存管理-1)

- queryQtyInfo() 仓库详情查询
- querySaleQty() 商品库存查询
- queryMoreSaleQty() 批量库存查询

### 全渠道场景/门店

[](#全渠道场景门店-1)

- pushStoreInfo() 门店信息上载

TODO

- 目前参数没有做过滤处理
- 文档完善
- 代码完善
- tests

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/imactool/gjpzyx/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/imactool/gjpzyx/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1707d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d02de825a190aeefdb36c0f9296cf7acfcfb3e821e0bc50a822a8d1d1007dc8a?d=identicon)[imactool](/maintainers/imactool)

---

Top Contributors

[![iMactool](https://avatars.githubusercontent.com/u/3078413?v=4)](https://github.com/iMactool "iMactool (6 commits)")

---

Tags

erpguangjiapophpapiphp-sdk管家婆ERP open api

### Embed Badge

![Health badge](/badges/imactool-gjpzyx/health.svg)

```
[![Health](https://phpackages.com/badges/imactool-gjpzyx/health.svg)](https://phpackages.com/packages/imactool-gjpzyx)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[signnow/api-php-sdk

Library to communicate with SignNow API

11138.0k](/packages/signnow-api-php-sdk)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[leapfu/cloud-printer

高扩展性云小票打印SDK，支持飞鹅云、芯烨云、易联云、快递100、映美云、佳博云、中午云、优声云等主流云打印服务，兼容 Laravel、ThinkPHP 等主流框架，统一API，易集成，易扩展。

104.5k](/packages/leapfu-cloud-printer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
