Chengwu Low-Code: Automating Monthly Part-Time Payroll with Scheduled Tasks & Rule Engine

This article demonstrates how to build an automated monthly billing system for part-time payroll using the Chengwu low-code platform, leveraging Quartz scheduled tasks, LogicFlow process engine, Amis frontend forms, MySQL database, and notification modules to handle data aggregation, rule-based salary calculation, bill generation, user notifications, and audit trails.

Chengwu Tech Stack
Chengwu Tech Stack
Chengwu Tech Stack
Chengwu Low-Code: Automating Monthly Part-Time Payroll with Scheduled Tasks & Rule Engine

Introduction

In the era of the sharing economy and platform-based employment, more enterprises adopt monthly settlement to establish flexible cooperation with freelancers, part-time workers, or partners. Compared to traditional full-time payroll processes, platform-based settlement presents greater challenges, often involving:

Integration of multi-source task data;

Different settlement rules (unit price, commission, bonuses, etc.);

End-of-month statistics and beginning-of-month disbursement;

Precise bill generation and detailed records;

Disbursement reminders, reconciliation, and dispute windows.

To address this complex scenario, this article demonstrates how to build an automated monthly billing settlement system using the Chengwu low-code platform , combining scheduled tasks + process engine + automatic bill generation + page presentation + system notifications .

System Goals and Use Cases

Taking "part-time salary settlement" as an example, platform users include task executors, settlement administrators, and finance personnel:

Task executors: participate in crowdsourced tasks each month; the platform settles remuneration.

Settlement administrators: need to calculate each person's salary according to rules and generate bills.

Finance personnel: disburse salaries based on bills.

System: automatically generates bills, sends notifications, supports bill query and export.

The core process is summarized as follows:

On the 1st of each month at midnight, the system automatically aggregates the previous month's task data → calculates each person's payable salary according to rules → generates bill records → pushes to accounts → users can view and download bills.

System Architecture and Components

The Chengwu low-code platform provides the following components to build the system:

Component                 | Function Description
--------------------------|--------------------------------------------------
Quartz Scheduler          | Triggers the process at a fixed time each month (e.g., 1st of month at 00:00)
LogicFlow Process Engine  | Aggregates data, calculates salaries, writes bill records, notifies users
Amis Frontend Forms       | Employee bill list, bill details, export functionality
MySQL Database            | Stores task data, user info, salary rules, bill records
Notification Module       | Notifies users of new bills via in-app messages or email

The entire system adopts a "process-driven + data storage + page presentation" design pattern, fully supporting low-code visual configuration without traditional coding.

Scheduled Task Triggering: Monthly Automatic Payroll Process

1. Trigger Mechanism

The platform uses the built-in Quartz scheduler to automatically trigger the "Bill Generation Process" at 00:00 on the 1st of each month. In the Chengwu admin console, only simple configuration is needed:

Execution cycle: Cron expression 0 0 0 1 * ? (1st of month at 00:00)

Triggered process: bind "Part-time Salary Settlement Process"

Notification objects: automatically notify corresponding users after task completion

2. Task Parameters and Runtime Environment

The platform supports passing execution parameters to the process, such as "statistical period = last month", automatically calculating start and end dates to avoid manual maintenance. The system also records execution logs for each task in the background, facilitating administrator tracing of execution status, error information, and data change details.

Salary Settlement Logic Flow Design

Salary calculation is the core of this system. The Chengwu platform provides a visual process configurator allowing business personnel to configure the following logic via a graphical interface:

Flow Structure Diagram:

[Scheduled Trigger]
  ↓
[Query Last Month Task Data]
  ↓
[Aggregate Each Person's Task Volume]
  ↓
[Calculate Each Person's Salary (including subsidies/performance)]
  ↓
[Generate Bill Records and Write to Bill Table]
  ↓
[Send Bill Notifications]

Supported Logic Rules:

Merge calculation of tasks with different unit prices ;

Commission mode support (e.g., base price + commission);

Performance/penalty rule embedding (e.g., late deduction);

Disbursement status setting (unpaid, paid, reconciling);

Automatic generation of bill version numbers and audit logs .

All rules are implemented through a combination of "configurable parameter nodes + expression calculation + conditional judgment", avoiding hard-coding and ensuring rule flexibility.

Bill Table Design and Management

1. Bill Database Structure Example

Field          | Type      | Description
---------------|-----------|----------------------------------
id             | bigint    | Primary key
user_id        | varchar   | Employee ID
month          | varchar   | Bill month (e.g., 2025-07)
total_hours    | double    | Total hours
total_amount   | double    | Total salary amount
bonus          | double    | Performance bonus
penalty        | double    | Penalty deduction
final_amount   | double    | Actual disbursement amount
created_time   | datetime  | Generation time
status         | varchar   | Status (unpaid, paid)

Fields can be extended based on business complexity, such as "pre-tax/post-tax", "disbursement channel", "bill remarks", etc.

2. Process Output to Bill Table

Each user's bill data is written to the bill table via the process, and historical versions are recorded. The system automatically checks whether a bill for the current month has already been generated to avoid duplicate calculations.

Bill Display and User-Facing Pages

1. Amis Dynamic Page Configuration

After logging in, users can enter the "My Bills" module to view monthly salary bills. Typical page components include:

Month filter;

Bill list (paginated display);

Bill detail modal or page;

Export button (supports Excel or PDF);

Status indicator (color-coded "paid/pending").

Page field example:

Month   | Total Hours | Payable Amount | Actual Amount | Status | Download
--------|-------------|----------------|---------------|--------|---------
2025-06 | 132.5h      | ¥4800          | ¥4650         | Paid   | ⬇️
2025-07 | 98.0h       | ¥3600          | ¥3600         | Pending| —

Clicking a row reveals details including daily tasks, calculation rules, bonus breakdown, etc.

2. Bill Export and Dispute Function

The system supports exporting bills as PDF/Excel for printing or reconciliation. A "dispute entry" can also be attached, allowing employees to challenge bills, which are then reviewed by administrators.

Bill Distribution and Notification Mechanism

After bill generation, the platform uses the notification module for multi-channel reminders:

In-app message: prompts "This month's bill has been generated, please check";

Email notification (configurable enable/disable);

Future: planned integration of SMS push (paid module).

Notification content can be customized via Pebble templates, for example:

Hi {{name}},

Your part-time bill for this month has been generated:
Bill month: {{month}}
Actual amount: ¥{{final_amount}}

👉 Click to view: [Bill detail page link]

If you have any questions, please initiate a bill dispute within 3 days.

Notifications support variable references, dynamic time calculations, and jump link configuration.

Permission and Process Audit Management

To ensure bill security and accuracy, the platform also provides:

Permission control : ordinary users can only view their own bills; administrators can view all;

Process execution logs : each task trigger records executor, time, and generated data volume;

Version traceability : if a bill is modified, the system automatically records operator, time, and old value;

Reconciliation and disbursement status switching : finance can manually set bills to "paid", or the platform can integrate with payroll interfaces.

Summary and Future Extensions

Using the Chengwu low-code platform, we have built a platform-based monthly salary disbursement system that solves core issues of part-time settlement:

Scheduled automation : monthly automatic triggering without manual operation;

Strong rule flexibility : supports different pricing methods and various subsidy calculations;

Visual page management : users can self-service view, export, and dispute;

Clear data traceability : supports operation records and bill version management;

Multi-scenario adaptability : applicable to crowdsourcing platforms, educational institution part-time, medical outsourcing, etc.

Future extension directions include:

Integration with payment systems for one-click disbursement;

Encrypted payslip display supporting PDF encryption;

Introduction of data dashboards to show total disbursement, average salary, trend charts, etc.

The Chengwu low-code platform is not only suitable for enterprises to build internal systems, but also for platform-operated settlement system development, achieving true business automation through "process-driven + visual pages + scheduled scheduling".

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

low-codeMySQLprocess engineAMisnotification systemQuartzscheduled taskspayroll automation
Chengwu Tech Stack
Written by

Chengwu Tech Stack

A powerful mindset is a lifelong treasure!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.