oxygensuite/oxygen-ergani
Composer 安装命令:
composer require oxygensuite/oxygen-ergani
包简介
A comprehensive package for seamlessly interacting with Greece’s Ergani system, enabling automated submissions for employee data such as check-ins, check-outs, and other employment-related information. This repository aims to simplify and streamline workforce management and ensure compliance with Gr
README 文档
README
A comprehensive PHP package for interacting with Greece's ERGANI II system, enabling automated submissions for employee data including work cards, hiring declarations, terminations, and more.
Features
- Work Cards - Employee check-in/check-out submissions
- Work Time Declarations - Daily and weekly work schedules
- Hiring Forms (E3) - New hires, modifications, deletions, and lending arrangements
- Internship Declarations (E3.5) - Internship and practical training submissions
- Termination Forms (E5) - Voluntary resignations, retirements, and death terminations
- Dismissal Forms (E6) - Employer-initiated terminations, transfers, and loan endings
- Fixed-Term Terminations (E7) - Contract expirations and early terminations
- Construction Forms (E12) - Construction work personnel declarations and censuses
- Employment Modifications (MA/MAD) - Changes to employment terms
- Overtime Declarations - Regular and retrospective overtime submissions
- Sixth Day Declarations - Sixth day / extra shift submissions
- Pre-Announcement Exemptions - Pre-announcement exemption declarations
- Query Services - Employer info, branch details, parameter lookups, and employee status
- PSR-16 Caching - Opt-in caching for service responses with bundled file-based and in-memory implementations
- Model Factories - Laravel-inspired factories generating valid Greek test data (AFM, AMKA, names)
- CLI Tools -
enum:checkandschema:checkto verify local code stays in sync with the live API
Requirements
- PHP ^8.2
- Guzzle HTTP ^7.9
- ERGANI credentials (username and password)
Installation
composer require oxygensuite/oxygen-ergani
Quick Start
1. Set Up Token Management
The package handles JWT authentication automatically. Configure it once at application boot:
use OxygenSuite\OxygenErgani\Storage\FileToken; use OxygenSuite\OxygenErgani\Storage\Token; use OxygenSuite\OxygenErgani\Enums\Environment; Token::setCurrentTokenManager( new FileToken('your-username', 'your-password'), Environment::TEST // or Environment::PRODUCTION );
2. Submit a Work Card
use OxygenSuite\OxygenErgani\Ergani; use OxygenSuite\OxygenErgani\Models\WorkCard\Card; use OxygenSuite\OxygenErgani\Models\WorkCard\CardDetail; use OxygenSuite\OxygenErgani\Enums\CardDetailType; $card = Card::make() ->setEmployerTin('999999999') ->setBranchCode(0) ->setComments('') ->addDetails( CardDetail::make() ->setTin('888888888') ->setLastName('DOE') ->setFirstName('JOHN') ->setType(CardDetailType::CHECK_IN) ->setReferenceDate(date('Y-m-d')) ->setDate(date('Y-m-d\TH:i:s.uP')) ); $ergani = new Ergani(); $response = $ergani->sendWorkCards($card); echo $response[0]->protocol; // e.g., 'ΕΥΣ92'
3. Submit a Hiring Declaration (E3)
use OxygenSuite\OxygenErgani\Ergani; use OxygenSuite\OxygenErgani\Models\Hiring\NewDeclaration; $declaration = NewDeclaration::make() ->setEmployerTin('999999999') ->setBranchCode(0) ->setLastName('ΠΑΠΑΔΟΠΟΥΛΟΣ') ->setFirstName('ΙΩΑΝΝΗΣ') ->setTin('888888888') ->setAmka('01018012345') ->setHiringDate('15/01/2025') // ... additional fields ->withDefaults(); // Fill remaining fields with empty strings $ergani = new Ergani(); $response = $ergani->sendHiringNew($declaration);
Documentation
Full documentation is available at oxygensuite.github.io/oxygen-ergani.
Guides
- Getting Started
- Token Management
- Work Cards
- Work Time Declarations
- Hiring Forms (E3)
- Termination Forms (E5)
- Dismissal Forms (E6)
- Fixed-Term Terminations (E7)
- Employment Modifications (MA/MAD)
- Construction Forms (E12)
- Sixth Day Declarations
- Pre-Announcement Exemptions
- Internship Declarations (E3.5)
- Query Services
- Error Handling
- Model Factories
- CLI Tools
API Reference
Upgrading
If you're upgrading from v1.x, please see the UPGRADING.md guide for breaking changes and migration instructions.
Development
# Install dependencies composer install # Run tests composer test # Static analysis (PHPStan level 7) composer analyse # Code style (PER) composer lint # Mutation testing composer infect # Run all checks composer check
Security
If you discover a security vulnerability, please send an email to security@oxygen.gr. All security vulnerabilities will be promptly addressed. Please see SECURITY.md for more details.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Changelog
Please see CHANGELOG.md for information about recent changes.
License
This package is open-source software licensed under the MIT License.
Copyright 2025 Oxygen Suite.
oxygensuite/oxygen-ergani 适用场景与选型建议
oxygensuite/oxygen-ergani 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 9, 最近一次更新时间为 2025 年 05 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「checkout」 「checkin」 「greece」 「ergani」 「ΕΡΓΑΝΗ」 「employee-card」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 oxygensuite/oxygen-ergani 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oxygensuite/oxygen-ergani 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 oxygensuite/oxygen-ergani 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Adds a 'checkout' to a SilverStripe site which links to an Estimate and adds the ability to setup and pay
Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
Viva Payments (Greece) driver for the Omnipay payment processing library
Add a simple webshop to your Laravel project
Customer notes for Contao Isotope eCommerce checkout.
Greek Regions Extension for Magento 2
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-18