Skip to main content

14. Employee Service

Access via client.employee(). Provides CRUD operations and counts for employees.

14.1 Method List​

MethodReturn TypeHTTPEndpoint
create(EmployeeRequestV5)EmployeeResponseV5 or nullPOST/api/v5/employee
update(employee_id, EmployeeRequestV5)EmployeeResponseV5 or nullPUT/api/v5/employee/{id}
delete(employee_id)booleanDELETE/api/v5/employee/{id}
get(employee_id)EmployeeResponseV5 or nullGET/api/v5/employee/{id}
list()List<EmployeeResponseV5>GET/api/v5/employee
exists(employee_id)booleanGET/api/v5/employee/{id}/exists
count()longGET/api/v5/employee/count

14.2 EmployeeRequestV5 / EmployeeResponseV5​

FieldTypeDescription
employee_idStringEmployee ID (PK, typically employee number)
nameStringName
site_idStringAssigned site
org_idStringOrganization ID
emailStringEmail
phoneStringPhone number
role_codeStringRole code (OPERATOR, SUPERVISOR, ENGINEER, etc.)
departmentStringDepartment

14.3 Usage Examples​

Create Employee​

import plantpulse.api.v5.dto.request.EmployeeRequestV5;
import plantpulse.api.v5.dto.response.EmployeeResponseV5;

EmployeeRequestV5 req = new EmployeeRequestV5();
req.setEmployee_id("EMPLOYEE_E12345");
req.setName("홍길동");
req.setSite_id("SITE_DJ");
req.setOrg_id("ORG_100");
req.setEmail("hong@example.com");
req.setPhone("01012345678");
req.setRole_code("OPERATOR");
req.setDepartment("생산1팀");

EmployeeResponseV5 created = client.employee().create(req);

Inquiry​

EmployeeResponseV5 emp = client.employee().get("EMPLOYEE_E12345");
if (emp != null) {
System.out.println(emp.getName() + " - " + emp.getDepartment());
}

Total List + Department Filtering​

import java.util.List;
import java.util.stream.Collectors;

List<EmployeeResponseV5> all = client.employee().list();

List<EmployeeResponseV5> 생산1팀 = all.stream()
.filter(e -> "생산1팀".equals(e.getDepartment()))
.collect(Collectors.toList());

Count​

long total = client.employee().count();

Modify / Delete​

EmployeeRequestV5 update = new EmployeeRequestV5();
update.setEmployee_id("EMPLOYEE_E12345");
update.setName("홍길동");
update.setSite_id("SITE_DJ");
update.setRole_code("SUPERVISOR"); // 승진
client.employee().update("EMPLOYEE_E12345", update);

client.employee().delete("EMPLOYEE_E12345");

Frontline Login Account​

The account used by employees to log into the field tablet app (Frontline) — including login number, PIN, role, assigned scope, display language, and theme — is located in V5 /api/v5/app-accounts/frontline. There is a one-to-one relationship between an employee and an account; deleting an employee also deletes their account. There are no SDK methods; this is called only via ADMIN token or Platform master key. Refer to Worker Account V5 for the call list and Worker Account for the console screen.

Next Steps​