(注:condition 为 query,create,update,delete)
(注:为了读写分离,serviceid还会变动,请不要写死)
(注:userId、groupCode、projectId必须传值,appId可以为空)
请求方法:POST
请求路径:/alarm/item/{condition}?userId=用户id&groupCode=集团编码&projectId=项目Id&appId=应用id
(注:condition 为 query)
请求参数:
查询字段:
{
"id": "1",
"code": "1033",
"name": "测试报警",
"category": "消防报警",
"level": "S",
"condition": {}, //额外写文档
"remark": "测试数据",
"dealFun": "test_deal_fun",
"createUser": "test",
"createTime": 1602962584000,
"updateUser": "test",
"updateTime": 1602962586000,
"valid": 1
}
请求路径:/alarm/target/{condition}?userId=用户id&groupCode=集团编码&projectId=项目Id&appId=应用id
(注:condition 为 query,create,update,delete)
请求参数:
查询字段:
{
"id": "1",
"itemCode": "1033",
"classCode": "OBJ_AX_CODE",
"condition": {}, //额外写文档
"concern": 1,
"open": 2,
"createUser": "test",
"createTime": 1602963135000,
"updateUser": "test",
"updateTime": 1602963138000,
"valid": 1
}
新增:
{
"itemCode": "1033",
"classCode": "OBJ_AX_CODE",
"concern": 1,
"open": 2,
"condition": {}, //额外写文档
"valid": 1
}
更新:
{
"id": "1",
"itemCode": "1033",
"classCode": "OBJ_AX_CODE",
"concern": 1,
"open": 2,
"condition": {}, //额外写文档
"valid": 1
}
删除:
{
"id": "1"
}
请求路径:/alarm/config/{condition}?userId=用户id&groupCode=集团编码&projectId=项目Id&appId=应用id
(注:condition 为 query,update)
请求参数:
查询字段:
{
"id": "1",
"objId": "OBJ_1",
"projectId": "PRJ_WD_001",
"itemCode": "1033",
"category": "消防报警",
"level": "S",
"condition": {}, //额外写文档
"remark": "测试数据",
"open": 1,
"concern": 1,
"userDefined": 1,
"createUser": "test",
"createTime": 1602962781000,
"updateUser": "test",
"updateTime": 1602962783000,
"valid": 1
}
更新:
{
"id": "1",
"objId": "OBJ_1",
"projectId": "PRJ_WD_001",
"itemCode": "1033",
"category": "消防报警",
"level": "S",
"condition": {}, //额外写文档
"remark": "测试数据",
"open": 1,
"concern": 1,
"userDefined": 1,
"valid": 1
}
请求路径:/alarm/record/{condition}?userId=用户id&groupCode=集团编码&projectId=项目Id&appId=应用id
(注:condition 为 query,create,update)
请求参数:
查询字段:
{
"id": "1",
"itemCode": "1033",
"projectId": "PRJ_WD_001",
"objId": "OBJ_1",
"level": "S",
"remark": "测试数据",
"name": '报警名称',
"category": '报警分类',
"concern": 1,
"nature": "报警性质",
"treat_mode": "处理方式",
"treat_state": "处理状态",
"state": "报警状态",
"effectStartTime": 1602953256000 ,
"effectEndTime": 1602953256000 ,
"createUser": "test",
"createTime": 1602953249000,
"updateUser": "test",
"updateTime": 1602953256000,
"valid": 1
}
新增:
{
"itemCode": "1033",
"projectId": "PRJ_WD_001",
"objId": "OBJ_1",
"level": "S",
"remark": "测试数据",
"name": '报警名称',
"category": '报警分类',
"concern": 1,
"nature": "报警性质",
"treat_mode": "处理方式",
"treat_state": "处理状态",
"state": "报警状态",
"effectStartTime": 1602953256000,
"effectEndTime": 1602953256000
}
更新:
{
"id": "1",
"remark": "测试数据",
"name": '报警名称',
"state": "报警状态",
"nature": "报警性质",
"treat_mode": "处理方式",
"treat_state": "处理状态"
}
请求路径:/alarm/log/{condition}?userId=用户id&groupCode=集团编码&projectId=项目Id&appId=应用id
(注:condition 为 query,create)
请求参数:
查询字段:
{
"id": "1",
"record_id": "1033",
"type": "报警类型",
"remark": "备注",
"create_time": 1602953249000,
"update_time": 1602953249000,
"valid": 1
}
新增:
{
"record_id": "1033",
"type": "报警类型",
"remark": "备注"
}
请求路径:/alarm/comment/{condition}?userId=用户id&groupCode=集团编码&projectId=项目Id&appId=应用id
(注:condition 为 query,create)
请求参数:
查询字段:
{
"id": "1",
"record_id": "1033",
"content": 1,
"createUser": "TEST",
"createTime": 1602953249000,
"updateTime": 1602953249000,
"updateUser": "TEST",
"valid": 1
}
新增:
{
"record_id": "1033",
"content": "内容"
}