Sometime, after workflow approved or ended, data need to update to 3rd party system
Outsend type -> URL
Outsend address -> the php file path
Reimbursement workflow complete, generate finance voucher in accouting system
Leave application completed, update leave days in HR system
Here is an example to outsend data for license generate
2 Salary item from file
2.1 Original Requirements:
Calculate lunch allowance, night shift allowance, and weekend holiday lunch meals.
2.2 Requirement details :
Monday to Sunday, mid-shift : 16:00 to 0:00, work for 3 consecutive hours, then the allowance is 15 yuan (17:00 to 19:00 is also counted as 15 yuan, because there is a meal time);
Monday to weekend, night shift: 0:00 to 8:30, work for 3 consecutive hours, then the subsidy is 20 yuan;
weekend, noon: 9:30 to 12:30, work 3 hours, then the subsidy of 20 yuan;
production synthesis department shift system, day shift: 8:30 to 20:30 (15 yuan). This if it is Saturday and Sunday overtime (9:30-12:30), lunch 20 yuan is to be given. That is: Monday to Friday day shift: 8:30 to 20:30 ($15), Saturday and Sunday day shift: 8:30 to 20:30 ($15+20=35).
2.3 Remarks:
overtime clocking problems, cell phone and time machine clocking in and out signing in at the latest time to start counting, signing out at the earliest time to start counting.
2.4 Demand analysis:
Use the "payroll items from the file", in the two-open file, according to the personnel attendance data, statistics out of the "need for meal allowances / allowances" and return;
Calculate the "number of allowances" by the "amount of allowance" using the formula to get the value of the allowance.
<?php
/**
* This example is limited to PHP development language, also supports external system interfaces, or interfaces developed in other languages, if you open the data validation file validation and configuration of the current file address, the process flow will run some of the parameters of the process and the form data are passed to the file, through the $_REQUEST can be exported to see all the incoming parameters.
*/
// Framework startup file for the framework of the startup and auto-load configuration, if the entire code logic is not used in the framework of the method, you do not need to introduce this file, the introduction of this file path needs to be adjusted according to the current location of the file stored, if it is in accordance with the current validation of the address of the path stored in the example, according to the example of the relative path can be.
require __DIR__ . '/../../bootstrap/app.php';
// If the code needs to operate the database, you can selectively introduce this facade, the specific operation of the database method see Laravel documentation: https://laravelacademy.org/post/22012; if the address is invalid, you can search for Laravel documentation to check.
use Illuminate\Support\Facades\DB;
/**
* Data Validation File Validation Address Configuration Example: /eoffice/server/ext/customer_name/data_validate_example.php?check_control_id=DATA_1
* 1、File Address Path Note: The customer_name in the path is recommended to use the full spelling of the customer's name or abbreviation, or named according to the role of the demand, as far as possible to ensure that the folder name uniqueness, do not conflict with the name of the folder under the ext directory, to avoid subsequent upgrades to the system to cover or delete the folder.
* 2、File address parameter description: address parameter configuration is optional, check_control_id here to provide an example of parameters, such as the current development of the file need to reuse different processes, different processes need to determine the form control ID or need to query the data table fields are different, you can configure the address parameter configuration passed in to achieve the file reuse.
*/
// Get the parameters configured on the file address
$checkControlId = $_REQUEST['check_control_id'] ?? 'DATA_1'; // Parameters can be obtained if they are configured on the file address.
// Getting incoming data
$checkControlIdData = $_REQUEST[$checkControlId] ?? ''; // If you configure a parameter on the file address, get the ID of the configured form control or table name, table field, etc., and then use this parameter to get the corresponding data in the incoming parameter.
$checkControlIdData = $_REQUEST['DATA_1'] ?? ''; // Or get process form data directly.
// database operation example
$list = DB::table('xxx')->select('xxx')->where('xxx')->get();
// data process, code here base on real business requirement
// return result example
echo 1;exit; // pass
echo 'true';exit; // pass
echo 'xxx';exit; // Beside 1 and 'true',Returns all other content for the verification does not pass, if the data verification is not configured to prompt the content of the text, the content returned at this time will be used as a reminder of the information, if the data verification is configured to prompt the text of the configured text prompts.
?>