Organizational Architecture Interface Definition
Download OpenAPI specification:Download
Service interface provided by organizational structure:
Query the personnel details of the specified number
Query personnel details according to the personnel number, code is required, and only valid (not deleted) data can be queried
Authorizations:
path Parameters
personCode required | string Personnel number, required (exact match) |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "code": "zhangsan",
- "name": "Zhang San",
- "valid": 1,
- "gender": {
- "code": "male",
- "name": "male"
}, - "status": {
- "code": "onWork",
- "name": "Working"
}, - "mainPosition": {
- "code": "developPosition",
- "name": "R&D Post"
}, - "entryDate": "2021-05-28",
- "title": {
- "code": "primary",
- "name": "Elementary"
}, - "qualification": "string",
- "education": {
- "code": "doctor",
- "name": "Doctor"
}, - "major": "Computer Major",
- "idNumber": "130971199809121011",
- "departments": [
- {
- "name": "Technology Department",
- "code": "tecDept"
}
], - "companies": [
- {
- "name": "Technology Company",
- "code": "tecCom"
}
], - "user": {
- "username": "zhangsan"
}, - "positions": [
- {
- "name": "Technical Post",
- "code": "tecPos"
}
], - "modifyTime": "2021-01-26T16:02:15.666+0000"
}
Query the company details of the specified code
Query company details according to company code, only valid (not deleted) data can be queried
Authorizations:
path Parameters
companyCode required | string Company code, required |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "code": "developCompany",
- "parentCode": "default_company",
- "fullName": "Hangzhou R&D Company",
- "shortName": "R&D Company",
- "description": "The research and development company is located in Hangzhou, Zhejiang Province",
- "tags": [
- "develop",
- "hangzhou"
], - "fullPath": "/Group/R&D Company",
- "layNo": 2,
- "sort": 678.23,
- "valid": 1,
- "modifyTime": "2021-01-26T16:02:15.666+0000"
}
Query the personnel list of the company with the specified code
Query the personnel list under the company according to the company code. The personnel list supports fuzzy matching through keyword parameters (personnel code or personnel name), and the query returns valid (not deleted) data. Sorting method: by default, it is in reverse order of update time.
Authorizations:
path Parameters
companyCode required | string <= 50 characters Company code, required |
query Parameters
keyword | string <= 50 characters Example: keyword=person01
|
current required | integer >= 1 Default: 1 The number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements to return per page (default 20, max 500) |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "code": "zhangsan",
- "name": "Zhang San",
- "valid": 1,
- "gender": {
- "code": "male",
- "name": "male"
}, - "status": {
- "code": "onWork",
- "name": "Working"
}, - "mainPosition": {
- "code": "developPosition",
- "name": "R&D Post"
}, - "entryDate": "2021-05-28",
- "title": {
- "code": "primary",
- "name": "Elementary"
}, - "qualification": "string",
- "education": {
- "code": "doctor",
- "name": "Doctor"
}, - "major": "Computer Major",
- "idNumber": "130971199809121011",
- "departments": [
- {
- "name": "Technology Department",
- "code": "tecDept"
}
], - "companies": [
- {
- "name": "Technology Company",
- "code": "tecCom"
}
]
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Query the job details of the specified code
Query job details according to the job code, only valid (not deleted) data can be queried
Authorizations:
path Parameters
positionCode required | string Position code, required |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "parentCode": "technologyPosition",
- "code": "developPosition",
- "name": "R&D position",
- "valid": 1,
- "modifyTime": "2021-01-26T16:02:15.666+0000",
- "department": {
- "code": "tecDep",
- "name": "Technical Department"
}, - "company": {
- "code": "tecCompany",
- "shortName": "R&D Company",
- "fullName": "Hangzhou R&D Company"
}, - "description": "R&D positions of Hangzhou R&D Company",
- "fullPath": "/technical position/R&D position",
- "layNo": 2,
- "sort": 678.23,
- "roles": [
- {
- "name": "System Administrator",
- "code": "systemRole"
}
]
}
Query the personnel list of the position with the specified code
Query the list of personnel under the position according to the position code. The personnel list supports fuzzy matching through keyword parameters (personnel code or personnel name), and the query returns valid (not deleted) data. Sorting method: by default, it is in reverse order of update time.
Authorizations:
path Parameters
positionCode required | string <= 50 characters Position code, required |
query Parameters
keyword | string <= 50 characters Example: keyword=person01
|
current required | integer >= 1 Default: 1 The number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements to return per page (default 20, max 500) |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "code": "zhangsan",
- "name": "Zhang San",
- "valid": 1,
- "gender": {
- "code": "male",
- "name": "male"
}, - "status": {
- "code": "onWork",
- "name": "Working"
}, - "mainPosition": {
- "code": "developPosition",
- "name": "R&D Post"
}, - "entryDate": "2021-05-28",
- "title": {
- "code": "primary",
- "name": "Elementary"
}, - "qualification": "string",
- "education": {
- "code": "doctor",
- "name": "Doctor"
}, - "major": "Computer Major",
- "idNumber": "130971199809121011",
- "departments": [
- {
- "name": "Technology Department",
- "code": "tecDept"
}
], - "companies": [
- {
- "name": "Technology Company",
- "code": "tecCom"
}
]
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Query the department details of the specified code
Query department details according to department code, only valid (not deleted) data can be queried
Authorizations:
path Parameters
departmentCode required | string Department code, required |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "parentCode": "technologyDepartment",
- "code": "developDepartment",
- "name": "R&D department",
- "deptType": {
- "code": "general",
- "name": "Common department"
}, - "description": "R&D Department of Hangzhou R&D Company",
- "fullPath": "/technical department/R&D department",
- "layNo": 2,
- "sort": 678.23,
- "valid": 1,
- "modifyTime": "2021-01-26T16:02:15.666+0000",
- "company": {
- "code": "tecCompany",
- "shortName": "R&D company",
- "fullName": "Hangzhou R&D Company"
}, - "managers": [
- {
- "name": "Lisi",
- "code": "lisi"
}
], - "positions": [
- {
- "name": "developPosition",
- "code": "R&D position"
}
]
}
Query the personnel list of the department with the specified code
Query the personnel list under the department according to the department code. The personnel list supports fuzzy matching through keyword parameters (personnel code or personnel name), and the query returns valid (not deleted) data. Sorting method: by default, it is in reverse order of update time.
Authorizations:
path Parameters
departmentCode required | string <= 50 characters Department code, required |
query Parameters
keyword | string <= 50 characters Example: keyword=person01
|
current required | integer >= 1 Default: 1 The number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements to return per page (default 20, max 500) |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "code": "zhangsan",
- "name": "Zhang San",
- "valid": 1,
- "gender": {
- "code": "male",
- "name": "male"
}, - "status": {
- "code": "onWork",
- "name": "Working"
}, - "mainPosition": {
- "code": "developPosition",
- "name": "R&D Post"
}, - "entryDate": "2021-05-28",
- "title": {
- "code": "primary",
- "name": "Elementary"
}, - "qualification": "string",
- "education": {
- "code": "doctor",
- "name": "Doctor"
}, - "major": "Computer Major",
- "idNumber": "130971199809121011",
- "departments": [
- {
- "name": "Technology Department",
- "code": "tecDept"
}
], - "companies": [
- {
- "name": "Technology Company",
- "code": "tecCom"
}
]
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Query company list
Query the company list in batches. The company list supports fuzzy matching through keyword parameters (company code or company name). When the "modifyTime" parameter is not passed, it is a full data query (excluding deleted data). When When the "modifyTime" parameter is passed, it is to query incremental data. Incremental query includes deleted data and is used for company data synchronization between systems. Company data greater than this time can be incrementally synchronized according to the last modification time parameter. The sorting method is: First sort by the company level layNo, and then sort by the sort field sort.
Authorizations:
query Parameters
current required | integer >= 1 Default: 1 Number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements returned per page (default 20, maximum 500) |
modifyTime | string Last modification time (the time format must have a time zone), the format is: "yyyy-MM-dd'T'HH:mm:ss.SSSZ", for example: zero time zone time: "2021- 01-26T16:02:15.666+0000", East Eighth District time: "2021-01-26T16:02:15.666+0800", you can query company data greater than this time. |
keyword | string <= 200 characters
|
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "code": "developCompany",
- "parentCode": "default_company",
- "fullName": "Hangzhou R&D Company",
- "shortName": "R&D Company",
- "description": "The research and development company is located in Hangzhou, Zhejiang Province",
- "tags": [
- "develop",
- "hangzhou"
], - "fullPath": "/Group/R&D Company",
- "layNo": 2,
- "sort": 678.23,
- "valid": 1,
- "modifyTime": "2021-01-26T16:02:15.666+0000"
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Query department list
Query the department list (without distinguishing companies). The department list supports fuzzy matching through the keyword parameter (department code or department name). When the "modifyTime" parameter is not passed, it is a full data query (excluding deleted) data), when the "modifyTime" parameter is passed to query incremental data, the incremental query contains deleted data, which is used for departmental data synchronization, and the data greater than this time can be incrementally synchronized according to the last modification time parameter, sorted Method: first sort according to the department level layNo, and then sort according to the sort field sort.
Authorizations:
query Parameters
current required | integer >= 1 Default: 1 Number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements to return per page (default 20, max 500) |
modifyTime | string Last modified time (the time format must include a time zone), the format is: "yyyy-MM-dd'T'HH:mm:ss.SSSZ", for example: zero time zone time: "2021-01-26T16: 02:15.666+0000", East Eighth District time: "2021-01-26T16:02:15.666+0800", you can query department data greater than this time. |
filterVirtual | boolean Default: false Whether to filter virtual personnel, the default is not to filter, and if this parameter is not passed, the default is false to not filter |
keyword | string <= 200 characters
|
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "parentCode": "technologyDepartment",
- "code": "developDepartment",
- "name": "R&D department",
- "deptType": {
- "code": "general",
- "name": "Common Department"
}, - "description": "R&D Department of Hangzhou R&D Company",
- "fullPath": "/technical department/R&D department",
- "layNo": 2,
- "sort": 678.23,
- "valid": 1,
- "modifyTime": "2021-01-26T16:02:15.666+0000",
- "company": {
- "code": "tecCompany",
- "shortName": "R&D Company",
- "fullName": "Hangzhou R&D Company"
}, - "managers": [
- {
- "name": "Li Si",
- "code": "lisi"
}
]
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Query Job List
Query the job list (without distinguishing companies). The job list supports fuzzy matching through keyword parameters (job code or job name). When the "modifyTime" parameter is not passed, it is a full data query (excluding deleted ones) data), when the "modifyTime" parameter is passed to query incremental data, the deleted data is included in the incremental query, which is used for position data synchronization, and the data greater than this time can be incrementally synchronized according to the last modification time parameter. Sorting method: first sort according to the position level layNo, and then sort according to the sort field sort.
Authorizations:
query Parameters
current required | integer >= 1 Default: 1 Number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements returned per page (default 20, maximum 500) |
modifyTime | string Last modification time (the time format must have a time zone), the format is: "yyyy-MM-dd'T'HH:mm:ss.SSSZ", for example: zero time zone time: "2021- 01-26T16:02:15.666+0000", East Eighth District time: "2021-01-26T16:02:15.666+0800", you can query the position data greater than this time. |
filterVirtual | boolean Default: false Whether to filter virtual personnel, the default is not to filter, and if this parameter is not passed, the default is false to not filter |
keyword | string <= 200 characters
|
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "parentCode": "technologyPosition",
- "code": "developPosition",
- "name": "R&D position",
- "valid": 1,
- "modifyTime": "2021-01-26T16:02:15.666+0000",
- "department": {
- "code": "tecDep",
- "name": "Technical Department"
}, - "company": {
- "code": "tecCompany",
- "shortName": "R&D Company",
- "fullName": "Hangzhou R&D Company"
}, - "description": "R&D positions of Hangzhou R&D Company",
- "fullPath": "/technical position/R&D position",
- "layNo": 2,
- "sort": 678.23
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Query Personnel List
Query personnel list (without distinguishing companies). The personnel list supports fuzzy matching query through keyword parameters (personnel code or personnel name). When the "modifyTime" parameter is not passed, it is a full data query (excluding already Deleted data), when the "modifyTime" parameter is passed to query incremental data, the incremental query includes deleted data, which is used for personnel data synchronization, and the data greater than this time can be incrementally synchronized according to the last modification time parameter , sorting method: by default, it is in reverse order of update time.
Authorizations:
query Parameters
current required | integer >= 1 Default: 1 Number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements to return per page (default 20, max 500) |
keyword | string <= 50 characters Example: keyword=person01
|
modifyTime | string Last modification time (the time format must have a time zone), the format is: "yyyy-MM-dd'T'HH:mm:ss.SSSZ", for example: zero time zone time: "2021- 01-26T16:02:15.666+0000", East Eighth District time: "2021-01-26T16:02:15.666+0800", you can query personnel data greater than this time. |
filterVirtual | boolean Default: false Whether to filter virtual personnel, the default is not to filter, if this parameter is not passed, the default is false to not filter |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "code": "zhangsan",
- "name": "Zhang San",
- "valid": 1,
- "gender": {
- "code": "male",
- "name": "male"
}, - "status": {
- "code": "onWork",
- "name": "Working"
}, - "mainPosition": {
- "code": "developPosition",
- "name": "R&D Post"
}, - "entryDate": "2021-05-28",
- "title": {
- "code": "primary",
- "name": "Elementary"
}, - "qualification": "string",
- "education": {
- "code": "doctor",
- "name": "Doctor"
}, - "major": "Computer Major",
- "idNumber": "130971199809121011",
- "departments": [
- {
- "name": "Technology Department",
- "code": "tecDept"
}
], - "companies": [
- {
- "name": "Technology Company",
- "code": "tecCom"
}
], - "user": {
- "username": "zhangsan"
}, - "positions": [
- {
- "name": "Technical Post",
- "code": "tecPos"
}
], - "modifyTime": "2021-01-26T16:02:15.666+0000"
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Query the department list of the company with the specified code
- Query the department list under the company according to the company code, and only valid (not deleted) data can be queried. The sorting method: first sort according to the company level layNo, and then sort according to the sort field sort.
- If passed userName parameter, then query the department list associated with the user under the specified company
Authorizations:
path Parameters
companyCode required | string Company code, required |
query Parameters
username | string User name, not required, when userName is passed, query the list of departments associated with the user under the specified company |
current required | integer The number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements to return per page (default 20, max 500) |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "parentCode": "technologyDepartment",
- "code": "developDepartment",
- "name": "R&D department",
- "deptType": {
- "code": "general",
- "name": "Common department"
}, - "valid": 1,
- "company": {
- "code": "tecCompany",
- "shortName": "R&D company",
- "fullName": "Hangzhou R&D Company"
}, - "fullPath": "/technical department/R&D department"
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Query the job list of the company with the specified code
Query the job list under the company according to the company code, and only valid (not deleted) data can be queried. The sorting method: first sort according to the company level layNo, and then sort according to the sorting field sort.
Authorizations:
path Parameters
companyCode required | string Company code, required |
query Parameters
current required | integer Number of pages to turn, starting from 1 |
pageSize | integer <= 500 Default: 20 Number of elements returned per page (default 20, maximum 500) |
header Parameters
Accept-Language | string <= 8 characters Example: zh-cn Internationalized language (depending on the language, the system code value returns content in different languages), the default is the server operating system language. English is en-us, Chinese is zh-cn. |
Responses
Response samples
- 200
- 400
{- "list": [
- {
- "parentCode": "technologyPosition",
- "code": "developPosition",
- "name": "R&D position",
- "department": {
- "code": "developDept",
- "name": "R&D Department"
}, - "valid": 1,
- "company": {
- "code": "tecCompany",
- "shortName": "R&D Company",
- "fullName": "Hangzhou R&D Company"
}, - "fullPath": "/technical position/R&D position"
}
], - "pagination": {
- "total": 1,
- "pageSize": 20,
- "current": 1
}
}
Add, modify and delete companies in batches
- In the company request body, add, delete, or modify data with the same code, and process it according to the logic of modification, deletion, and addition
- Add company rules in batches
- Required items: company full name, abbreviation, code , system administrator name, password
- Optional options: company label, description, company parent node code
- company code: the code is a combination of letters, numbers, underscores, and dots, no more than 50 characters
- company parent Node code: if not passed, the default parent node is the default company
- System administrator: user name rules: only letters, numbers, special symbols *()-_. and their combinations are supported, and no more than 50 characters.
- The username only supports 6 special characters *()-_. Other special symbols such as +/?%#&=space{} "':,[], etc., are compatible and are not supported for now, please Know!
- Password: The complexity is determined by the system password configuration, no more than 50 characters
- When the company code to be added exists in the system, it will prompt "Company code: [companyCode] already exists!"
- When the full name of the company to be added exists in the system, it will prompt "Full name of the company: [comanyFullName] already exists!"
- When the abbreviation of the company to be added exists in the system, it will prompt "Company Abbreviation: [companyShortName] already exists!"
- When the new system administrator exists, it will prompt "User name: [username] repeat"
- Modify company rules in batches
- Mandatory item: company Full name, abbreviation, code.
- Optional options: company label, description
- When the full name of the company to be added exists in the system, it will prompt "Full name of the company: [comanyFullName] already exists!"
- When the abbreviation of the company to be added When it exists in the system, it will prompt "Company abbreviation: [companyShortName] already exists!"
- When the company to be modified does not exist in the system, it will prompt "Specified company: [comanyFullName] does not exist!"
- Batch delete company rules
- When there are personnel in the positions under the company, delete the company prompt"There are personnel in the positions under the company, which cannot be deleted!"
- When there are subsidiaries under the company, delete the company prompt"the The company has subsidiaries, and it is not allowed to delete!"
- When the code in the company code set deleted by deleteCompanies does not exist in the system, this code will be skipped, and the company corresponding to other company codes that exist in the system will be deleted.
- General rules for batch addition and batch modification
- Full company name rule: no more than 200 characters.
- Abbreviation rule: no more than 50 characters.
- Label: no more than 50 characters.
- Description rules: no more than 255 characters.
- When an exception occurs, the entire interface data will be rolled back
Authorizations:
Request Body schema: application/json
Array of objects (AddCompany) <= 100 items New company collection | |
Array of objects (UpdateCompany) <= 100 items Modified company collection | |
deleteCompanies | Array of strings <= 100 items Deleted company code set |
Responses
Request samples
- Payload
{- "addCompanies": [
- {
- "code": "company_002",
- "parentCode": "company_001",
- "fullName": "New Energy Testing Company",
- "shortName": "New Energy",
- "tags": [
- "Label 001",
- "Label 002"
], - "description": "New type of enterprise",
- "username": "zhangsan",
- "password": "Supos@test123"
}
], - "updateCompanies": [
- {
- "code": "company_002",
- "fullName": "New Energy Testing Company",
- "shortName": "New Energy",
- "tags": [
- "Label 001",
- "Label 002"
], - "description": "New type of enterprise"
}
], - "deleteCompanies": [
- "test_company",
- "company_003"
]
}
Response samples
- 400
{- "code": 1001010302,
- "message": "The company code is required and cannot be empty. The code is a combination of letters, numbers, underscores, and dots, and the length does not exceed 50 characters!"
}
Add, modify and delete departments in batches
- The department and the incoming parent node of the batch operation must be in the same company, and it needs to be called multiple times to process the department data under multiple companies.
- In the department request body, there are additions, deletions and modifications with the same code Data will be processed according to the logic of adding, modifying, and deleting
- Add department rules in batches
- Optional items: person in charge, description, company code, superior department code
- Mandatory items: department name, code, type
- When the department name to be added exists in the system, it will prompt "Department name: [departmentName] already exists! "
- When the department code to be added exists in the system, it will prompt "Department code: [departmentCode] already exists! "
- When the new department's superior department does not exist, it will prompt "The specified superior department: [departmentCode] does not exist! "
- When the company specified by the newly added department does not exist, it will prompt "Specified company: [companyCode] does not exist! "
- Modify department rules in batches
- Optional items: person in charge, description
- Required items: department name, code, type
- When the department name to be modified exists in the system, it will prompt" Department name: [departmentName] already exists! "
- When the department to be modified does not exist in the system, it will prompt "Designated department: [departmentCode] does not exist! "
- Do not pass the parentCode, and modify the department to the root node by default
- Batch delete department rules
- When there are personnel in the positions associated with the department, delete the department prompt"There are personnel in the positions associated with the department or sub-department, not Delete allowed! "
- When the code in the department code set deleted by deleteDepartments does not exist in the system, skip the code and delete the departments corresponding to other department codes that exist in the system.
- Add and modify general rules in batches
- Department name: The length cannot exceed 200 characters
- Code: The code is a combination of letters, numbers, underscores, and dots, and the length does not exceed 50 characters
- Type: General department, emergency department
- Responsible person : Responsible person code set
- Description rule: no more than 500 characters
- Company code: If not passed, it is the default company
- Superior department code: If the superior is a company, it is empty
- An exception occurs, the entire Interface data will be rolled back
- When the specified person in charge does not exist, it will be automatically ignored
Authorizations:
Request Body schema: application/json
Array of objects (AddDepartments) <= 100 items Added department collection | |
Array of objects (UpdateDepartments) <= 100 items Modified department set | |
deleteDepartments | Array of strings <= 100 items A collection of deleted department numbers |
Responses
Request samples
- Payload
{- "addDepartments": [
- {
- "name": "Test Department 001",
- "type": "general",
- "code": "test_department",
- "parentCode": "department001",
- "companyCode": "default_org_company",
- "description": "Description of the testing department",
- "managerCodes": [
- "zhangsan",
- "lisi"
]
}
], - "updateDepartments": [
- {
- "name": "Test Department 001_002",
- "type": "general",
- "code": "test_department",
- "parentCode": "test_department_001",
- "description": "New description of the testing department",
- "managerCodes": [
- "tom",
- "wangwu"
]
}
], - "deleteDepartments": [
- "test_department002",
- "test_dept003"
]
}
Response samples
- 400
{- "code": 1001010501,
- "message": "The department code is required, and the code is a combination of letters, numbers, underscores, and dots, and the length does not exceed 50 characters!"
}
Batch adding, modifying and deleting positions
- The positions of the batch operation and the incoming parent nodes must all be in the same company, and multiple calls are required to process the position data under multiple companies.
- In the position request body, there are additions, deletions and changes with the same code Data is processed according to the logic of adding, modifying, and deleting
- Batch adding position rules
- When the position name to be added exists in the system, it will prompt "Position name: [positionName] already exists! "
- When the position code to be added exists in the system, it will prompt ""Position code: [positionCode] already exists!"
- When the new position does not exist, it will prompt" Designated superior position: [positionName] does not exist!"
- When the company specified by the newly added position does not exist, it will prompt "Specified company: [companyCode] does not exist!"
- Batch modify position rules
- When the position name to be modified exists in the system, it will prompt "Position name: [positionName] already exists!"
- When the position to be modified does not exist in the system, it will prompt "Specified position: [positionName] does not Exist!"
- Do not pass the parentCode, modify the department to the root node by default
- Batch delete position rules
- When there are personnel in the position, delete the position prompt"There are related personnel in the position or sub-position, and deletion is not allowed! "
- When the code in the position code set deleted by deletePositions does not exist in the system, skip this code and delete the positions corresponding to other position codes that exist in the system.
- General rules for batch addition and batch modification
- Optional items: description, company code, superior node code
- Mandatory items: job title, code, associated department code
- job title: the length cannot exceed 200 characters
- Code: the code is a combination of letters, numbers, underscores, and dots, and the length does not exceed 50 characters
- Description rules: no more than 500 characters
- Company code: If you do not pass it, it is the default company
- Superior position code: If the superior is a company, it will be empty
- If an exception occurs, the entire interface data will be rolled back
Authorizations:
Request Body schema: application/json
Array of objects (AddPosition) <= 100 items Added collection of positions | |
Array of objects (UpdatePosition) <= 100 items Modified Post Collection | |
deletePosition | Array of strings <= 100 items A collection of deleted job IDs |
Responses
Request samples
- Payload
{- "addPosition": [
- {
- "code": "test_position",
- "name": "Test Post",
- "parentCode": "position_001",
- "companyCode": "company_001",
- "departmentCode": "test_department",
- "description": "Description of the position"
}
], - "updatePosition": [
- {
- "code": "test_position",
- "parentCode": "test_position_001",
- "name": "Test Post",
- "departmentCode": "test_department",
- "description": "Description of the position"
}
], - "deletePosition": [
- "position_001",
- "position_002"
]
}
Response samples
- 400
{- "code": 100101601,
- "message": "Encoding is required and cannot be empty! It must be a combination of letters, numbers, and underscores, and the length must not exceed 50!"
}
Add, modify, delete in batches,
- Specific rules for adding personnel in batches
- Optional items: mobile phone number, email address, description, direct leader number, next-level leader number, entry date, job title, qualification, education, major, ID number.
- Personnel number rules: combination of numbers, letters and underscores, no more than 50 characters.
- When the personnel to be added exists in the system, it will prompt "Personnel number already exists! "
- Modify personnel-specific rules in batches
- Optional items: mobile phone number, email address, description, direct leader number, next-level leader number, entry date, title, qualification, education, major, ID number.
- When the person to be modified does not exist in the system, it will prompt "The specified person does not exist! "
- When the field in the modified personnel information is not passed or the field is empty, it means that the value is blank
- Batch delete personnel-specific rules
- Delete personnel and delete users who are bound to this personnel
- When the personnel number in the personnel number set deleted by deletePersons does not exist in the system, skip this number and delete the personnel corresponding to other personnel numbers that exist in the system.
- General rules for adding and modifying in batches
- Mandatory items: personnel number, personnel name, personnel gender, personnel main position code, personnel status.
- Personnel name rule: no more than 200 characters.
- Description rule: no more than 500 characters.
- Entry date rule: the format is yyyy-MM-dd: For example: "2021-05-26".
- ID number rule: ID number consists of numbers, uppercase and lowercase letters, and special characters, and the length does not exceed 200 Character!.
- When the request parameter, addPersons set is empty or there is no data, the addition will not be processed.
- When the request parameter, the updatePersons set updatePersons is empty or there is no data, the modification will not be processed. n * When in the request parameter, the delete personnel set deletePersons is empty or has no data, the deletion will not be processed.
- The direct leader and the next-level leader must already exist in the system before they can be set to other personnel.
- Qualification rules: no more than 200 characters. *Professional rules: no more than 200 characters.
Authorizations:
Request Body schema: application/json
Array of objects (AddPerson) New collection of personnel | |
Array of objects (UpdatePerson) Modified personnel collection | |
deletePersons | Array of strings A collection of deleted personnel numbers |
Responses
Request samples
- Payload
{- "addPersons": [
- {
- "code": "zhaoyi",
- "name": "Zhao Yi",
- "phone": 15219809782,
- "gender": "male",
- "status": "onWork",
- "email": "zhaoyi@163.com",
- "description": "My name is Zhao Yi",
- "directLeaderCode": "dbManager",
- "grandLeaderCode": "depManager",
- "entryDate": "2021-01-26",
- "title": "elementary",
- "qualification": null,
- "education": "middleOrOther",
- "major": "Computer Major",
- "idNumber": 130971199809121010,
- "mainPositionCode": "developPosition"
}, - {
- "code": "qianer",
- "name": "Qian Er",
- "phone": null,
- "gender": "male",
- "status": "onWork",
- "email": null,
- "description": null,
- "directLeaderCode": null,
- "grandLeaderCode": null,
- "entryDate": null,
- "title": null,
- "qualification": null,
- "education": null,
- "major": null,
- "idNumber": null,
- "mainPositionCode": "developPosition"
}
], - "updatePersons": [
- {
- "code": "sunsan",
- "name": "Sun San",
- "phone": 13738374659,
- "gender": "male",
- "status": "onWork",
- "email": "sunsan@163.com",
- "description": "Sun San is a research and development engineer",
- "directLeaderCode": "dbManager",
- "grandLeaderCode": "depManager",
- "entryDate": "2021-05-26",
- "title": "intermediate",
- "qualification": null,
- "education": "hd",
- "major": "Electronic Information Engineering",
- "idNumber": 189746287423231,
- "mainPositionCode": "developPosition"
}, - {
- "code": "lisi",
- "name": "Li Si",
- "phone": null,
- "gender": "male",
- "status": "onWork",
- "email": null,
- "description": null,
- "directLeaderCode": null,
- "grandLeaderCode": null,
- "entryDate": null,
- "title": null,
- "qualification": null,
- "education": null,
- "major": null,
- "idNumber": null,
- "mainPositionCode": "developPosition"
}
], - "deletePersons": [
- "wangwu",
- "zhaoliu"
]
}
Response samples
- 400
{- "code": 1001040393,
- "message": "Personnel number is required, cannot be empty, and is a combination of letters, numbers, and underscores, and the length does not exceed 50!"
}
Upload and set the avatar for the person with the specified number (currently only avatars are supported)
Upload and set an avatar for the person with the specified number (currently only avatars are supported), and the avatar picture type only supports bmp, jpg, jpeg, png!
Authorizations:
path Parameters
personCode required | string Example: zhangsan Personnel Number |
query Parameters
imageType required | string Value: "avatar" Example: imageType=avatar avatar |
Request Body schema: multipart/form-data
file | string <binary> |
Responses
Response samples
- 400
{- "code": 1001040379,
- "message": "The format of the person's avatar is wrong"
}