{"id":27192234,"url":"https://github.com/imactool/gjpzyx","last_synced_at":"2025-04-09T18:44:13.693Z","repository":{"id":47186919,"uuid":"315814217","full_name":"iMactool/gjpzyx","owner":"iMactool","description":"应该是目前第一个比较完善的支持 管家婆 ERP、章鱼侠 ERP 的第三方扩展包了","archived":false,"fork":false,"pushed_at":"2021-09-22T09:13:09.000Z","size":24,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-20T02:43:21.305Z","etag":null,"topics":["erp","guangjiapo","php"],"latest_commit_sha":null,"homepage":"https://imactool.github.io/gjpzyx/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iMactool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-25T03:05:49.000Z","updated_at":"2024-05-02T16:43:19.000Z","dependencies_parsed_at":"2022-08-21T12:50:51.815Z","dependency_job_id":null,"html_url":"https://github.com/iMactool/gjpzyx","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fgjpzyx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fgjpzyx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fgjpzyx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fgjpzyx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMactool","download_url":"https://codeload.github.com/iMactool/gjpzyx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248090734,"owners_count":21046141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erp","guangjiapo","php"],"created_at":"2025-04-09T18:44:12.897Z","updated_at":"2025-04-09T18:44:13.679Z","avatar_url":"https://github.com/iMactool.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e gjpzyx \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e 管家婆ERP 管家婆章鱼侠API.\u003c/p\u003e\n由于项目里需要用到管家婆或者章鱼侠作为第三方仓库支持，但是 Google、GitHub 一番发现一条都木有。\n所以就自己造了一个。\n\n应该是目前第一个比较完善的支持 管家婆 ERP、章鱼侠 ERP 的第三方扩展包了。\n使用本扩展之前，请务必确认你已经在 [管家婆-章鱼侠](http://help.mygjp.com/pages/viewpage.action?pageId=48660739) 获取了接口调用权限！\n\n[![Latest Unstable Version](https://poser.pugx.org/imactool/gjpzyx/v/unstable)](//packagist.org/packages/imactool/gjpzyx) [![License](https://poser.pugx.org/imactool/gjpzyx/license)](//packagist.org/packages/imactool/gjpzyx) [![Total Downloads](https://poser.pugx.org/imactool/gjpzyx/downloads)](//packagist.org/packages/imactool/gjpzyx) [![.gitattributes](https://poser.pugx.org/imactool/gjpzyx/gitattributes)](//packagist.org/packages/imactool/gjpzyx)\n\n## Installing\n\n```shell\n$ composer require imactool/gjpzyx:dev-main -vvv\n```\n\n具体索要参数和返回参数请按产品文档查阅\n\n管家婆ERP文档：[点我查看](http://help.mygjp.com/pages/viewpage.action?pageId=48660745)\n\n章鱼侠ERP文档：[点我查看](http://help.zhangyuxia.com.cn/pages/viewpage.action?pageId=48660745)\n\n## Usage\n\n### 管家婆\n\n- 初始化\n\n```php\n\nrequire './vendor/autoload.php';\nuse Imactool\\Gjpzyx\\Factory;\n\n$config = [\n    'debug'=\u003efalse, //是否在测试环境下测试,线上必须设置 false\n    'appKey' \t=\u003e '',\n    'appSecret' =\u003e '',\n    'signKey'   =\u003e '',\n    'token'\t\t=\u003e '',\n    'shopKey'\t=\u003e '',\n    //公司名称\n    'CompanyName'=\u003e'',\n    //用户名\n    'UserId'\t=\u003e '',\n    //密码\n    'Password'\t=\u003e '',\n    'refreshToken' =\u003e '',\n    //线上登录获取授权认证码的地址\n    'loginUrl'=\u003e'',\n    //线上接口调用的地址\n    'apiUrl'=\u003e'http://ca.mygjp.com:8002/api/', //注意，需要 / 结尾\n    //线上章鱼侠云erp登录地址\n    'onlineLoginUrl'=\u003e''\n];\n \n$app = Factory::Gjp($config);\n如果是章鱼侠ERP\n$app = Factory::Zyx($config);\n其他调用方式都是一模一样\n```\n   \n- querySaleQty() 批量获取ERP商品基本资料的库存信息 \n\n```php\n\n$parsm = [\n    'numid'=\u003e'324324324324',\n    'ktypeids'=\u003e[154274961429839227,154274961429839299],\n    'iscalcsaleqty'=\u003etrue,\n    'pagesize'=\u003e100,\n    'pageno' =\u003e 1\n];\n$productquery = $app-\u003equerySaleQty($parsm);\n\n\n```\n\n- pushStoreInfo() 上载门店信息\n\n```php\n$storeArr = [\n\t'Id' =\u003e1,\n\t'storecode'=\u003e'sdf',\n\t'storename'=\u003e'测试',\n\t'storetype'=\u003e3,\n\t'image'=\u003e'',\n\t'storephonenumber'=\u003e'18355522221',\n\t'storeaddress'=\u003e'门店地址'\n];\n\n$store = $app-\u003epushStoreInfo($storeArr);\n\n```\n\n- pushOrderRefund()  售后单添加\n\n```php\n$refundOrder = [\n\t'refundnumber' =\u003e'1154654656151',\n\t'tradeid'=\u003e'123123151561561',\n\t'refundcreatetime'=\u003e'2017-07-11 11:11:11',\n\t'refundtype'=\u003e0,\n\t'refundstatus'=\u003e1,\n\t'oid'=\u003e'2345446546',\n\t'qty'=\u003e1,\n    'refundfee'=\u003e100,\n    //...其他参数\n];\n\n$result = $app-\u003epushOrderRefund($refundOrder);\n\n```\n\n## 管家婆API 列表\n\n### 商品管理\n- pushProduct() 宝贝上载 \n- queryProduct() 商品详情查询 \n\n### 订单交易\n- pushOrder() 订单批量上载/更新接口\n- queryOrderStatus() 查询订单处理状态\n- querySaleOrder() 订单查询\n\n### 售后场景\n- pushOrderRefund() 售后单上载\n- queryOrderRefund() 售后详情查询\n\n### 库存管理\n- queryQtyInfo() 仓库详情查询\n- querySaleQty() 商品库存查询\n- queryMoreSaleQty() 批量库存查询\n\n### 全渠道场景/门店\n- pushStoreInfo() 门店信息上载\n\n---- \n\n分割线： 目前由于章鱼侠相关的测试接口无法正常使用。暂不支持。管家婆相关接口正常\n\n---- \n\n##章鱼侠 API 列表\n\n### 商品管理\n- pushProduct() 宝贝上载\n- queryProduct() 商品详情查询\n\n### 订单交易\n- pushOrder() 订单批量上载/更新接口\n- queryOrderStatus() 查询订单处理状态\n- querySaleOrder() 订单查询\n\n### 售后场景\n- pushOrderRefund() 售后单上载\n- queryOrderRefund() 售后详情查询\n\n### 库存管理\n- queryQtyInfo() 仓库详情查询\n- querySaleQty() 商品库存查询\n- queryMoreSaleQty() 批量库存查询\n\n### 全渠道场景/门店\n- pushStoreInfo() 门店信息上载\n\n\nTODO\n\n- 目前参数没有做过滤处理\n- 文档完善\n- 代码完善\n- tests\n\n\n## Contributing\n\nYou can contribute in one of three ways:\n\n1. File bug reports using the [issue tracker](https://github.com/imactool/gjpzyx/issues).\n2. Answer questions or fix bugs on the [issue tracker](https://github.com/imactool/gjpzyx/issues).\n3. Contribute new features or update the wiki.\n\n_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._\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimactool%2Fgjpzyx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimactool%2Fgjpzyx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimactool%2Fgjpzyx/lists"}