分页查询用户流程已办

  • SDK调用
MyWorkflowClient client = new MyWorkflowClient();
client.setUrl(URL+"/my");
QueryOptions options = new QueryOptions();
options.setPageSize(10);
options.setPageIndex(1);
Filter filter = new Filter();
//设置排序
options.setOrderBy("appCode desc");
options.setFilters(JSONObject.fromObject(filter,getJsonConfig()).toString());
List<Rule> rules = new ArrayList<Rule>();
Rule rule = new Rule();
rule.setField("data");
rule.setData("RS");
rule.setFieldType("str");
rule.setOp(Rule.OP_CN);
rules.add(rule);
filter.setRules(rules);
options.setFilters(JSONObject.fromObject(filter,getJsonConfig()).toString());
ResultEntity<ResultPage<List<WorkItem>>> resultPageResultEntity = client. pageQueryDoneWorkItems(options);
String result = JSONObject.fromObject(resultPageResultEntity,getJsonConfig()).toString();
System.out.println(result);
  • CURL 调用
curl -X GET "URL/my/pageQueryDoneWorkItems?page_size=10&page=1&orderby=appCode desc&filters=%7b%22rules%22%3a%5b%7b%22data%22%3a%22RS%22%2c%22field%22%3a%22appType%22%2c%22type%22%3a%22str%22%2c%22op%22%3a%22cn%22%7d%5d%7d"
  • 响应示例
{
  "businessObject": {
    "datas": [
      {
        "addTask": false,
        "alertTime": null,
        "appCode": "test-user1",
        "appName": "流程实例参与者测试",
        "appType": "test001",
        "appTypeName": "test12",
        "assigneeOrgId": "",
        "assigneeOrgName": "",
        "assigneeUserId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
        "assigneeUserName": "",
        "autoFinish": false,
        "businessDataId": "59244ff7f3dd4439982e5c2fdd015425",
        "createOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
        "createOrgName": "广州轨道交通建设监理有限公司财务部",
        "createUserName": "唐琪",
        "currentTaskNames": "传阅步骤",
        "currentTaskUsers": "",
        "expiredTime": null,
        "extendedFieldOne": "",
        "extendedFieldThree": "",
        "extendedFieldTwo": "",
        "finishTime": "2019-08-27 16:15:20",
        "important": 0,
        "itemId": "6bf42698-f197-4086-8e1d-298d33b7978a",
        "opinionArea": "",
        "opinionContent": "",
        "passOrgId": "",
        "passOrgName": "",
        "passTaskId": 0,
        "passUserId": "",
        "passUserName": "",
        "pcPageUrl": "",
        "procId": "20190827000025",
        "procName": "0827test2",
        "readTime": null,
        "receiveTime": "2019-08-27 16:09:50",
        "secret": 0,
        "status": "finished",
        "taskId": 1,
        "taskName": "开始步骤",
        "taskText": "开始步骤",
        "userChoice": "选定特定用户",
        "userId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
        "userName": "唐琪",
        "userOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
        "userOrgName": "广州轨道交通建设监理有限公司财务部",
        "workItemType": 0,
        "workflowStatus": ""
      },
      {
        "addTask": false,
        "alertTime": null,
        "appCode": "08212",
        "appName": "子流程测试",
        "appType": "test001",
        "appTypeName": "test12",
        "assigneeOrgId": "",
        "assigneeOrgName": "",
        "assigneeUserId": "",
        "assigneeUserName": "",
        "autoFinish": false,
        "businessDataId": "119395861acf4096b83b1cf735242709",
        "createOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
        "createOrgName": "广州轨道交通建设监理有限公司财务部",
        "createUserName": "唐琪",
        "currentTaskNames": "审批步骤",
        "currentTaskUsers": "",
        "expiredTime": null,
        "extendedFieldOne": "",
        "extendedFieldThree": "",
        "extendedFieldTwo": "",
        "finishTime": "2019-08-27 16:06:02",
        "important": 0,
        "itemId": "46fe2e0f-76a3-4307-8bf6-24b418fb6c29",
        "opinionArea": "强制结束",
        "opinionContent": "强制结束",
        "passOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
        "passOrgName": "广州轨道交通建设监理有限公司财务部",
        "passTaskId": 1,
        "passUserId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
        "passUserName": "唐琪",
        "pcPageUrl": "",
        "procId": "20190827000014",
        "procName": "0827test2",
        "readTime": null,
        "receiveTime": "2019-08-27 16:06:02",
        "secret": 0,
        "status": "finished",
        "taskId": 7,
        "taskName": "强制结束",
        "taskText": "强制结束",
        "userChoice": "",
        "userId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
        "userName": "唐琪",
        "userOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
        "userOrgName": "广州轨道交通建设监理有限公司财务部",
        "workItemType": 0,
        "workflowStatus": ""
      },
      {
        "addTask": false,
        "alertTime": null,
        "appCode": "08202",
        "appName": "test_ys2",
        "appType": "test001",
        "appTypeName": "test12",
        "assigneeOrgId": "",
        "assigneeOrgName": "",
        "assigneeUserId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
        "assigneeUserName": "",
        "autoFinish": false,
        "businessDataId": "be4b91b6a18c4f958fa29e79aaee654b",
        "createOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
        "createOrgName": "广州轨道交通建设监理有限公司财务部",
        "createUserName": "唐琪",
        "currentTaskNames": "会议通知",
        "currentTaskUsers": "",
        "expiredTime": null,
        "extendedFieldOne": "",
        "extendedFieldThree": "",
        "extendedFieldTwo": "",
        "finishTime": "2019-08-26 18:41:37",
        "important": 0,
        "itemId": "58b636e8-8015-44c7-9139-faa1661110cd",
        "opinionArea": "",
        "opinionContent": "",
        "passOrgId": "",
        "passOrgName": "",
        "passTaskId": 0,
        "passUserId": "",
        "passUserName": "",
        "pcPageUrl": "",
        "procId": "20190826000026",
        "procName": "0826test",
        "readTime": null,
        "receiveTime": "2019-08-26 17:51:02",
        "secret": 0,
        "status": "finished",
        "taskId": 1,
        "taskName": "流程开始",
        "taskText": "流程开始",
        "userChoice": "会议通知",
        "userId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
        "userName": "唐琪",
        "userOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
        "userOrgName": "广州轨道交通建设监理有限公司财务部",
        "workItemType": 0,
        "workflowStatus": ""
      }
    ],
    "pageCount": 1,
    "pageIndex": 1,
    "pageSize": 10,
    "totalCount": 3
  },
  "message": "成功",
  "statusCode": 200,
  "success": true
}