1. 工单评价API
API列表
编号 | API名称 | 路径 | 版本 |
---|---|---|---|
1.1 | 保存/更新工单评价-业主端 | /v1/workorder/user/appraise/save | 1.0 |
1.2 | 根据轨迹ID进行工单回显-业主端 | /v1/workorder/user/appraise/getByWorkorderId | 1.0 |
1.3 | 根据工单ID获取评分规则-业主端 | /v1/workorder/user/appraise/listScoreRuleByWorkorderId | 1.0 |
1.4 | 根据工单ID进行自动评价-内部接口-定时任务调用 | /v1/workorder/admin/appraise/auto/finish | 1.0 |
2.1 | 查看评分规则列表-PC端 | /v1/workorder/admin/scoreRule/list | 1.0 |
2.2 | 保存评分规则-PC端 | /v1/workorder/admin/scoreRule/save | 1.0 |
API调用
工单评价-业主端
保存/更新工单评价-业主端
接口地址:/v1/workorder/user/appraise/save
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
{
"content": "content",
"id": null,
"result": "result10",
"score": "3.5",
"tenantId": "tenantId",
"trackId": 123222
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
entity | 工单实例表 | body | true | Workorder对象 |
id | 主键(存在即更新,反之新增) | false | int | |
content | 内容 | false | string | |
score | 评分 | true | string | |
trackId | 轨迹ID | true | int | |
tenantId | 租户号(保留) | false | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | Mono |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
名称 | 位置 | 类型 | 描述 |
---|---|---|---|
code | 顶层 | STRING | 响应码标识 |
message | 顶层 | STRING | 响应消息文本 |
data | 顶层 | JSONObject | 响应数据对象 |
id | data | int | 主键 |
content | data | string | 内容 |
result | data | string | 评分结果 |
revision | data | string | 乐观锁 |
score | data | string | 评分 |
tenantId | data | string | 租户号 |
trackId | data | int | 轨迹ID |
响应示例:
{
"message": "Ok",
"code": 200,
"data": {
"result": "不满意",
"score": "3.5",
"createBy": null,
"createTime": null,
"updateBy": "pz0001",
"trackId": 123222,
"tenantId": "tenantId",
"updateTime": "2021-12-23T01:14:09.315+00:00",
"id": 10,
"content": "content",
"revision": "revision"
}
}
根据轨迹ID进行工单回显-业主端
接口地址:/v1/workorder/user/appraise/getByWorkorderId
请求方式:GET
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
null
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
workorderId | 工单ID | param | true | int |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | Mono |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
名称 | 位置 | 类型 | 描述 |
---|---|---|---|
code | 顶层 | STRING | 响应码标识 |
message | 顶层 | STRING | 响应消息文本 |
data | 顶层 | JSONObject | 响应数据对象 |
id | data | int | 主键 |
content | data | string | 内容 |
result | data | string | 评分结果 |
revision | data | string | 乐观锁 |
score | data | string | 评分 |
tenantId | data | string | 租户号 |
trackId | data | int | 轨迹ID |
响应示例:
{
"message": "Ok",
"code": 200,
"data": {
"id": 10,
"tenantId": "tenantId",
"revision": "revision",
"createBy": "pz0001",
"createTime": "2021-12-22T07:24:30.000+00:00",
"updateBy": "pz0001",
"updateTime": "2021-12-23T01:14:09.000+00:00",
"score": "3.5",
"content": "content",
"result": "不满意",
"trackId": 123222
}
}
根据工单ID获取评分规则-业主端
接口地址:/v1/workorder/user/appraise/listScoreRuleByWorkorderId
请求方式:GET
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
null
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
workorderId | 工单ID | param | true | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | Mono |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
名称 | 位置 | 类型 | 描述 |
---|---|---|---|
code | 顶层 | STRING | 响应码标识 |
message | 顶层 | STRING | 响应消息文本 |
data | 顶层 | JSONObject | 响应数据对象 |
scoreRules | data | list | 评分规则列表 |
id | scoreRules | long | 主键 |
startNum | defaultRules | int | 开始数 |
endNum | defaultRules | int | 结束数 |
result | defaultRules | string | 评分类别1非常满意2满意3一般4不满意5非常不满意 |
statsNum | data | int | 星数 |
响应示例:
{
"code": "200",
"data": {
"scoreRules": [
{
"id": 12,
"startNum": 1,
"tenantId": "",
"endNum": 1,
"result": "非常不满意",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
},
{
"id": 13,
"startNum": 2,
"tenantId": "",
"endNum": 2,
"result": "不满意",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
},
{
"id": 14,
"startNum": 3,
"tenantId": "",
"endNum": 3,
"result": "一般",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
},
{
"id": 15,
"startNum": 4,
"tenantId": "",
"endNum": 4,
"result": "满意",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
},
{
"id": 16,
"startNum": 5,
"tenantId": "",
"endNum": 5,
"result": "非常满意",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
}
],
"statsNum": 5
},
"message": "成功"
}
根据工单ID进行自动评价-内部接口-定时任务调用
接口地址:/v1/workorder/admin/appraise/auto/finish
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
{
"workorderId": 1171
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
workorderId | 工单ID | param | true | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | Mono |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
名称 | 位置 | 类型 | 描述 |
---|---|---|---|
code | 顶层 | STRING | 响应码标识 |
message | 顶层 | STRING | 响应消息文本 |
data | 顶层 | JSONObject | 响应数据对象 |
响应示例:
{
"code": "200",
"data": {},
"message": "成功"
}
评分规则-PC端
查看评分规则列表-PC端
接口地址:/v1/workorder/admin/scoreRule/list
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
null
请求参数:
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | Mono |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
名称 | 位置 | 类型 | 描述 |
---|---|---|---|
code | 顶层 | STRING | 响应码标识 |
message | 顶层 | STRING | 响应消息文本 |
data | 顶层 | JSONObject | 响应数据对象 |
defaultRules | data | list | 默认规则 |
id | defaultRules | int | 主键 |
startNum | defaultRules | int | 开始数 |
endNum | defaultRules | int | 结束数 |
result | defaultRules | string | 评分类别1非常满意2满意3一般4不满意5非常不满意 |
types | data | list | 分类下拉列表 |
tenantRule | data | string | 租户规则 |
响应示例:
{
"code": "200",
"data": {
"defaultRules": {
"score_3_half": [
{
"id": 1,
"startNum": 0,
"tenantId": "",
"endNum": 1,
"result": "不满意",
"typeName": "3分制-带半星",
"typeCode": "score_3_half",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:35:23.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:35:23.000+00:00"
},
{
"id": 2,
"startNum": 1,
"tenantId": "",
"endNum": 2,
"result": "一般",
"typeName": "3分制-带半星",
"typeCode": "score_3_half",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:35:23.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:35:23.000+00:00"
},
{
"id": 3,
"startNum": 2,
"tenantId": "",
"endNum": 3,
"result": "满意",
"typeName": "3分制-带半星",
"typeCode": "score_3_half",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:35:23.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:35:23.000+00:00"
}
],
"score_5": [
{
"id": 12,
"startNum": 1,
"tenantId": "",
"endNum": 1,
"result": "非常不满意",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
},
{
"id": 13,
"startNum": 2,
"tenantId": "",
"endNum": 2,
"result": "不满意",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
},
{
"id": 14,
"startNum": 3,
"tenantId": "",
"endNum": 3,
"result": "一般",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
},
{
"id": 15,
"startNum": 4,
"tenantId": "",
"endNum": 4,
"result": "满意",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
},
{
"id": 16,
"startNum": 5,
"tenantId": "",
"endNum": 5,
"result": "非常满意",
"typeName": "5分制",
"typeCode": "score_5",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:42:44.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:42:44.000+00:00"
}
],
"score_5_half": [
{
"id": 4,
"startNum": 0,
"tenantId": "",
"endNum": 1,
"result": "非常不满意",
"typeName": "5分制-带半星",
"typeCode": "score_5_half",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:38:16.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:38:16.000+00:00"
},
{
"id": 5,
"startNum": 1,
"tenantId": "",
"endNum": 2,
"result": "不满意",
"typeName": "5分制-带半星",
"typeCode": "score_5_half",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:38:16.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:38:16.000+00:00"
},
{
"id": 6,
"startNum": 2,
"tenantId": "",
"endNum": 3,
"result": "一般",
"typeName": "5分制-带半星",
"typeCode": "score_5_half",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:38:16.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:38:16.000+00:00"
},
{
"id": 7,
"startNum": 3,
"tenantId": "",
"endNum": 4,
"result": "满意",
"typeName": "5分制-带半星",
"typeCode": "score_5_half",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:38:46.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:38:46.000+00:00"
},
{
"id": 8,
"startNum": 4,
"tenantId": "",
"endNum": 5,
"result": "非常满意",
"typeName": "5分制-带半星",
"typeCode": "score_5_half",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:38:46.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:38:46.000+00:00"
}
],
"score_3": [
{
"id": 9,
"startNum": 1,
"tenantId": "",
"endNum": 1,
"result": "不满意",
"typeName": "3分制",
"typeCode": "score_3",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:41:52.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:41:52.000+00:00"
},
{
"id": 10,
"startNum": 2,
"tenantId": "",
"endNum": 2,
"result": "一般",
"typeName": "3分制",
"typeCode": "score_3",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:41:52.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:41:52.000+00:00"
},
{
"id": 11,
"startNum": 3,
"tenantId": "",
"endNum": 3,
"result": "满意",
"typeName": "3分制",
"typeCode": "score_3",
"isDefault": 1,
"createById": "21771",
"createBy": "路人甲2",
"createTime": "2021-12-30T01:41:52.000+00:00",
"updateById": "21771",
"updateBy": "路人甲2",
"updateTime": "2021-12-30T01:41:52.000+00:00"
}
]
},
"types": [
{
"code": "score_3_half",
"name": "3分制-带半星"
},
{
"code": "score_5_half",
"name": "5分制-带半星"
},
{
"code": "score_3",
"name": "3分制"
},
{
"code": "score_5",
"name": "5分制"
}
],
"tenantRule": "score_5"
},
"message": "成功"
}
保存评分规则-PC端
接口地址:/v1/workorder/admin/scoreRule/save
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
{
"typeCode":"score_5"
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
type | 需要存放数据库定义过的分类 | body | true | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | Mono |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
名称 | 位置 | 类型 | 描述 |
---|---|---|---|
code | 顶层 | STRING | 响应码标识 |
message | 顶层 | STRING | 响应消息文本 |
data | 顶层 | JSONObject | 响应数据对象 |
id | data | int | 主键(存在即更新,反之新增) |
startNum | data | int | 开始数 |
endNum | data | int | 结束数 |
result | data | string | 结果 |
响应示例:
{
"code": "200",
"data": null,
"message": "成功"
}