![]() ![]() ![]() |
以下将介绍怎样定义技术员的属性及动作:
注意
|
1. 通过API可对技术员进行添加、更新和删除操作。 2. 只有具有 SDAdmin 或 SDSiteAdmin 权限的技术员才能执行添加、更新、删除操作。 3. 属性区分大小写,必须按照定义的方式使用。 4. 如果对示例表单中的按钮重命名,请指定 'operation' 为隐藏参数。 |
添加技术员需要在HttpRequest 请求参数中设置如下属性,并且应确保'operation'动作为'AddTechnician'。
属性 |
说明 |
targetURL= "/servlets/TechnicianServlet" |
target URL for Adding technician |
operation='AddTechnician' |
operation command for Adding technician. |
name |
Technician name |
employeeId |
Employee ID of the technician |
|
Email Address of the technician |
phone |
Phone Number of the technician |
mobile |
Mobile number of technician |
smsMailId |
SMS mail id of technician |
costPerHr |
technician's cost per hour |
departmentName |
department name to which the technician is associated to. |
techSiteName |
site name to which the technician is associated to. |
jobTitle |
Job title of the technician. |
associateSites |
Associated sites of the technician |
associateGroups |
Associated groups of the technician |
approvePurchaseOrder |
Purchase Order Approver |
UDF aliases name |
additional fields should be specified based on their column names |
enableLogin |
parameter for Enable Login for Technician |
loginName |
Technician's login name |
pwd |
Technician's password |
userDomainName |
Domain to which the technician belongs to |
associateRols |
roles associated with the technician |
username |
Login Name for SDP Authentication |
password |
Password for SDP Authentication |
DOMAIN_NAME |
Domain Name to which the user belongs |
logonDomainName |
Authentication Mode [AD or Local Authentication]. “AD_AUTH” refers to Active Directory Authentication. “Local Authentication” or empty value refers to Local Authentication. |
注意:
如果技术员被关联到多个地点,则 'associateSites' 字段的值,需要用英文逗号分隔,如:India, US, London.
如果技术员被指派给多个工作组,则'associateGroups'字段的值,需要用英文逗号分隔,其值为:'sitename-groupname'.
如果技术员没有关联任何地点,即属于:'Not associated to any site', 则 'associateSites'的值为'default'.
要将技术员指派到 'Not associated to any site '的一个部门,则 'techSiteName' 的值为 'default'.
如果在 'departmentName' 和 'techSiteName'指定了非法字段,则技术员将被关联到:'Not associated to any site'.
'approvePurchaseOrder' 只有在提供了技术员的电子邮件地址时,才能启用。'approvePurchaseOrder' 的允许值为 'true'或'false',默认为:'false'.
'enableLogin' 的允许值为 'true'或 'false',默认为:'false'.
如果没有提供 'pwd'的值,则该技术员的密码将与指定的 'loginName'相同。
如果技术员的'loginName'没有提供,则该技术员不具有登录权限。
具有 SDSiteAdmin 权限,但是访问受限制的技术员,只能为其所关联的地点添加技术员。
要查看添加技术员的示例表单, 点击这里.
HTML表单被提交到 http://machinename:Portnumber/servlets/RequestServlet, 并返回XML格式的应答消息,其中包括 成功消息 和该技术员的用户ID。
如果有下述情况,则返回失败消息:
在HTTP请求参数栏中要将请求参数中的‘operation’设定为‘UpdateTechnician’。
属性 |
说明 |
targetURL= "/servlets/TechnicianServlet" |
target URL for Updating technician. |
operation='UpdateTechnician' |
operation command for Updating technician. |
techUserName |
Technician Name to update |
techLoginName |
Login Name of the technician |
techDomainName |
Domain Name to which technician the technician belongs |
techEmailId |
Email ID of the technician |
userid |
Technician ID |
name |
Technician name |
employeeId |
Employee ID of the technician |
|
Email Address of the technician |
phone |
Phone Number of the technician |
mobile |
Mobile number of technician |
smsMailId |
SMS mail id of technician |
costPerHr |
technician's cost per hour |
departmentName |
department name to which the technician is associated to. |
techSiteName |
site name to which the technician is associated to. |
jobTitle |
Job title of the technician. |
associateSites |
Associated sites of the technician |
associateGroups |
Associated groups of the technician |
UDF aliases name |
additional fields should be specified based on their column names |
username |
Login Name for SDP Authentication |
password |
Password for SDP Authentication |
DOMAIN_NAME |
Domain Name to which the user belongs |
logonDomainName |
Authentication Mode [AD or Local Authentication]. “AD_AUTH” refers to Active Directory Authentication. “Local Authentication” or empty value refers to Local Authentication. |
注意:
当执行编辑操作时,将基于下述顺序鉴别技术员:
首先基于 'techLoginName' 和 'techDomainName'的值,鉴别技术员。
如果没有指定 'techDomainName' ,则'techDomainName' 视作空值,并结合 'techLoginName' 鉴别技术员。
如果不满足上述标准,使用 'techEmailid'鉴别技术员。
如果仍不能确定技术员,则使用 'techUserName'鉴别技术员。
如果上面几步仍无法鉴别技术员,则使用'userid'鉴别技术员。
使用 techUserNameor 或 techEmailid鉴别技术员时,如果有多个技术员符合条件,则不更新任何技术员的信息。
登录明细的信息和 'approvePurchaseOrder' 的值不能通过API修改。
具有 SDSiteAdmin 权限,但是访问受限制的技术员,只能更新其所关联的地点的技术员。
要查看更新技术员的示例表单,点击这里.
如果更新成功,则返回 成功消息 。
如果有以下情形,则返回更新失败。
在HTTP请求参数栏中要将请求参数中的‘operation’设定为‘DeleteTechnician’。
属性 |
说明 |
targetURL= "/servlets/TechnicianOperationServlet" |
target URLl for deleting technician |
operation='DeleteTechnician' |
operation command for deleting technician |
name |
Technician Name |
loginName |
Technician's Login Name |
domainName |
Technician's login domain name |
emailId |
Technician's email ID |
userid |
Technician ID |
username |
Login Name for SDP Authentication |
password |
Password for SDP Authentication |
DOMAIN_NAME |
Domain Name to which the user belongs. |
logonDomainName |
Authentication Mode [AD or Local Authentication]. “AD_AUTH” refers to Active Directory Authentication. “Local Authentication” or empty value refers to Local Authentication. |
注意:
具有 'SDAdmin' 权限的技术员,只能由其他 'SDAdmin'的人删除。
要查看删除技术员的示例表单。 点击这里.
删除成功之后,返回成功消息
![]() ![]() ![]() |