@15311494814
2018-08-20T09:14:22.000000Z
字数 8046
阅读 521
matrix
[post] /taskmember
body:
{
"taskId":"688a242ef92246a7bcc943b89383f24d", //task或者projectPlanID
"excuterId":"0986468d8d2547d88b84833622e55d7f", //执行者id,只能一个
"participantIds":"1292cab80e7740b88a72d0d7fc799bce,18b4969b49d745d3b76b455dc458214d"
//参与者id,最多15个,逗号隔开
}
note: excuterId 不填则不更新执行者 participantIds不填则不更新参与者,更新方式为全覆盖
result:
{
"statusCode": "000000",
"result": "ok",
"error": ""
}
[get] /taskmember/all/{taskId}
result:
{
"statusCode": "000000",
"result": [
{
"id": "bd24c143a82a44b8ac4817970676dc98",
"taskId": "688a242ef92246a7bcc943b89383f24d",
"taskSource": 1,
"employeeId": "0986468d8d2547d88b84833622e55d7f",
"relationship": "executor",
"pageSize": null,
"startIndex": null,
"employeeName": "孟凡志"
},
{
"id": "061bc855f7cb4d89ade845169393435b",
"taskId": "688a242ef92246a7bcc943b89383f24d",
"taskSource": 1,
"employeeId": "1292cab80e7740b88a72d0d7fc799bce",
"relationship": "participant",
"pageSize": null,
"startIndex": null,
"employeeName": "王阔"
},
{
"id": "a30aa11ae14c4c28a0db70b196357176",
"taskId": "688a242ef92246a7bcc943b89383f24d",
"taskSource": 1,
"employeeId": "18b4969b49d745d3b76b455dc458214d",
"relationship": "participant",
"pageSize": null,
"startIndex": null,
"employeeName": "刘天保"
}
],
"error": ""
}
note:第一位永远是执行者,后面是参与者
[get] /taskmember/executor/{taskId}
result:
{
"statusCode": "000000",
"result": {
"id": "bd24c143a82a44b8ac4817970676dc98",
"taskId": "688a242ef92246a7bcc943b89383f24d",
"taskSource": 1,
"employeeId": "0986468d8d2547d88b84833622e55d7f",
"relationship": "executor",
"pageSize": null,
"startIndex": null,
"employeeName": "孟凡志"
},
"error": ""
}
[post] /task/listgroup
body:
{
"employeeId":"789c1b90039147499ee8bbbb278b12ae",
"relationship":"executor",
"orderby":"endTime"
}
//note: relationship:任务类型(executor:我的任务,participant:我参与的任务)
//orderby:排序关键词(project:按项目,endTIme:按截止时间)
result(按项目):
{
"statusCode": "000000",
"result": [
{
"name": "无项目所属",
"id": "noProject"
},
{
"name": "实时估值产品化项目",
"id": "98b4b1a0fa3a4749a30d83dcea6b75ac"
}
],
"error": ""
}
result2(按截止日期):
{
"statusCode": "000000",
"result": [
{
"name": "今天",
"id": "today"
},
{
"name": "已延期",
"id": "delay"
},
{
"name": "本周",
"id": "thisWeek"
},
{
"name": "其他",
"id": "other"
}
],
"error": ""
}
//note : 返回结果中的id为下面接口的groupId,项目的groupId为projectId,其中无所属项目任务的组id为noProject
[post[ /task/groupTasks
body : {
"employeeId":"789c1b90039147499ee8bbbb278b12ae", //员工id
"groupId":"98b4b1a0fa3a4749a30d83dcea6b75ac", //组id,具体见note
"relationship":"participant", //(executor:我的任务,participant:我参与的任务)
"startIndex":"", //分页起始下标,默认为0
"pageSize":"" //分页每页条数,默认为10
}
//note:该接口只会返回按照截止时间和项目分组的分页信息,groupId可以为projectId,或者
//截止时间分组的id,其中项目中的无所属项目的任务传groupId为noProject
result:
{
"statusCode": "000000",
"result": {
"data": [
{
"task_name": "分析",
"except_timecount": 0,
"task_status": 0,
"actual_timecount": 0,
"create_time": "2018-08-06 14:09:58",
"gantt_id": "5",
"modify_time": "2018-08-07 15:25:21",
"end_time": "2019-06-13",
"gantt_pid": "3",
"task_desc": "",
"priority": "4",
"duration_unit": "d",
"duration": 3,
"start_time": "2018-04-12",
"project_id": "98b4b1a0fa3a4749a30d83dcea6b75ac",
"gantt_unique_id": "232",
"gantt_resource": "王威",
"prex_gantt_ids": "4",
"progress": 0,
"gantt_predecessors": "4:231:FS:0.0d",
"id": "33ee313ede854984bbc8c181330258e6",
"task_type": "1"
}
],
"startIndex": 0,
"pageSize": 10,
"totalCount": 2,
"currentPage": 1,
"pageCount": 1,
"example": null
},
"error": ""
}
[post] /task/listTasks
body:
{
"employeeId":"789c1b90039147499ee8bbbb278b12ae",
"orderby":"priority", //priority|modifyTime|finishTime|status
"relationship":"participant",
"startIndex":"",
"pageSize":""
}
result:
{
"statusCode": "000000",
"result": {
"data": [
{
"task_name": "分析",
"except_timecount": 0,
"task_status": 0,
"pr": 3,
"actual_timecount": 0,
"create_time": "2018-08-06 14:09:58",
"gantt_id": "5",
"modify_time": "2018-08-07 15:25:21",
"end_time": "2019-06-13",
"gantt_pid": "3",
"task_desc": "",
"priority": "高",
"duration_unit": "d",
"duration": 3,
"start_time": "2018-04-12",
"project_id": "98b4b1a0fa3a4749a30d83dcea6b75ac",
"gantt_unique_id": "232",
"gantt_resource": "王威",
"prex_gantt_ids": "4",
"progress": 0,
"gantt_predecessors": "4:231:FS:0.0d",
"id": "33ee313ede854984bbc8c181330258e6",
"task_type": "1"
},
{
"task_name": "测试任务二",
"task_status": 0,
"pr": 2,
"create_time": "2018-08-01 12:00:10",
"gantt_id": "",
"modify_time": "2018-08-01 12:00:10",
"participant_id": "1b9bbca28a9d495aac28ae1750a621c1,2b020862b9a74b6f837486bbd9b3fb43",
"end_time": "2018-09-08",
"gantt_pid": "",
"task_desc": "这是第二个任务",
"priority": "中",
"principal_id": "789c1b90039147499ee8bbbb278b12ae",
"duration_unit": "",
"finish_time": "",
"start_time": "2018-08-09",
"project_id": "98b4b1a0fa3a4749a30d83dcea6b75ac",
"gantt_unique_id": "",
"gantt_resource": "",
"prex_gantt_ids": "",
"gantt_predecessors": "",
"id": "ab11a972b7de40b99104de38f24129e7",
"task_type": ""
}
],
"startIndex": 0,
"pageSize": 10,
"totalCount": 2,
"currentPage": 1,
"pageCount": 1,
"example": null
},
"error": ""
}
[get]/task/{taskId}
result:
{
"statusCode": "000000",
"result": {
"task_name": "UI设计",
"attachments": [
{
"id": "300721ee7320489c983ba5cdf3b9e76e",
"dependencyId": "11f5aa5f021447308984a0b0a58d9050",
"fileName": "模板.mpp",
"path": "D:/AoutyWorkspace/matrix0.6_dev/Matrix0.6/matrix/project_proposal/1532674552639模板.mpp",
"createTime": "2018-07-27 14:55:52",
"employeeId": "789c1b90039147499ee8bbbb278b12ae",
"attachmentType": "project_proposal",
"fileSize": "873.00KB",
"pageSize": null,
"startIndex": null
}
],
"gantt_id": "52",
"modify_time": "",
"participant_id": "1cf8277add09449897576e1e015bc082,26675a352dac447f8027db1780a96bbb",
"task_desc": "这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述",
"project_name": "实时估值产品化项目",
"principal_id": "03b7601889a44153847e5f46ca5c73c5",
"duration": 40,
"project_id": "98b4b1a0fa3a4749a30d83dcea6b75ac",
"gantt_predecessors": "",
"preTasks": [
{
"id": "33ab9c04f1df48f0ad2deeb1b694bbb4",
"projectId": "98b4b1a0fa3a4749a30d83dcea6b75ac",
"taskName": "整体设计",
"taskDesc": "这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述这是任务描述",
"startTime": "2018-03-23",
"endTime": "2018-07-10",
"createTime": "2018-08-20 11:39:46",
"modifyTime": "",
"principalId": "03b7601889a44153847e5f46ca5c73c5",
"priority": null,
"taskType": "2",
"ganttId": "30",
"ganttPid": "0",
"progress": 73,
"duration": 78,
"durationUnit": "d",
"taskStatus": 0,
"finishTime": "",
"exceptTimecount": null,
"actualTimecount": null,
"participantId": "1cf8277add09449897576e1e015bc082,26675a352dac447f8027db1780a96bbb",
"ganttUniqueId": "7",
"ganttResource": "",
"ganttPredecessors": "",
"prexGanttIds": "",
"orderby": 2,
"pageSize": null,
"startIndex": null,
"attachmentNumber": 1,
"principalProfilePicture": null
}
],
"id": "11f5aa5f021447308984a0b0a58d9050",
"logs": [
{
"createTime": "2018-07-20",
"taskLogList": [
{
"taskLogContent": "修改任务实际工时为 44 d!修改任务实际工时为 44 !",
"showTime": " 10:20",
"id": "5244189a52c44243a08522c281788a78",
"operatorId": "18660bfa66494090b1ecc51a070af1ee",
"operatorName": "王秀清",
"taskId": "11f5aa5f021447308984a0b0a58d9050"
}
]
}
],
"task_status": 0,
"create_time": "2018-08-20 11:39:46",
"participant_data": [
{
"id": "1cf8277add09449897576e1e015bc082",
"name": "朱丽娟"
},
{
"id": "26675a352dac447f8027db1780a96bbb",
"name": "黄凛凛"
}
],
"end_time": "2018-07-10",
"gantt_pid": "30",
"orderby": 4,
"principal_data": {
"id": "03b7601889a44153847e5f46ca5c73c5",
"name": "黄旭"
},
"duration_unit": "d",
"finish_time": "",
"start_time": "2018-05-16",
"gantt_unique_id": "160",
"gantt_resource": "",
"prex_gantt_ids": "",
"progress": 62,
"task_type": "1"
},
"error": ""
}
[post] /task/attachment/upload
body:
{
"dependencyId":"",//任务id
"employeeId":""//员工id
}
result:
{
"statusCode": "000000",
"result": "ok",
"error": ""
}
[delete] /task/attachment/{attachmentId}
result:
{
"statusCode": "000000",
"result": "ok",
"error": ""
}
[put] /task/{taskId}
body:
{
"taskName":"修改名字",
"taskDesc":"我是描述",
"startTime":"2019-01-01", //年月日
"endTime":"2019-01-03",//年月日
"principalId":"2ec483791a4e41bcabef3cd22e363aa3",//执行者,一个,uuid
"participantId":"0ed9e81e7e154bc28c8d59c2348a5125,26675a352dac447f8027db1780a96bbb", //参与者,多个
"priority":"中", //高中低
"progress":30, //进度,百分比,数字
"duration":19, //几个工作日,正整数
"taskStatus":0, //任务状态0,未完成,1已完成
"finishTime":"2019-02-02", //结束时间
"exceptTimecount":10, //期望工时,数字
"actualTimecount":11 //实际工时,数字
}
result:
{
"statusCode": "000000",
"result": "ok",
"error": ""
}
[delete] /task/{taskId} //该方法会删除任务,任务成员以及任务所有附件
result:
{
"statusCode": "000000",
"result": "ok",
"error": ""
}