Browse Source

第一次提交

赵冬冬 4 years ago
parent
commit
7697680217
100 changed files with 16503 additions and 0 deletions
  1. 58 0
      files/activiti.sql
  2. 1371 0
      files/工作流activiti.postman_collection.json
  3. 145 0
      pom.xml
  4. BIN
      readmeimg/activiti.png
  5. BIN
      readmeimg/psotman.PNG
  6. BIN
      readmeimg/流程实例列表.png
  7. BIN
      readmeimg/流程设计器.png
  8. 16 0
      src/main/java/com/activiti6/Activiti6ModelerApplication.java
  9. 43 0
      src/main/java/com/activiti6/common/exception/CustomException.java
  10. 18 0
      src/main/java/com/activiti6/common/exception/MyControllerAdvice.java
  11. 4 0
      src/main/java/com/activiti6/common/sadsa.java
  12. 85 0
      src/main/java/com/activiti6/common/utils/CharsetKit.java
  13. 98 0
      src/main/java/com/activiti6/common/utils/Constants.java
  14. 1000 0
      src/main/java/com/activiti6/common/utils/Convert.java
  15. 196 0
      src/main/java/com/activiti6/common/utils/DateUtils.java
  16. 68 0
      src/main/java/com/activiti6/common/utils/MultipartFileToFile.java
  17. 136 0
      src/main/java/com/activiti6/common/utils/ServletUtils.java
  18. 34 0
      src/main/java/com/activiti6/common/utils/SqlUtil.java
  19. 90 0
      src/main/java/com/activiti6/common/utils/StrFormatter.java
  20. 403 0
      src/main/java/com/activiti6/common/utils/StringUtils.java
  21. 49 0
      src/main/java/com/activiti6/common/utils/TableSupport.java
  22. 48 0
      src/main/java/com/activiti6/config/ActivitiConfig.java
  23. 26 0
      src/main/java/com/activiti6/config/CorsConfig.java
  24. 42 0
      src/main/java/com/activiti6/config/MyFilter.java
  25. 31 0
      src/main/java/com/activiti6/config/WebMvcConfigurer.java
  26. 36 0
      src/main/java/com/activiti6/config/event/listener/task/EndListener.java
  27. 33 0
      src/main/java/com/activiti6/config/event/listener/task/RejectListener.java
  28. 189 0
      src/main/java/com/activiti6/config/img/CFProcessDiagramCanvasExt.java
  29. 324 0
      src/main/java/com/activiti6/config/img/ProcessDiagramGenarateExt.java
  30. 37 0
      src/main/java/com/activiti6/controller/BaseController.java
  31. 363 0
      src/main/java/com/activiti6/controller/ModelerController.java
  32. 190 0
      src/main/java/com/activiti6/controller/ZipFileController.java
  33. 98 0
      src/main/java/com/activiti6/controller/activiti/BaseController.java
  34. 73 0
      src/main/java/com/activiti6/controller/activiti/DbTableHisController.java
  35. 51 0
      src/main/java/com/activiti6/controller/activiti/FormDataController.java
  36. 361 0
      src/main/java/com/activiti6/controller/activiti/LeaveNewController.java
  37. 239 0
      src/main/java/com/activiti6/controller/activiti/ProcessDefinitionController.java
  38. 124 0
      src/main/java/com/activiti6/controller/activiti/ProcessInstanceController.java
  39. 119 0
      src/main/java/com/activiti6/controller/editor/ModelEditorJsonRestResource.java
  40. 88 0
      src/main/java/com/activiti6/controller/editor/ModelSaveRestResource.java
  41. 33 0
      src/main/java/com/activiti6/controller/editor/StencilsetRestResource.java
  42. 149 0
      src/main/java/com/activiti6/domain/AjaxResult.java
  43. 157 0
      src/main/java/com/activiti6/domain/BaseEntity.java
  44. 65 0
      src/main/java/com/activiti6/domain/DbTableHis.java
  45. 14 0
      src/main/java/com/activiti6/domain/FormdataForm.java
  46. 57 0
      src/main/java/com/activiti6/domain/FormsVo.java
  47. 89 0
      src/main/java/com/activiti6/domain/HttpStatus.java
  48. 149 0
      src/main/java/com/activiti6/domain/MyFormData.java
  49. 280 0
      src/main/java/com/activiti6/domain/MyFormDataActiviti.java
  50. 1881 0
      src/main/java/com/activiti6/domain/MyFormDataActivitiExample.java
  51. 1051 0
      src/main/java/com/activiti6/domain/MyFormDataExample.java
  52. 107 0
      src/main/java/com/activiti6/domain/MyProcessDefinition.java
  53. 237 0
      src/main/java/com/activiti6/domain/MyProcessInstance.java
  54. 271 0
      src/main/java/com/activiti6/domain/MyTask.java
  55. 152 0
      src/main/java/com/activiti6/domain/MyTaskVo.java
  56. 73 0
      src/main/java/com/activiti6/domain/PageDomain.java
  57. 31 0
      src/main/java/com/activiti6/domain/ProcessInstanceCheckFrom.java
  58. 79 0
      src/main/java/com/activiti6/domain/ProcessInstanceCommitFrom.java
  59. 30 0
      src/main/java/com/activiti6/domain/ProcessInstanceEvEntFrom.java
  60. 100 0
      src/main/java/com/activiti6/domain/R.java
  61. 197 0
      src/main/java/com/activiti6/domain/SysDept.java
  62. 260 0
      src/main/java/com/activiti6/domain/SysUser.java
  63. 62 0
      src/main/java/com/activiti6/domain/TableDataInfo.java
  64. 33 0
      src/main/java/com/activiti6/domain/TaskCommitForm.java
  65. 34 0
      src/main/java/com/activiti6/domain/TreeVo.java
  66. 25 0
      src/main/java/com/activiti6/domain/form/MyFormDataActivitiForm.java
  67. 15 0
      src/main/java/com/activiti6/domain/form/TaskDoneListForm.java
  68. 15 0
      src/main/java/com/activiti6/domain/form/TaskListForm.java
  69. 24 0
      src/main/java/com/activiti6/entity/ActivitiUser.java
  70. 42 0
      src/main/java/com/activiti6/entity/AjaxEntityVo.java
  71. 23 0
      src/main/java/com/activiti6/entity/GroupActiviti.java
  72. 148 0
      src/main/java/com/activiti6/entity/MyFormData.java
  73. 1051 0
      src/main/java/com/activiti6/entity/MyFormDataExample.java
  74. 149 0
      src/main/java/com/activiti6/entity/MyFormDataZip.java
  75. 22 0
      src/main/java/com/activiti6/entity/SelectVo.java
  76. 148 0
      src/main/java/com/activiti6/entity/editor/AbstractModel.java
  77. 31 0
      src/main/java/com/activiti6/entity/editor/SaveModel.java
  78. 64 0
      src/main/java/com/activiti6/mapper/DbTableHisMapper.java
  79. 9 0
      src/main/java/com/activiti6/mapper/MyActivitiMapper.java
  80. 36 0
      src/main/java/com/activiti6/mapper/MyFormDataActivitiMapper.java
  81. 33 0
      src/main/java/com/activiti6/mapper/MyFormDataMapper.java
  82. 33 0
      src/main/java/com/activiti6/mapper/activiti/NewMyFormDataMapper.java
  83. 5 0
      src/main/java/com/activiti6/service/ModelService.java
  84. 71 0
      src/main/java/com/activiti6/service/activiti/IDbTableHisService.java
  85. 35 0
      src/main/java/com/activiti6/service/activiti/LeaveNewService.java
  86. 18 0
      src/main/java/com/activiti6/service/activiti/MyFormDataService.java
  87. 34 0
      src/main/java/com/activiti6/service/activiti/ProcessInstanceService.java
  88. 101 0
      src/main/java/com/activiti6/service/activiti/impl/DbTableHisServiceImpl.java
  89. 53 0
      src/main/java/com/activiti6/service/activiti/impl/FormDataServiceImp.java
  90. 442 0
      src/main/java/com/activiti6/service/activiti/impl/LeaveNewServiceImpl.java
  91. 287 0
      src/main/java/com/activiti6/service/activiti/impl/ProcessDefinitionServiceImpl.java
  92. 223 0
      src/main/java/com/activiti6/service/activiti/impl/ProcessInstanceServiceImpl.java
  93. 62 0
      src/main/java/com/activiti6/service/impl/ModelServiceImpl.java
  94. 47 0
      src/main/resources/application.yml
  95. BIN
      src/main/resources/jar/activiti-image-generator-6.0.0.jar
  96. 83 0
      src/main/resources/mapper/DbTableHisMapper.xml
  97. 11 0
      src/main/resources/mapper/MyActivitiMapper.xml
  98. 379 0
      src/main/resources/mapper/MyFormDataMapper.xml
  99. 569 0
      src/main/resources/mapper/MyformDataActivitiMapper.xml
  100. 338 0
      src/main/resources/mapper/activiti/NewMyFormDataMapper.xml

File diff suppressed because it is too large
+ 58 - 0
files/activiti.sql


+ 1371 - 0
files/工作流activiti.postman_collection.json

@@ -0,0 +1,1371 @@
+{
+	"info": {
+		"_postman_id": "b9bb8aa2-f4a2-42b3-bf9b-1ebed5915b6b",
+		"name": "工作流activiti",
+		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+	},
+	"item": [
+		{
+			"name": "用户和组",
+			"item": [
+				{
+					"name": "组",
+					"item": [
+						{
+							"name": "(新增|更新)组",
+							"request": {
+								"method": "POST",
+								"header": [],
+								"body": {
+									"mode": "raw",
+									"raw": "{\r\n  \"deptId\": 2,\r\n  \"deptName\": \"研发部\"\r\n}",
+									"options": {
+										"raw": {
+											"language": "json"
+										}
+									}
+								},
+								"url": {
+									"raw": "{{address}}/definition/group",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"definition",
+										"group"
+									]
+								}
+							},
+							"response": [
+								{
+									"name": "(新增|更新)组",
+									"originalRequest": {
+										"method": "POST",
+										"header": [],
+										"body": {
+											"mode": "raw",
+											"raw": "{\r\n  \"deptId\": 2,//部门id\r\n  \"deptName\": \"研发部\"//部门名称\r\n}",
+											"options": {
+												"raw": {
+													"language": "json"
+												}
+											}
+										},
+										"url": {
+											"raw": "{{address}}/definition/group",
+											"host": [
+												"{{address}}"
+											],
+											"path": [
+												"definition",
+												"group"
+											]
+										}
+									},
+									"status": "OK",
+									"code": 200,
+									"_postman_previewlanguage": "json",
+									"header": [
+										{
+											"key": "Content-Type",
+											"value": "application/json;charset=UTF-8"
+										},
+										{
+											"key": "Transfer-Encoding",
+											"value": "chunked"
+										},
+										{
+											"key": "Date",
+											"value": "Mon, 01 Mar 2021 08:09:45 GMT"
+										}
+									],
+									"cookie": [],
+									"body": "{\n    \"msg\": \"操作成功\",\n    \"code\": 200\n}"
+								}
+							]
+						},
+						{
+							"name": "查看组列表",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/service/model/group",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"service",
+										"model",
+										"group"
+									]
+								}
+							},
+							"response": []
+						},
+						{
+							"name": "删除组",
+							"request": {
+								"method": "DELETE",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/definition/group?id=1",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"definition",
+										"group"
+									],
+									"query": [
+										{
+											"key": "id",
+											"value": "1",
+											"description": "组id"
+										}
+									]
+								}
+							},
+							"response": []
+						}
+					]
+				},
+				{
+					"name": "用户",
+					"item": [
+						{
+							"name": "(新增|更新)用户",
+							"request": {
+								"method": "POST",
+								"header": [],
+								"body": {
+									"mode": "raw",
+									"raw": "{\r\n  \"userId\": 1,\r\n  \"deptId\": null,\r\n  \"userName\": \"zdd\"\r\n}",
+									"options": {
+										"raw": {
+											"language": "json"
+										}
+									}
+								},
+								"url": {
+									"raw": "{{address}}/definition/user",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"definition",
+										"user"
+									]
+								}
+							},
+							"response": [
+								{
+									"name": "(新增|更新)用户",
+									"originalRequest": {
+										"method": "POST",
+										"header": [],
+										"body": {
+											"mode": "raw",
+											"raw": "{\r\n  \"userId\": 1,//用户id\r\n  \"deptId\": null,//组id\r\n  \"userName\": \"zdd\"//用户名\r\n}",
+											"options": {
+												"raw": {
+													"language": "json"
+												}
+											}
+										},
+										"url": {
+											"raw": "{{address}}/definition/user",
+											"host": [
+												"{{address}}"
+											],
+											"path": [
+												"definition",
+												"user"
+											]
+										}
+									},
+									"status": "OK",
+									"code": 200,
+									"_postman_previewlanguage": "json",
+									"header": [
+										{
+											"key": "Content-Type",
+											"value": "application/json;charset=UTF-8"
+										},
+										{
+											"key": "Transfer-Encoding",
+											"value": "chunked"
+										},
+										{
+											"key": "Date",
+											"value": "Mon, 01 Mar 2021 08:14:33 GMT"
+										}
+									],
+									"cookie": [],
+									"body": "{\n    \"msg\": \"操作成功\",\n    \"code\": 200\n}"
+								}
+							]
+						},
+						{
+							"name": "查看用户列表",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/service/model/user",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"service",
+										"model",
+										"user"
+									]
+								}
+							},
+							"response": []
+						},
+						{
+							"name": "删除用户",
+							"request": {
+								"method": "DELETE",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/definition/user?id=1",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"definition",
+										"user"
+									],
+									"query": [
+										{
+											"key": "id",
+											"value": "1",
+											"description": "用户id"
+										}
+									]
+								}
+							},
+							"response": []
+						}
+					]
+				}
+			]
+		},
+		{
+			"name": "表单",
+			"item": [
+				{
+					"name": "表单列表",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/formdata/list?pageNum=1&pageSize=10",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"formdata",
+								"list"
+							],
+							"query": [
+								{
+									"key": "pageNum",
+									"value": "1",
+									"description": "页码"
+								},
+								{
+									"key": "pageSize",
+									"value": "10",
+									"description": "每页显示数"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "新增表单",
+					"request": {
+						"method": "PUT",
+						"header": [],
+						"body": {
+							"mode": "raw",
+							"raw": "{   \r\n    \"userId\":\"1\",\r\n    \"modelKey\":\"1\",\r\n    \"modelVersion\":\"1\",\r\n    \"modulId\":\"1\",\r\n    \"fName\":\"1\",\r\n    \"fKey\":\"1\",\r\n    \"fVersion\":\"1\",\r\n    \"jsonData\":\"{\\\"formDesc\\\":{\\\"hrStatus\\\":{\\\"options\\\":[{\\\"text\\\":\\\"不同意\\\",\\\"value\\\":0},{\\\"text\\\":\\\"同意\\\",\\\"value\\\":1}],\\\"label\\\":\\\"状态\\\",\\\"type\\\":\\\"select\\\",\\\"required\\\":true},\\\"remark\\\":{\\\"label\\\":\\\"备注\\\",\\\"type\\\":\\\"textarea\\\",\\\"attrs\\\":{\\\"rows\\\":1},\\\"required\\\":true}}}\",\r\n    \"status\":1\r\n}",
+							"options": {
+								"raw": {
+									"language": "json"
+								}
+							}
+						},
+						"url": {
+							"raw": "{{address}}/formdata",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"formdata"
+							]
+						}
+					},
+					"response": [
+						{
+							"name": "新增表单",
+							"originalRequest": {
+								"method": "PUT",
+								"header": [],
+								"body": {
+									"mode": "raw",
+									"raw": "{   \r\n    \"userId\":\"1\",//创建人\r\n    \"modelKey\":\"1\",//流程key\r\n    \"modelVersion\":\"1\",//流程版本号(保持一致和表单版本号)\r\n    \"modulId\":\"1\",//任务key\r\n    \"fName\":\"1\",//表单名称\r\n    \"fKey\":\"1\",//表单key\r\n    \"fVersion\":\"1\",//表单版本号(保持一致和流程版本号)\r\n    \"jsonData\":\"{\\\"formDesc\\\":{\\\"hrStatus\\\":{\\\"options\\\":[{\\\"text\\\":\\\"不同意\\\",\\\"value\\\":0},{\\\"text\\\":\\\"同意\\\",\\\"value\\\":1}],\\\"label\\\":\\\"状态\\\",\\\"type\\\":\\\"select\\\",\\\"required\\\":true},\\\"remark\\\":{\\\"label\\\":\\\"备注\\\",\\\"type\\\":\\\"textarea\\\",\\\"attrs\\\":{\\\"rows\\\":1},\\\"required\\\":true}}}\",\r\n    \"status\":1\r\n}",
+									"options": {
+										"raw": {
+											"language": "json"
+										}
+									}
+								},
+								"url": {
+									"raw": "{{address}}/formdata",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"formdata"
+									]
+								}
+							},
+							"_postman_previewlanguage": null,
+							"header": null,
+							"cookie": [],
+							"body": null
+						}
+					]
+				},
+				{
+					"name": "更新表单",
+					"request": {
+						"method": "POST",
+						"header": [],
+						"body": {
+							"mode": "raw",
+							"raw": "{\r\n    \"fId\":105,\r\n    \"modelKey\":\"assets_scrap\",\r\n    \"modelVersion\":1,\r\n    \"modulId\":\"hrTask\",\r\n    \"fName\":\"报废审批\",\r\n    \"fKey\":\"hr_form\",\r\n    \"fVersion\":1,\r\n   \"jsonData\":\"{\\\"formDesc\\\":{\\\"hrStatus\\\":{\\\"options\\\":[{\\\"text\\\":\\\"不同意\\\",\\\"value\\\":0},{\\\"text\\\":\\\"同意\\\",\\\"value\\\":1}],\\\"label\\\":\\\"状态\\\",\\\"type\\\":\\\"select\\\",\\\"required\\\":true},\\\"remark\\\":{\\\"label\\\":\\\"备注\\\",\\\"type\\\":\\\"textarea\\\",\\\"attrs\\\":{\\\"rows\\\":1},\\\"required\\\":true}}}\",\r\n    \"status\":1,\r\n    \"createBy\":\"1\",\r\n    \"createTime\":\"2020-07-31T06:16:14.000+0000\",\r\n    \"updateBy\":null,\r\n    \"updateTime\":\"2020-07-31T06:16:14.000+0000\"\r\n}",
+							"options": {
+								"raw": {
+									"language": "json"
+								}
+							}
+						},
+						"url": {
+							"raw": "{{address}}/formdata",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"formdata"
+							]
+						}
+					},
+					"response": [
+						{
+							"name": "更新表单",
+							"originalRequest": {
+								"method": "POST",
+								"header": [],
+								"body": {
+									"mode": "raw",
+									"raw": "{\r\n    \"fId\":105,//id\r\n    \"modelKey\":\"assets_scrap\",//流程key\r\n    \"modelVersion\":1,//流程版本\r\n    \"modulId\":\"hrTask\",//任务id\r\n    \"fName\":\"报废审批\",//表单名称\r\n    \"fKey\":\"hr_form\",//表单key\r\n    \"fVersion\":1,//表单版本号\r\n   \"jsonData\":\"{\\\"formDesc\\\":{\\\"hrStatus\\\":{\\\"options\\\":[{\\\"text\\\":\\\"不同意\\\",\\\"value\\\":0},{\\\"text\\\":\\\"同意\\\",\\\"value\\\":1}],\\\"label\\\":\\\"状态\\\",\\\"type\\\":\\\"select\\\",\\\"required\\\":true},\\\"remark\\\":{\\\"label\\\":\\\"备注\\\",\\\"type\\\":\\\"textarea\\\",\\\"attrs\\\":{\\\"rows\\\":1},\\\"required\\\":true}}}\",\r\n    \"status\":1,\r\n    \"createBy\":\"1\",\r\n    \"createTime\":\"2020-07-31T06:16:14.000+0000\",\r\n    \"updateBy\":null,\r\n    \"updateTime\":\"2020-07-31T06:16:14.000+0000\"\r\n}",
+									"options": {
+										"raw": {
+											"language": "json"
+										}
+									}
+								},
+								"url": {
+									"raw": "{{address}}/formdata",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"formdata"
+									]
+								}
+							},
+							"_postman_previewlanguage": null,
+							"header": null,
+							"cookie": [],
+							"body": null
+						}
+					]
+				},
+				{
+					"name": "删除表单",
+					"request": {
+						"method": "DELETE",
+						"header": [],
+						"body": {
+							"mode": "raw",
+							"raw": "[\"113\",\"114\"]",
+							"options": {
+								"raw": {
+									"language": "json"
+								}
+							}
+						},
+						"url": {
+							"raw": "{{address}}/formdata",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"formdata"
+							]
+						}
+					},
+					"response": []
+				}
+			]
+		},
+		{
+			"name": "发布的流程",
+			"item": [
+				{
+					"name": "流程列表",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/definition/list?pageNum=1&pageSize=10&title=",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"definition",
+								"list"
+							],
+							"query": [
+								{
+									"key": "pageNum",
+									"value": "1"
+								},
+								{
+									"key": "pageSize",
+									"value": "10"
+								},
+								{
+									"key": "title",
+									"value": "",
+									"description": "流程名称"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "查看发布的流程图",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/leaveNew/read-activiti?processDefinitionKey=assets_fault&version=1&t=0.8140752176705504",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"leaveNew",
+								"read-activiti"
+							],
+							"query": [
+								{
+									"key": "processDefinitionKey",
+									"value": "assets_fault",
+									"description": "流程图名称"
+								},
+								{
+									"key": "version",
+									"value": "1",
+									"description": "版本号"
+								},
+								{
+									"key": "t",
+									"value": "0.8140752176705504",
+									"description": "时间戳"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "删除已发布的流程图",
+					"request": {
+						"method": "DELETE",
+						"header": [],
+						"body": {
+							"mode": "raw",
+							"raw": "[\"19\"]",
+							"options": {
+								"raw": {
+									"language": "json"
+								}
+							}
+						},
+						"url": {
+							"raw": "{{address}}/definition",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"definition"
+							]
+						}
+					},
+					"response": []
+				}
+			]
+		},
+		{
+			"name": "运行中的流程",
+			"item": [
+				{
+					"name": "流程转办",
+					"item": [
+						{
+							"name": "获取当前流程任务集合",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/processInstance/listTask?processInstanceId=42501",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"processInstance",
+										"listTask"
+									],
+									"query": [
+										{
+											"key": "processInstanceId",
+											"value": "42501",
+											"description": "运行中的流程id"
+										}
+									]
+								}
+							},
+							"response": []
+						},
+						{
+							"name": "获取处理人集合",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/processInstance/listUser",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"processInstance",
+										"listUser"
+									]
+								}
+							},
+							"response": []
+						},
+						{
+							"name": "流程转办",
+							"request": {
+								"method": "POST",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/processInstance/transToOffice?taskId=42523&userId=1",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"processInstance",
+										"transToOffice"
+									],
+									"query": [
+										{
+											"key": "taskId",
+											"value": "42523",
+											"description": "任务id"
+										},
+										{
+											"key": "userId",
+											"value": "1",
+											"description": "接手人"
+										}
+									]
+								}
+							},
+							"response": []
+						}
+					]
+				},
+				{
+					"name": "查看已经开始的流程列表",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/processInstance/list?pageNum=1&pageSize=10",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"processInstance",
+								"list"
+							],
+							"query": [
+								{
+									"key": "pageNum",
+									"value": "1"
+								},
+								{
+									"key": "pageSize",
+									"value": "10"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "流程挂起",
+					"request": {
+						"method": "POST",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/processInstance/suspend?processInstanceId=11111&status=1",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"processInstance",
+								"suspend"
+							],
+							"query": [
+								{
+									"key": "processInstanceId",
+									"value": "11111",
+									"description": "运行中的流程id"
+								},
+								{
+									"key": "status",
+									"value": "1",
+									"description": "0 激活 1挂起"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "流程进度查看",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/leaveNew/read-resource?processInstanceId=42501&t=0.357528171605205",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"leaveNew",
+								"read-resource"
+							],
+							"query": [
+								{
+									"key": "processInstanceId",
+									"value": "42501",
+									"description": "流程id"
+								},
+								{
+									"key": "t",
+									"value": "0.357528171605205",
+									"description": "时间戳"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "删除流程实例",
+					"request": {
+						"method": "DELETE",
+						"header": [],
+						"body": {
+							"mode": "raw",
+							"raw": "[\"100001\"]",
+							"options": {
+								"raw": {
+									"language": "json"
+								}
+							}
+						},
+						"url": {
+							"raw": "{{address}}/processInstance",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"processInstance"
+							]
+						}
+					},
+					"response": []
+				}
+			]
+		},
+		{
+			"name": "发起流程",
+			"item": [
+				{
+					"name": "发起流程",
+					"request": {
+						"method": "POST",
+						"header": [],
+						"body": {
+							"mode": "raw",
+							"raw": "{ \r\n  \"userId\":\"1\",\r\n  \"processId\": \"assets_fault:1:2504\",\r\n  \"formId\": 1,\r\n  \"formKey\": \"assets_fault\",\r\n  \"dataMap\":{}\r\n}",
+							"options": {
+								"raw": {
+									"language": "json"
+								}
+							}
+						},
+						"url": {
+							"raw": "{{address}}/processInstance/commit",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"processInstance",
+								"commit"
+							]
+						}
+					},
+					"response": [
+						{
+							"name": "发起流程",
+							"originalRequest": {
+								"method": "POST",
+								"header": [],
+								"body": {
+									"mode": "raw",
+									"raw": "{ \r\n  \"userId\":\"1\",//发起人id\r\n  \"processId\": \"assets_fault:1:2504\",//已发布的流程id\r\n  \"formId\": 1,//表单id\r\n  \"formKey\": \"assets_fault\",//表单key\r\n  \"dataMap\":{}//提交的参数\r\n}",
+									"options": {
+										"raw": {
+											"language": "json"
+										}
+									}
+								},
+								"url": {
+									"raw": "{{address}}/processInstance/commit",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"processInstance",
+										"commit"
+									]
+								}
+							},
+							"status": "OK",
+							"code": 200,
+							"_postman_previewlanguage": "json",
+							"header": [
+								{
+									"key": "Content-Type",
+									"value": "application/json;charset=UTF-8"
+								},
+								{
+									"key": "Transfer-Encoding",
+									"value": "chunked"
+								},
+								{
+									"key": "Date",
+									"value": "Mon, 01 Mar 2021 09:16:22 GMT"
+								}
+							],
+							"cookie": [],
+							"body": "{\n    \"code\": 200,\n    \"msg\": null,\n    \"data\": \"22501\"\n}"
+						}
+					]
+				}
+			]
+		},
+		{
+			"name": "待办|已办",
+			"item": [
+				{
+					"name": "待办",
+					"item": [
+						{
+							"name": "待办列表",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/leaveNew/taskList?pageNum=1&pageSize=10&processDefinitionName=&userId=1",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"leaveNew",
+										"taskList"
+									],
+									"query": [
+										{
+											"key": "pageNum",
+											"value": "1"
+										},
+										{
+											"key": "pageSize",
+											"value": "10"
+										},
+										{
+											"key": "processDefinitionName",
+											"value": "",
+											"description": "流程名称"
+										},
+										{
+											"key": "userId",
+											"value": "1",
+											"description": "代办人id"
+										}
+									]
+								}
+							},
+							"response": []
+						},
+						{
+							"name": "根据流程id获取到提交的表单信息",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/leaveNew/taskFormData?modelKey=assets_fault&modelVersion=1&formKey=hr_form",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"leaveNew",
+										"taskFormData"
+									],
+									"query": [
+										{
+											"key": "modelKey",
+											"value": "assets_fault",
+											"description": "流程key"
+										},
+										{
+											"key": "modelVersion",
+											"value": "1",
+											"description": "流程版本"
+										},
+										{
+											"key": "formKey",
+											"value": "hr_form",
+											"description": "表单key"
+										}
+									]
+								}
+							},
+							"response": []
+						},
+						{
+							"name": "获取提交表单模板",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/leaveNew/taskFormData?modelKey=assets_fault&modelVersion=1&formKey=hr_form",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"leaveNew",
+										"taskFormData"
+									],
+									"query": [
+										{
+											"key": "modelKey",
+											"value": "assets_fault",
+											"description": "流程key"
+										},
+										{
+											"key": "modelVersion",
+											"value": "1",
+											"description": "流程版本"
+										},
+										{
+											"key": "formKey",
+											"value": "hr_form",
+											"description": "表单key"
+										}
+									]
+								}
+							},
+							"response": []
+						},
+						{
+							"name": "审核数据",
+							"request": {
+								"method": "POST",
+								"header": [],
+								"body": {
+									"mode": "raw",
+									"raw": "{   \r\n    \"user\":{\r\n        \"userId\":1,\r\n        \"userName\":\"admin\",\r\n        \"dept\":{\r\n            \"deptName\":\"研发部\"\r\n        }\r\n    },\r\n    \"taskId\":\"15017\",\r\n    \"myFormDataActiviti\":{\r\n        \"modelKey\":\"assets_fault\",\r\n        \"modelVersion\":1,\r\n        \"modulId\":\"hrTask\",\r\n        \"fName\":\"报废审批\",\r\n        \"fKey\":\"hr_form\",\r\n        \"fVersion\":1,\r\n\t\t\"jsonData\":\"{\\\"formDesc\\\":{\\\"hrStatus\\\":{\\\"options\\\":[{\\\"text\\\":\\\"不同意\\\",\\\"value\\\":0},{\\\"text\\\":\\\"同意\\\",\\\"value\\\":1}],\\\"label\\\":\\\"状态\\\",\\\"type\\\":\\\"select\\\",\\\"required\\\":true},\\\"remark\\\":{\\\"label\\\":\\\"备注\\\",\\\"type\\\":\\\"textarea\\\",\\\"attrs\\\":{\\\"rows\\\":1},\\\"required\\\":true}},\\\"rules\\\":{},\\\"formData\\\":{\\\"hrStatus\\\":1,\\\"remark\\\":\\\"111\\\"}}\",\r\n        \"status\":1,\r\n        \"createBy\":\"1\",\r\n        \"createTime\":\"2020-07-31T06:16:14.000+0000\",\r\n        \"updateBy\":null,\r\n        \"updateTime\":\"2020-07-31T06:16:14.000+0000\",\r\n        \"instanceId\":\"55091\",\r\n        \"processDefinitionName\":\"报障申请流程\",\r\n        \"taskName\":\"人事审批\",\r\n        \"workNum\":\"BF-20210112-000006\",\r\n        \"title\":\"dddddddssss-报废工单\",\r\n        \"creatUserName\":\"超级管理员\",\r\n        \"creatDeptName\":\"贵阳银行总行\",\r\n        \"creatFormTime\":\"2021-01-12T07:31:18.000+0000\"\r\n    }\r\n}",
+									"options": {
+										"raw": {
+											"language": "json"
+										}
+									}
+								},
+								"url": {
+									"raw": "{{address}}/leaveNew/taskCommit",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"leaveNew",
+										"taskCommit"
+									]
+								}
+							},
+							"response": [
+								{
+									"name": "审核数据",
+									"originalRequest": {
+										"method": "POST",
+										"header": [],
+										"body": {
+											"mode": "raw",
+											"raw": "{   \r\n    \"user\":{\r\n        \"userId\":1,//提交人id\r\n        \"userName\":\"admin\",//提交人名称\r\n        \"dept\":{\r\n            \"deptName\":\"研发部\"//部门名称\r\n        }\r\n    },\r\n    \"taskId\":\"15017\",//任务id\r\n    \"myFormDataActiviti\":{//表单数据(根据流程获取表单模型并填充数据)\r\n        \"modelKey\":\"assets_fault\",\r\n        \"modelVersion\":1,\r\n        \"modulId\":\"hrTask\",\r\n        \"fName\":\"报废审批\",\r\n        \"fKey\":\"hr_form\",\r\n        \"fVersion\":1,\r\n\t\t\"jsonData\":\"{\\\"formDesc\\\":{\\\"hrStatus\\\":{\\\"options\\\":[{\\\"text\\\":\\\"不同意\\\",\\\"value\\\":0},{\\\"text\\\":\\\"同意\\\",\\\"value\\\":1}],\\\"label\\\":\\\"状态\\\",\\\"type\\\":\\\"select\\\",\\\"required\\\":true},\\\"remark\\\":{\\\"label\\\":\\\"备注\\\",\\\"type\\\":\\\"textarea\\\",\\\"attrs\\\":{\\\"rows\\\":1},\\\"required\\\":true}},\\\"rules\\\":{},\\\"formData\\\":{\\\"hrStatus\\\":1,//填充值(必填) \\\"remark\\\":\\\"111\\\"}}\",\r\n        \"status\":1,//是否可用 0 不可用 1 可用\r\n        \"createBy\":\"1\",//处理人id\r\n        \"createTime\":\"2020-07-31T06:16:14.000+0000\",\r\n        \"updateBy\":null,\r\n        \"updateTime\":\"2020-07-31T06:16:14.000+0000\",\r\n        \"instanceId\":\"55091\",//运行中的流程id\r\n        \"processDefinitionName\":\"报障申请流程\",//流程名称\r\n        \"taskName\":\"人事审批\",//任务名称\r\n        \"workNum\":\"BF-20210112-000006\",//工地编码\r\n        \"title\":\"dddddddssss-报废工单\",//工单名称\r\n        \"creatUserName\":\"超级管理员\",//处理人名称\r\n        \"creatDeptName\":\"贵阳银行总行\",//处理人组名称\r\n        \"creatFormTime\":\"2021-01-12T07:31:18.000+0000\"//表单提交时间\r\n    }\r\n}",
+											"options": {
+												"raw": {
+													"language": "json"
+												}
+											}
+										},
+										"url": {
+											"raw": "{{address}}/leaveNew/taskCommit",
+											"host": [
+												"{{address}}"
+											],
+											"path": [
+												"leaveNew",
+												"taskCommit"
+											]
+										}
+									},
+									"_postman_previewlanguage": null,
+									"header": null,
+									"cookie": [],
+									"body": null
+								}
+							]
+						},
+						{
+							"name": "进度查看",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/leaveNew/read-resource?processInstanceId=15001&t=0.5138637912911199",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"leaveNew",
+										"read-resource"
+									],
+									"query": [
+										{
+											"key": "processInstanceId",
+											"value": "15001",
+											"description": "运行中的流程id"
+										},
+										{
+											"key": "t",
+											"value": "0.5138637912911199",
+											"description": "时间戳"
+										}
+									]
+								}
+							},
+							"response": []
+						}
+					]
+				},
+				{
+					"name": "已办",
+					"item": [
+						{
+							"name": "已办列表",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/leaveNew/taskDoneList?pageNum=1&pageSize=10&processDefinitionName=&userId=1",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"leaveNew",
+										"taskDoneList"
+									],
+									"query": [
+										{
+											"key": "pageNum",
+											"value": "1"
+										},
+										{
+											"key": "pageSize",
+											"value": "10"
+										},
+										{
+											"key": "processDefinitionName",
+											"value": "",
+											"description": "流程名称"
+										},
+										{
+											"key": "userId",
+											"value": "1",
+											"description": "处理人id"
+										}
+									]
+								}
+							},
+							"response": []
+						},
+						{
+							"name": "进度查看",
+							"request": {
+								"method": "GET",
+								"header": [],
+								"url": {
+									"raw": "{{address}}/leaveNew/read-resource?processInstanceId=15001&t=0.5138637912911199",
+									"host": [
+										"{{address}}"
+									],
+									"path": [
+										"leaveNew",
+										"read-resource"
+									],
+									"query": [
+										{
+											"key": "processInstanceId",
+											"value": "15001",
+											"description": "运行中的流程id"
+										},
+										{
+											"key": "t",
+											"value": "0.5138637912911199",
+											"description": "时间戳"
+										}
+									]
+								}
+							},
+							"response": []
+						}
+					]
+				}
+			]
+		},
+		{
+			"name": "一次流程提交",
+			"item": [
+				{
+					"name": "流程列表",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/definition/list?pageNum=1&pageSize=10&title=&beginTime=&endTime=",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"definition",
+								"list"
+							],
+							"query": [
+								{
+									"key": "pageNum",
+									"value": "1"
+								},
+								{
+									"key": "pageSize",
+									"value": "10"
+								},
+								{
+									"key": "title",
+									"value": ""
+								},
+								{
+									"key": "beginTime",
+									"value": ""
+								},
+								{
+									"key": "endTime",
+									"value": ""
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "表单列表",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/formdata/list?pageNum=1&pageSize=10&beginTime=&endTime=",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"formdata",
+								"list"
+							],
+							"query": [
+								{
+									"key": "pageNum",
+									"value": "1"
+								},
+								{
+									"key": "pageSize",
+									"value": "10"
+								},
+								{
+									"key": "beginTime",
+									"value": ""
+								},
+								{
+									"key": "endTime",
+									"value": ""
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "发起流程",
+					"request": {
+						"method": "POST",
+						"header": [],
+						"body": {
+							"mode": "raw",
+							"raw": "{ \r\n  \"userId\":\"1\",\r\n  \"processId\": \"assets_fault:1:2504\",\r\n  \"formId\": 1,\r\n  \"formKey\": \"assets_fault\",\r\n  \"dataMap\":{}\r\n}",
+							"options": {
+								"raw": {
+									"language": "json"
+								}
+							}
+						},
+						"url": {
+							"raw": "{{address}}/processInstance/commit",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"processInstance",
+								"commit"
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "待办列表",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/leaveNew/taskList?pageNum=1&pageSize=10&processDefinitionName=&userId=1",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"leaveNew",
+								"taskList"
+							],
+							"query": [
+								{
+									"key": "pageNum",
+									"value": "1"
+								},
+								{
+									"key": "pageSize",
+									"value": "10"
+								},
+								{
+									"key": "processDefinitionName",
+									"value": ""
+								},
+								{
+									"key": "userId",
+									"value": "1"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "根据流程id获取到提交的表单信息",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/leaveNew/taskFormData?modelKey=assets_fault&formKey=hr_form&modelVersion=1",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"leaveNew",
+								"taskFormData"
+							],
+							"query": [
+								{
+									"key": "modelKey",
+									"value": "assets_fault"
+								},
+								{
+									"key": "formKey",
+									"value": "hr_form"
+								},
+								{
+									"key": "modelVersion",
+									"value": "1"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "审核数据",
+					"request": {
+						"method": "POST",
+						"header": [],
+						"body": {
+							"mode": "raw",
+							"raw": "{   \r\n    \"user\":{\r\n        \"userId\":1,\r\n        \"userName\":\"admin\",\r\n        \"dept\":{\r\n            \"deptName\":\"研发部\"\r\n        }\r\n    },\r\n    \"taskId\":\"15017\",\r\n    \"myFormDataActiviti\":{\r\n        \"modelKey\":\"assets_fault\",\r\n        \"modelVersion\":1,\r\n        \"modulId\":\"hrTask\",\r\n        \"fName\":\"报废审批\",\r\n        \"fKey\":\"hr_form\",\r\n        \"fVersion\":1,\r\n\t\t\"jsonData\":\"{\\\"formDesc\\\":{\\\"hrStatus\\\":{\\\"options\\\":[{\\\"text\\\":\\\"不同意\\\",\\\"value\\\":0},{\\\"text\\\":\\\"同意\\\",\\\"value\\\":1}],\\\"label\\\":\\\"状态\\\",\\\"type\\\":\\\"select\\\",\\\"required\\\":true},\\\"remark\\\":{\\\"label\\\":\\\"备注\\\",\\\"type\\\":\\\"textarea\\\",\\\"attrs\\\":{\\\"rows\\\":1},\\\"required\\\":true}},\\\"rules\\\":{},\\\"formData\\\":{\\\"hrStatus\\\":1,\\\"remark\\\":\\\"111\\\"}}\",\r\n        \"status\":1,\r\n        \"createBy\":\"1\",\r\n        \"createTime\":\"2020-07-31T06:16:14.000+0000\",\r\n        \"updateBy\":null,\r\n        \"updateTime\":\"2020-07-31T06:16:14.000+0000\",\r\n        \"instanceId\":\"55091\",\r\n        \"processDefinitionName\":\"报障申请流程\",\r\n        \"taskName\":\"人事审批\",\r\n        \"workNum\":\"BF-20210112-000006\",\r\n        \"title\":\"dddddddssss-报废工单\",\r\n        \"creatUserName\":\"超级管理员\",\r\n        \"creatDeptName\":\"贵阳银行总行\",\r\n        \"creatFormTime\":\"2021-01-12T07:31:18.000+0000\"\r\n    }\r\n}",
+							"options": {
+								"raw": {
+									"language": "json"
+								}
+							}
+						},
+						"url": {
+							"raw": "{{address}}/leaveNew/taskCommit",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"leaveNew",
+								"taskCommit"
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "查看已经开始的流程列表",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/processInstance/list?pageNum=1&pageSize=10",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"processInstance",
+								"list"
+							],
+							"query": [
+								{
+									"key": "pageNum",
+									"value": "1"
+								},
+								{
+									"key": "pageSize",
+									"value": "10"
+								}
+							]
+						}
+					},
+					"response": []
+				},
+				{
+					"name": "进度查看",
+					"request": {
+						"method": "GET",
+						"header": [],
+						"url": {
+							"raw": "{{address}}/leaveNew/read-resource?processInstanceId=15001&t=0.5138637912911199",
+							"host": [
+								"{{address}}"
+							],
+							"path": [
+								"leaveNew",
+								"read-resource"
+							],
+							"query": [
+								{
+									"key": "processInstanceId",
+									"value": "15001",
+									"description": "运行中的流程id"
+								},
+								{
+									"key": "t",
+									"value": "0.5138637912911199",
+									"description": "时间戳"
+								}
+							]
+						}
+					},
+					"response": []
+				}
+			]
+		}
+	],
+	"event": [
+		{
+			"listen": "prerequest",
+			"script": {
+				"type": "text/javascript",
+				"exec": [
+					""
+				]
+			}
+		},
+		{
+			"listen": "test",
+			"script": {
+				"type": "text/javascript",
+				"exec": [
+					""
+				]
+			}
+		}
+	],
+	"variable": [
+		{
+			"key": "address",
+			"value": ""
+		}
+	]
+}

+ 145 - 0
pom.xml

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>com.activiti6</groupId>
+    <artifactId>activiti6-modeler</artifactId>
+    <version>1.0.0</version>
+    <packaging>jar</packaging>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>1.5.8.RELEASE</version>
+        <relativePath/>
+    </parent>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <druid.version>1.1.6</druid.version>
+        <activiti.version>6.0.0</activiti.version>
+        <apache.xmlgraphics.version>1.7</apache.xmlgraphics.version>
+        <fastjson.version>1.2.47</fastjson.version>
+
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-jdbc</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-freemarker</artifactId>
+        </dependency>
+        <!--mybatis-->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+        <!-- mysql 驱动依赖-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <!-- 分页插件 -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.2.5</version>
+        </dependency>
+        <!-- Druid DataSource -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+        <!-- 阿里JSON解析器 -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>${fastjson.version}</version>
+        </dependency>
+        <!-- activiti -->
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-spring-boot-starter-basic</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-bpmn-layout</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-json-converter</artifactId>
+            <version>${activiti.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.activiti</groupId>
+                    <artifactId>activiti-bpmn-model</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.xmlgraphics</groupId>
+            <artifactId>batik-codec</artifactId>
+            <version>${apache.xmlgraphics.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlgraphics</groupId>
+            <artifactId>batik-css</artifactId>
+            <version>${apache.xmlgraphics.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlgraphics</groupId>
+            <artifactId>batik-svg-dom</artifactId>
+            <version>${apache.xmlgraphics.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlgraphics</groupId>
+            <artifactId>batik-svggen</artifactId>
+            <version>${apache.xmlgraphics.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-image-generator</artifactId>
+            <version>6.0.0</version>
+<!--            <scope>system</scope>-->
+<!--            <systemPath>${project.basedir}/src/main/resources/jar/activiti-image-generator-6.0.0.jar</systemPath>-->
+        </dependency>
+
+        <!-- Pagehelper -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.2.5</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- 打JAR包 -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

BIN
readmeimg/activiti.png


BIN
readmeimg/psotman.PNG


BIN
readmeimg/流程实例列表.png


BIN
readmeimg/流程设计器.png


+ 16 - 0
src/main/java/com/activiti6/Activiti6ModelerApplication.java

@@ -0,0 +1,16 @@
+package com.activiti6;
+
+import org.activiti.spring.boot.SecurityAutoConfiguration;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication(scanBasePackages = "com.activiti6.**", exclude = {SecurityAutoConfiguration.class})
+@MapperScan("com.activiti6.mapper")
+public class Activiti6ModelerApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(Activiti6ModelerApplication.class, args);
+    }
+
+}

+ 43 - 0
src/main/java/com/activiti6/common/exception/CustomException.java

@@ -0,0 +1,43 @@
+package com.activiti6.common.exception;
+
+/**
+ * 自定义异常
+ *
+ * @author gybank
+ */
+public class CustomException extends RuntimeException
+{
+    private static final long serialVersionUID = 1L;
+
+    private Integer code;
+
+    private String message;
+
+    public CustomException(String message)
+    {
+        this.message = message;
+    }
+
+    public CustomException(String message, Integer code)
+    {
+        this.message = message;
+        this.code = code;
+    }
+
+    public CustomException(String message, Throwable e)
+    {
+        super(message, e);
+        this.message = message;
+    }
+
+    @Override
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public Integer getCode()
+    {
+        return code;
+    }
+}

+ 18 - 0
src/main/java/com/activiti6/common/exception/MyControllerAdvice.java

@@ -0,0 +1,18 @@
+package com.activiti6.common.exception;
+
+import com.activiti6.entity.AjaxEntityVo;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+@RestControllerAdvice
+public class MyControllerAdvice {
+
+    @ExceptionHandler(value = Exception.class)
+    public AjaxEntityVo success(Exception e){
+        e.printStackTrace();
+        AjaxEntityVo ajaxEntityVo=new AjaxEntityVo();
+        ajaxEntityVo.setCode(1);
+        ajaxEntityVo.setMsg(e.getMessage());
+        return  ajaxEntityVo;
+    }
+}

+ 4 - 0
src/main/java/com/activiti6/common/sadsa.java

@@ -0,0 +1,4 @@
+package com.activiti6.common;
+
+public class sadsa {
+}

+ 85 - 0
src/main/java/com/activiti6/common/utils/CharsetKit.java

@@ -0,0 +1,85 @@
+package com.activiti6.common.utils;
+
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * 字符集工具类
+ *
+ * @author gybank
+ */
+public class CharsetKit
+{
+    /** ISO-8859-1 */
+    public static final String ISO_8859_1 = "ISO-8859-1";
+    /** UTF-8 */
+    public static final String UTF_8 = "UTF-8";
+    /** GBK */
+    public static final String GBK = "GBK";
+
+    /** ISO-8859-1 */
+    public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1);
+    /** UTF-8 */
+    public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8);
+    /** GBK */
+    public static final Charset CHARSET_GBK = Charset.forName(GBK);
+
+    /**
+     * 转换为Charset对象
+     *
+     * @param charset 字符集,为空则返回默认字符集
+     * @return Charset
+     */
+    public static Charset charset(String charset)
+    {
+        return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset);
+    }
+
+    /**
+     * 转换字符串的字符集编码
+     *
+     * @param source 字符串
+     * @param srcCharset 源字符集,默认ISO-8859-1
+     * @param destCharset 目标字符集,默认UTF-8
+     * @return 转换后的字符集
+     */
+    public static String convert(String source, String srcCharset, String destCharset)
+    {
+        return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset));
+    }
+
+    /**
+     * 转换字符串的字符集编码
+     *
+     * @param source 字符串
+     * @param srcCharset 源字符集,默认ISO-8859-1
+     * @param destCharset 目标字符集,默认UTF-8
+     * @return 转换后的字符集
+     */
+    public static String convert(String source, Charset srcCharset, Charset destCharset)
+    {
+        if (null == srcCharset)
+        {
+            srcCharset = StandardCharsets.ISO_8859_1;
+        }
+
+        if (null == destCharset)
+        {
+            srcCharset = StandardCharsets.UTF_8;
+        }
+
+        if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset))
+        {
+            return source;
+        }
+        return new String(source.getBytes(srcCharset), destCharset);
+    }
+
+    /**
+     * @return 系统字符集编码
+     */
+    public static String systemCharset()
+    {
+        return Charset.defaultCharset().name();
+    }
+}

+ 98 - 0
src/main/java/com/activiti6/common/utils/Constants.java

@@ -0,0 +1,98 @@
+package com.activiti6.common.utils;
+
+/**
+ * 通用常量信息
+ *
+ * @author gybank
+ */
+public class Constants
+{
+    /**
+     * UTF-8 字符集
+     */
+    public static final String UTF8 = "UTF-8";
+
+    /**
+     * 成功标记
+     */
+    public static final Integer SUCCESS = 200;
+    /**
+     * 失败标记
+     */
+    public static final Integer FAIL = 501;
+
+    /**
+     * 登录成功
+     */
+    public static final String LOGIN_SUCCESS = "Success";
+
+    /**
+     * 注销
+     */
+    public static final String LOGOUT = "Logout";
+
+    /**
+     * 注册
+     */
+    public static final String REGISTER = "Register";
+
+    /**
+     * 登录失败
+     */
+    public static final String LOGIN_FAIL = "Error";
+
+    /**
+     * 当前记录起始索引
+     */
+    public static final String PAGE_NUM = "pageNum";
+
+    /**
+     * 每页显示记录数
+     */
+    public static final String PAGE_SIZE = "pageSize";
+
+    /**
+     * 排序列
+     */
+    public static final String ORDER_BY_COLUMN = "orderByColumn";
+
+    /**
+     * 排序的方向 "desc" 或者 "asc".
+     */
+    public static final String IS_ASC = "isAsc";
+
+    /**
+     * 参数管理 cache name
+     */
+    public static final String SYS_CONFIG_CACHE = "sys-config";
+
+    /**
+     * 参数管理 cache key
+     */
+    public static final String SYS_CONFIG_KEY = "sys_config:";
+
+    /**
+     * 字典管理 cache name
+     */
+    public static final String SYS_DICT_CACHE = "sys-dict";
+
+    /**
+     * 字典管理 cache key
+     */
+    public static final String SYS_DICT_KEY = "sys_dict:";
+
+    /**
+     * 验证码 redis key
+     */
+    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
+
+    /**
+     * 验证码有效期(分钟)
+     */
+    public static final Integer CAPTCHA_EXPIRATION = 2;
+
+    /**
+     * 资源映射路径 前缀
+     */
+    public static final String RESOURCE_PREFIX = "/profile";
+}

+ 1000 - 0
src/main/java/com/activiti6/common/utils/Convert.java

@@ -0,0 +1,1000 @@
+package com.activiti6.common.utils;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.text.NumberFormat;
+import java.util.Set;
+
+/**
+ * 类型转换器
+ *
+ * @author gybank
+ */
+public class Convert
+{
+    /**
+     * 转换为字符串<br>
+     * 如果给定的值为null,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static String toStr(Object value, String defaultValue)
+    {
+        if (null == value)
+        {
+            return defaultValue;
+        }
+        if (value instanceof String)
+        {
+            return (String) value;
+        }
+        return value.toString();
+    }
+
+    /**
+     * 转换为字符串<br>
+     * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static String toStr(Object value)
+    {
+        return toStr(value, null);
+    }
+
+    /**
+     * 转换为字符<br>
+     * 如果给定的值为null,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Character toChar(Object value, Character defaultValue)
+    {
+        if (null == value)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Character)
+        {
+            return (Character) value;
+        }
+
+        final String valueStr = toStr(value, null);
+        return StringUtils.isEmpty(valueStr) ? defaultValue : valueStr.charAt(0);
+    }
+
+    /**
+     * 转换为字符<br>
+     * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Character toChar(Object value)
+    {
+        return toChar(value, null);
+    }
+
+    /**
+     * 转换为byte<br>
+     * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Byte toByte(Object value, Byte defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Byte)
+        {
+            return (Byte) value;
+        }
+        if (value instanceof Number)
+        {
+            return ((Number) value).byteValue();
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return Byte.parseByte(valueStr);
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为byte<br>
+     * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Byte toByte(Object value)
+    {
+        return toByte(value, null);
+    }
+
+    /**
+     * 转换为Short<br>
+     * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Short toShort(Object value, Short defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Short)
+        {
+            return (Short) value;
+        }
+        if (value instanceof Number)
+        {
+            return ((Number) value).shortValue();
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return Short.parseShort(valueStr.trim());
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为Short<br>
+     * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Short toShort(Object value)
+    {
+        return toShort(value, null);
+    }
+
+    /**
+     * 转换为Number<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Number toNumber(Object value, Number defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Number)
+        {
+            return (Number) value;
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return NumberFormat.getInstance().parse(valueStr);
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为Number<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Number toNumber(Object value)
+    {
+        return toNumber(value, null);
+    }
+
+    /**
+     * 转换为int<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Integer toInt(Object value, Integer defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Integer)
+        {
+            return (Integer) value;
+        }
+        if (value instanceof Number)
+        {
+            return ((Number) value).intValue();
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return Integer.parseInt(valueStr.trim());
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为int<br>
+     * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Integer toInt(Object value)
+    {
+        return toInt(value, null);
+    }
+
+    /**
+     * 转换为Integer数组<br>
+     *
+     * @param str 被转换的值
+     * @return 结果
+     */
+    public static Integer[] toIntArray(String str)
+    {
+        return toIntArray(",", str);
+    }
+
+    /**
+     * 转换为Long数组<br>
+     *
+     * @param str 被转换的值
+     * @return 结果
+     */
+    public static Long[] toLongArray(String str)
+    {
+        return toLongArray(",", str);
+    }
+
+    /**
+     * 转换为Integer数组<br>
+     *
+     * @param split 分隔符
+     * @param split 被转换的值
+     * @return 结果
+     */
+    public static Integer[] toIntArray(String split, String str)
+    {
+        if (StringUtils.isEmpty(str))
+        {
+            return new Integer[] {};
+        }
+        String[] arr = str.split(split);
+        final Integer[] ints = new Integer[arr.length];
+        for (int i = 0; i < arr.length; i++)
+        {
+            final Integer v = toInt(arr[i], 0);
+            ints[i] = v;
+        }
+        return ints;
+    }
+
+    /**
+     * 转换为Long数组<br>
+     *
+     * @param split 分隔符
+     * @param str 被转换的值
+     * @return 结果
+     */
+    public static Long[] toLongArray(String split, String str)
+    {
+        if (StringUtils.isEmpty(str))
+        {
+            return new Long[] {};
+        }
+        String[] arr = str.split(split);
+        final Long[] longs = new Long[arr.length];
+        for (int i = 0; i < arr.length; i++)
+        {
+            final Long v = toLong(arr[i], null);
+            longs[i] = v;
+        }
+        return longs;
+    }
+
+    /**
+     * 转换为String数组<br>
+     *
+     * @param str 被转换的值
+     * @return 结果
+     */
+    public static String[] toStrArray(String str)
+    {
+        return toStrArray(",", str);
+    }
+
+    /**
+     * 转换为String数组<br>
+     *
+     * @param split 分隔符
+     * @param split 被转换的值
+     * @return 结果
+     */
+    public static String[] toStrArray(String split, String str)
+    {
+        return str.split(split);
+    }
+
+    /**
+     * 转换为long<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Long toLong(Object value, Long defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Long)
+        {
+            return (Long) value;
+        }
+        if (value instanceof Number)
+        {
+            return ((Number) value).longValue();
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            // 支持科学计数法
+            return new BigDecimal(valueStr.trim()).longValue();
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为long<br>
+     * 如果给定的值为<code>null</code>,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Long toLong(Object value)
+    {
+        return toLong(value, null);
+    }
+
+    /**
+     * 转换为double<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Double toDouble(Object value, Double defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Double)
+        {
+            return (Double) value;
+        }
+        if (value instanceof Number)
+        {
+            return ((Number) value).doubleValue();
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            // 支持科学计数法
+            return new BigDecimal(valueStr.trim()).doubleValue();
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为double<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Double toDouble(Object value)
+    {
+        return toDouble(value, null);
+    }
+
+    /**
+     * 转换为Float<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Float toFloat(Object value, Float defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Float)
+        {
+            return (Float) value;
+        }
+        if (value instanceof Number)
+        {
+            return ((Number) value).floatValue();
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return Float.parseFloat(valueStr.trim());
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为Float<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Float toFloat(Object value)
+    {
+        return toFloat(value, null);
+    }
+
+    /**
+     * 转换为boolean<br>
+     * String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Boolean toBool(Object value, Boolean defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Boolean)
+        {
+            return (Boolean) value;
+        }
+        String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        valueStr = valueStr.trim().toLowerCase();
+        switch (valueStr)
+        {
+            case "true":
+                return true;
+            case "false":
+                return false;
+            case "yes":
+                return true;
+            case "ok":
+                return true;
+            case "no":
+                return false;
+            case "1":
+                return true;
+            case "0":
+                return false;
+            default:
+                return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为boolean<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static Boolean toBool(Object value)
+    {
+        return toBool(value, null);
+    }
+
+    /**
+     * 转换为Enum对象<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     *
+     * @param clazz Enum的Class
+     * @param value 值
+     * @param defaultValue 默认值
+     * @return Enum
+     */
+    public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value, E defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (clazz.isAssignableFrom(value.getClass()))
+        {
+            @SuppressWarnings("unchecked")
+            E myE = (E) value;
+            return myE;
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return Enum.valueOf(clazz, valueStr);
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为Enum对象<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+     *
+     * @param clazz Enum的Class
+     * @param value 值
+     * @return Enum
+     */
+    public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value)
+    {
+        return toEnum(clazz, value, null);
+    }
+
+    /**
+     * 转换为BigInteger<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static BigInteger toBigInteger(Object value, BigInteger defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof BigInteger)
+        {
+            return (BigInteger) value;
+        }
+        if (value instanceof Long)
+        {
+            return BigInteger.valueOf((Long) value);
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return new BigInteger(valueStr);
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为BigInteger<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<code>null</code><br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static BigInteger toBigInteger(Object value)
+    {
+        return toBigInteger(value, null);
+    }
+
+    /**
+     * 转换为BigDecimal<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof BigDecimal)
+        {
+            return (BigDecimal) value;
+        }
+        if (value instanceof Long)
+        {
+            return new BigDecimal((Long) value);
+        }
+        if (value instanceof Double)
+        {
+            return new BigDecimal((Double) value);
+        }
+        if (value instanceof Integer)
+        {
+            return new BigDecimal((Integer) value);
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return new BigDecimal(valueStr);
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+
+    /**
+     * 转换为BigDecimal<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     *
+     * @param value 被转换的值
+     * @return 结果
+     */
+    public static BigDecimal toBigDecimal(Object value)
+    {
+        return toBigDecimal(value, null);
+    }
+
+    /**
+     * 将对象转为字符串<br>
+     * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
+     *
+     * @param obj 对象
+     * @return 字符串
+     */
+    public static String utf8Str(Object obj)
+    {
+        return str(obj, CharsetKit.CHARSET_UTF_8);
+    }
+
+    /**
+     * 将对象转为字符串<br>
+     * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
+     *
+     * @param obj 对象
+     * @param charsetName 字符集
+     * @return 字符串
+     */
+    public static String str(Object obj, String charsetName)
+    {
+        return str(obj, Charset.forName(charsetName));
+    }
+
+    /**
+     * 将对象转为字符串<br>
+     * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法
+     *
+     * @param obj 对象
+     * @param charset 字符集
+     * @return 字符串
+     */
+    public static String str(Object obj, Charset charset)
+    {
+        if (null == obj)
+        {
+            return null;
+        }
+
+        if (obj instanceof String)
+        {
+            return (String) obj;
+        }
+        else if (obj instanceof byte[] || obj instanceof Byte[])
+        {
+            return str((Byte[]) obj, charset);
+        }
+        else if (obj instanceof ByteBuffer)
+        {
+            return str((ByteBuffer) obj, charset);
+        }
+        return obj.toString();
+    }
+
+    /**
+     * 将byte数组转为字符串
+     *
+     * @param bytes byte数组
+     * @param charset 字符集
+     * @return 字符串
+     */
+    public static String str(byte[] bytes, String charset)
+    {
+        return str(bytes, StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset));
+    }
+
+    /**
+     * 解码字节码
+     *
+     * @param data 字符串
+     * @param charset 字符集,如果此字段为空,则解码的结果取决于平台
+     * @return 解码后的字符串
+     */
+    public static String str(byte[] data, Charset charset)
+    {
+        if (data == null)
+        {
+            return null;
+        }
+
+        if (null == charset)
+        {
+            return new String(data);
+        }
+        return new String(data, charset);
+    }
+
+    /**
+     * 将编码的byteBuffer数据转换为字符串
+     *
+     * @param data 数据
+     * @param charset 字符集,如果为空使用当前系统字符集
+     * @return 字符串
+     */
+    public static String str(ByteBuffer data, String charset)
+    {
+        if (data == null)
+        {
+            return null;
+        }
+
+        return str(data, Charset.forName(charset));
+    }
+
+    /**
+     * 将编码的byteBuffer数据转换为字符串
+     *
+     * @param data 数据
+     * @param charset 字符集,如果为空使用当前系统字符集
+     * @return 字符串
+     */
+    public static String str(ByteBuffer data, Charset charset)
+    {
+        if (null == charset)
+        {
+            charset = Charset.defaultCharset();
+        }
+        return charset.decode(data).toString();
+    }
+
+    // ----------------------------------------------------------------------- 全角半角转换
+    /**
+     * 半角转全角
+     *
+     * @param input String.
+     * @return 全角字符串.
+     */
+    public static String toSBC(String input)
+    {
+        return toSBC(input, null);
+    }
+
+    /**
+     * 半角转全角
+     *
+     * @param input String
+     * @param notConvertSet 不替换的字符集合
+     * @return 全角字符串.
+     */
+    public static String toSBC(String input, Set<Character> notConvertSet)
+    {
+        char c[] = input.toCharArray();
+        for (int i = 0; i < c.length; i++)
+        {
+            if (null != notConvertSet && notConvertSet.contains(c[i]))
+            {
+                // 跳过不替换的字符
+                continue;
+            }
+
+            if (c[i] == ' ')
+            {
+                c[i] = '\u3000';
+            }
+            else if (c[i] < '\177')
+            {
+                c[i] = (char) (c[i] + 65248);
+
+            }
+        }
+        return new String(c);
+    }
+
+    /**
+     * 全角转半角
+     *
+     * @param input String.
+     * @return 半角字符串
+     */
+    public static String toDBC(String input)
+    {
+        return toDBC(input, null);
+    }
+
+    /**
+     * 替换全角为半角
+     *
+     * @param text 文本
+     * @param notConvertSet 不替换的字符集合
+     * @return 替换后的字符
+     */
+    public static String toDBC(String text, Set<Character> notConvertSet)
+    {
+        char c[] = text.toCharArray();
+        for (int i = 0; i < c.length; i++)
+        {
+            if (null != notConvertSet && notConvertSet.contains(c[i]))
+            {
+                // 跳过不替换的字符
+                continue;
+            }
+
+            if (c[i] == '\u3000')
+            {
+                c[i] = ' ';
+            }
+            else if (c[i] > '\uFF00' && c[i] < '\uFF5F')
+            {
+                c[i] = (char) (c[i] - 65248);
+            }
+        }
+        String returnString = new String(c);
+
+        return returnString;
+    }
+
+    /**
+     * 数字金额大写转换 先写个完整的然后将如零拾替换成零
+     *
+     * @param n 数字
+     * @return 中文大写数字
+     */
+    public static String digitUppercase(double n)
+    {
+        String[] fraction = { "角", "分" };
+        String[] digit = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" };
+        String[][] unit = { { "元", "万", "亿" }, { "", "拾", "佰", "仟" } };
+
+        String head = n < 0 ? "负" : "";
+        n = Math.abs(n);
+
+        String s = "";
+        for (int i = 0; i < fraction.length; i++)
+        {
+            s += (digit[(int) (Math.floor(n * 10 * Math.pow(10, i)) % 10)] + fraction[i]).replaceAll("(零.)+", "");
+        }
+        if (s.length() < 1)
+        {
+            s = "整";
+        }
+        int integerPart = (int) Math.floor(n);
+
+        for (int i = 0; i < unit[0].length && integerPart > 0; i++)
+        {
+            String p = "";
+            for (int j = 0; j < unit[1].length && n > 0; j++)
+            {
+                p = digit[integerPart % 10] + unit[1][j] + p;
+                integerPart = integerPart / 10;
+            }
+            s = p.replaceAll("(零.)*零$", "").replaceAll("^$", "零") + unit[0][i] + s;
+        }
+        return head + s.replaceAll("(零.)*零元", "元").replaceFirst("(零.)+", "").replaceAll("(零.)+", "零").replaceAll("^整$", "零元整");
+    }
+}

+ 196 - 0
src/main/java/com/activiti6/common/utils/DateUtils.java

@@ -0,0 +1,196 @@
+package com.activiti6.common.utils;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import java.lang.management.ManagementFactory;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * 时间工具类
+ *
+ * @author gybank
+ */
+public class DateUtils extends org.apache.commons.lang3.time.DateUtils
+{
+    public static String YYYY = "yyyy";
+
+    public static String YYYY_MM = "yyyy-MM";
+
+    public static String YYYY_MM_DD = "yyyy-MM-dd";
+
+    public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
+
+    public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
+
+    private static String[] parsePatterns = {
+            "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
+            "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
+            "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
+
+    /**
+     * 获取当前Date型日期
+     *
+     * @return Date() 当前日期
+     */
+    public static Date getNowDate()
+    {
+        return new Date();
+    }
+
+    /**
+     * 获取当前日期, 默认格式为yyyy-MM-dd
+     *
+     * @return String
+     */
+    public static String getDate()
+    {
+        return dateTimeNow(YYYY_MM_DD);
+    }
+
+    public static final String getTime()
+    {
+        return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
+    }
+
+    public static final String dateTimeNow()
+    {
+        return dateTimeNow(YYYYMMDDHHMMSS);
+    }
+
+    public static final String dateTimeNow(final String format)
+    {
+        return parseDateToStr(format, new Date());
+    }
+
+    public static final String dateTime(final Date date)
+    {
+        return parseDateToStr(YYYY_MM_DD, date);
+    }
+
+    public static final String parseDateToStr(final String format, final Date date)
+    {
+        return new SimpleDateFormat(format).format(date);
+    }
+
+    public static final Date dateTime(final String format, final String ts)
+    {
+        try
+        {
+            return new SimpleDateFormat(format).parse(ts);
+        }
+        catch (ParseException e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * 日期路径 即年/月/日 如2018/08/08
+     */
+    public static final String datePath()
+    {
+        Date now = new Date();
+        return DateFormatUtils.format(now, "yyyy/MM/dd");
+    }
+
+    /**
+     * 日期路径 即年/月/日 如20180808
+     */
+    public static final String dateTime()
+    {
+        Date now = new Date();
+        return DateFormatUtils.format(now, "yyyyMMdd");
+    }
+
+    /**
+     * 日期型字符串转化为日期 格式
+     */
+    public static Date parseDate(Object str)
+    {
+        if (str == null)
+        {
+            return null;
+        }
+        try
+        {
+            return parseDate(str.toString(), parsePatterns);
+        }
+        catch (ParseException e)
+        {
+            return null;
+        }
+    }
+
+    /**
+     * 获取服务器启动时间
+     */
+    public static Date getServerStartDate()
+    {
+        long time = ManagementFactory.getRuntimeMXBean().getStartTime();
+        return new Date(time);
+    }
+
+    /**
+     * 计算两个时间差
+     */
+    public static String getDatePoor(Date endDate, Date nowDate)
+    {
+        long nd = 1000 * 24 * 60 * 60;
+        long nh = 1000 * 60 * 60;
+        long nm = 1000 * 60;
+        // long ns = 1000;
+        // 获得两个时间的毫秒时间差异
+        long diff = endDate.getTime() - nowDate.getTime();
+        // 计算差多少天
+        long day = diff / nd;
+        // 计算差多少小时
+        long hour = diff % nd / nh;
+        // 计算差多少分钟
+        long min = diff % nd % nh / nm;
+        // 计算差多少秒//输出结果
+        // long sec = diff % nd % nh % nm / ns;
+        return day + "天" + hour + "小时" + min + "分钟";
+    }
+
+    /**
+     * 前一天日期
+     * @param date
+     * @return
+     */
+    public static String getNextDay(Date date) {
+      Calendar calendar = Calendar.getInstance();
+      calendar.setTime(date);
+      calendar.add(Calendar.DAY_OF_MONTH, -1);
+      date = calendar.getTime();
+      return new SimpleDateFormat(YYYY_MM_DD).format(date);
+    }
+
+    /**
+     * 几小时后的时间
+     * @param date
+     * @return
+     */
+    public static String getAddHourDate(Date date,int hour) {
+      Calendar calendar = Calendar.getInstance();
+      calendar.setTime(date);
+      calendar.add(Calendar.HOUR_OF_DAY, hour);
+      date = calendar.getTime();
+      return new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS).format(date);
+    }
+
+    /**
+     * 几分钟后的时间
+     * @param date
+     * @return
+     */
+    public static String getAddMinuteDate(Date date,int minute) {
+      Calendar calendar = Calendar.getInstance();
+      calendar.setTime(date);
+      calendar.add(Calendar.MINUTE, minute);
+      date = calendar.getTime();
+      return new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS).format(date);
+    }
+}

+ 68 - 0
src/main/java/com/activiti6/common/utils/MultipartFileToFile.java

@@ -0,0 +1,68 @@
+package com.activiti6.common.utils;
+
+
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.*;
+
+/**
+ * @ClassName MultipartFileToFile
+ * @Description MultipartFile转fie
+ * @Author zdd
+ * @Date 2019/6/19 13:48
+ **/
+public class MultipartFileToFile {
+
+    /**
+     * MultipartFile 转 File
+     *
+     * @param file
+     * @throws Exception
+     */
+    public static File multipartFileToFile(MultipartFile file)  {
+
+        File toFile = null;
+        if (file.equals("") || file.getSize() <= 0) {
+            file = null;
+        } else {
+            InputStream ins = null;
+            try{
+                ins = file.getInputStream();
+                toFile = new File(file.getOriginalFilename());
+                inputStreamToFile(ins, toFile);
+                ins.close();
+            }catch (IOException e){
+                e.printStackTrace();
+            }
+
+        }
+        return toFile;
+    }
+
+    //获取流文件
+    private static void inputStreamToFile(InputStream ins, File file) {
+        try {
+            OutputStream os = new FileOutputStream(file);
+            int bytesRead = 0;
+            byte[] buffer = new byte[8192];
+            while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) {
+                os.write(buffer, 0, bytesRead);
+            }
+            os.close();
+            ins.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 删除本地临时文件
+     * @param file
+     */
+    public static void delteTempFile(File file) {
+        if (file != null) {
+            File del = new File(file.toURI());
+            del.delete();
+        }
+    }
+}

+ 136 - 0
src/main/java/com/activiti6/common/utils/ServletUtils.java

@@ -0,0 +1,136 @@
+package com.activiti6.common.utils;
+
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+
+/**
+ * 客户端工具类
+ *
+ * @author gybank
+ */
+public class ServletUtils
+{
+    /**
+     * 获取String参数
+     */
+    public static String getParameter(String name)
+    {
+        return getRequest().getParameter(name);
+    }
+
+    /**
+     * 获取String参数
+     */
+    public static String getParameter(String name, String defaultValue)
+    {
+        return Convert.toStr(getRequest().getParameter(name), defaultValue);
+    }
+
+    /**
+     * 获取Integer参数
+     */
+    public static Integer getParameterToInt(String name)
+    {
+        return Convert.toInt(getRequest().getParameter(name));
+    }
+
+    /**
+     * 获取Integer参数
+     */
+    public static Integer getParameterToInt(String name, Integer defaultValue)
+    {
+        return Convert.toInt(getRequest().getParameter(name), defaultValue);
+    }
+
+    /**
+     * 获取request
+     */
+    public static HttpServletRequest getRequest()
+    {
+        return getRequestAttributes().getRequest();
+    }
+
+    /**
+     * 获取response
+     */
+    public static HttpServletResponse getResponse()
+    {
+        return getRequestAttributes().getResponse();
+    }
+
+    /**
+     * 获取session
+     */
+    public static HttpSession getSession()
+    {
+        return getRequest().getSession();
+    }
+
+    public static ServletRequestAttributes getRequestAttributes()
+    {
+        RequestAttributes attributes = RequestContextHolder.getRequestAttributes();
+        return (ServletRequestAttributes) attributes;
+    }
+
+    /**
+     * 将字符串渲染到客户端
+     *
+     * @param response 渲染对象
+     * @param string 待渲染的字符串
+     * @return null
+     */
+    public static String renderString(HttpServletResponse response, String string)
+    {
+        try
+        {
+            response.setStatus(200);
+            response.setContentType("application/json");
+            response.setCharacterEncoding("utf-8");
+            response.getWriter().print(string);
+        }
+        catch (IOException e)
+        {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 是否是Ajax异步请求
+     *
+     * @param request
+     */
+    public static boolean isAjaxRequest(HttpServletRequest request)
+    {
+        String accept = request.getHeader("accept");
+        if (accept != null && accept.indexOf("application/json") != -1)
+        {
+            return true;
+        }
+
+        String xRequestedWith = request.getHeader("X-Requested-With");
+        if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1)
+        {
+            return true;
+        }
+
+        String uri = request.getRequestURI();
+        if (StringUtils.inStringIgnoreCase(uri, ".json", ".xml"))
+        {
+            return true;
+        }
+
+        String ajax = request.getParameter("__ajax");
+        if (StringUtils.inStringIgnoreCase(ajax, "json", "xml"))
+        {
+            return true;
+        }
+        return false;
+    }
+}

+ 34 - 0
src/main/java/com/activiti6/common/utils/SqlUtil.java

@@ -0,0 +1,34 @@
+package com.activiti6.common.utils;
+
+/**
+ * sql操作工具类
+ *
+ * @author gybank
+ */
+public class SqlUtil
+{
+    /**
+     * 仅支持字母、数字、下划线、空格、逗号(支持多个字段排序)
+     */
+    public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,]+";
+
+    /**
+     * 检查字符,防止注入绕过
+     */
+    public static String escapeOrderBySql(String value)
+    {
+        if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value))
+        {
+            return StringUtils.EMPTY;
+        }
+        return value;
+    }
+
+    /**
+     * 验证 order by 语法是否符合规范
+     */
+    public static boolean isValidOrderBySql(String value)
+    {
+        return value.matches(SQL_PATTERN);
+    }
+}

+ 90 - 0
src/main/java/com/activiti6/common/utils/StrFormatter.java

@@ -0,0 +1,90 @@
+package com.activiti6.common.utils;
+
+/**
+ * 字符串格式化
+ *
+ * @author gybank
+ */
+public class StrFormatter
+{
+    public static final String EMPTY_JSON = "{}";
+    public static final char C_BACKSLASH = '\\';
+    public static final char C_DELIM_START = '{';
+    public static final char C_DELIM_END = '}';
+
+    /**
+     * 格式化字符串<br>
+     * 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
+     * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
+     * 例:<br>
+     * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
+     * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
+     * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
+     *
+     * @param strPattern 字符串模板
+     * @param argArray 参数列表
+     * @return 结果
+     */
+    public static String format(final String strPattern, final Object... argArray)
+    {
+        if (StringUtils.isEmpty(strPattern) || StringUtils.isEmpty(argArray))
+        {
+            return strPattern;
+        }
+        final int strPatternLength = strPattern.length();
+
+        // 初始化定义好的长度以获得更好的性能
+        StringBuilder sbuf = new StringBuilder(strPatternLength + 50);
+
+        int handledPosition = 0;
+        int delimIndex;// 占位符所在位置
+        for (int argIndex = 0; argIndex < argArray.length; argIndex++)
+        {
+            delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition);
+            if (delimIndex == -1)
+            {
+                if (handledPosition == 0)
+                {
+                    return strPattern;
+                }
+                else
+                { // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果
+                    sbuf.append(strPattern, handledPosition, strPatternLength);
+                    return sbuf.toString();
+                }
+            }
+            else
+            {
+                if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH)
+                {
+                    if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH)
+                    {
+                        // 转义符之前还有一个转义符,占位符依旧有效
+                        sbuf.append(strPattern, handledPosition, delimIndex - 1);
+                        sbuf.append(Convert.utf8Str(argArray[argIndex]));
+                        handledPosition = delimIndex + 2;
+                    }
+                    else
+                    {
+                        // 占位符被转义
+                        argIndex--;
+                        sbuf.append(strPattern, handledPosition, delimIndex - 1);
+                        sbuf.append(C_DELIM_START);
+                        handledPosition = delimIndex + 1;
+                    }
+                }
+                else
+                {
+                    // 正常占位符
+                    sbuf.append(strPattern, handledPosition, delimIndex);
+                    sbuf.append(Convert.utf8Str(argArray[argIndex]));
+                    handledPosition = delimIndex + 2;
+                }
+            }
+        }
+        // 加入最后一个占位符后所有的字符
+        sbuf.append(strPattern, handledPosition, strPattern.length());
+
+        return sbuf.toString();
+    }
+}

+ 403 - 0
src/main/java/com/activiti6/common/utils/StringUtils.java

@@ -0,0 +1,403 @@
+package com.activiti6.common.utils;
+
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * 字符串工具类
+ *
+ * @author gybank
+ */
+public class StringUtils extends org.apache.commons.lang3.StringUtils
+{
+    /** 空字符串 */
+    private static final String NULLSTR = "";
+
+    /** 下划线 */
+    private static final char SEPARATOR = '_';
+
+    /**
+     * 获取参数不为空值
+     *
+     * @param value defaultValue 要判断的value
+     * @return value 返回值
+     */
+    public static <T> T nvl(T value, T defaultValue)
+    {
+        return value != null ? value : defaultValue;
+    }
+
+    /**
+     * * 判断一个Collection是否为空, 包含List,Set,Queue
+     *
+     * @param coll 要判断的Collection
+     * @return true:为空 false:非空
+     */
+    public static boolean isEmpty(Collection<?> coll)
+    {
+        return isNull(coll) || coll.isEmpty();
+    }
+
+    /**
+     * * 判断一个Collection是否非空,包含List,Set,Queue
+     *
+     * @param coll 要判断的Collection
+     * @return true:非空 false:空
+     */
+    public static boolean isNotEmpty(Collection<?> coll)
+    {
+        return !isEmpty(coll);
+    }
+
+    /**
+     * * 判断一个对象数组是否为空
+     *
+     * @param objects 要判断的对象数组
+     ** @return true:为空 false:非空
+     */
+    public static boolean isEmpty(Object[] objects)
+    {
+        return isNull(objects) || (objects.length == 0);
+    }
+
+    /**
+     * * 判断一个对象数组是否非空
+     *
+     * @param objects 要判断的对象数组
+     * @return true:非空 false:空
+     */
+    public static boolean isNotEmpty(Object[] objects)
+    {
+        return !isEmpty(objects);
+    }
+
+    /**
+     * * 判断一个Map是否为空
+     *
+     * @param map 要判断的Map
+     * @return true:为空 false:非空
+     */
+    public static boolean isEmpty(Map<?, ?> map)
+    {
+        return isNull(map) || map.isEmpty();
+    }
+
+    /**
+     * * 判断一个Map是否为空
+     *
+     * @param map 要判断的Map
+     * @return true:非空 false:空
+     */
+    public static boolean isNotEmpty(Map<?, ?> map)
+    {
+        return !isEmpty(map);
+    }
+
+    /**
+     * * 判断一个字符串是否为空串
+     *
+     * @param str String
+     * @return true:为空 false:非空
+     */
+    public static boolean isEmpty(String str)
+    {
+        return isNull(str) || NULLSTR.equals(str.trim());
+    }
+
+    /**
+     * * 判断一个字符串是否为非空串
+     *
+     * @param str String
+     * @return true:非空串 false:空串
+     */
+    public static boolean isNotEmpty(String str)
+    {
+        return !isEmpty(str);
+    }
+
+    /**
+     * * 判断一个对象是否为空
+     *
+     * @param object Object
+     * @return true:为空 false:非空
+     */
+    public static boolean isNull(Object object)
+    {
+        return object == null;
+    }
+
+    /**
+     * * 判断一个对象是否非空
+     *
+     * @param object Object
+     * @return true:非空 false:空
+     */
+    public static boolean isNotNull(Object object)
+    {
+        return !isNull(object);
+    }
+
+    /**
+     * * 判断一个对象是否是数组类型(Java基本型别的数组)
+     *
+     * @param object 对象
+     * @return true:是数组 false:不是数组
+     */
+    public static boolean isArray(Object object)
+    {
+        return isNotNull(object) && object.getClass().isArray();
+    }
+
+    /**
+     * 去空格
+     */
+    public static String trim(String str)
+    {
+        return (str == null ? "" : str.trim());
+    }
+
+    /**
+     * 截取字符串
+     *
+     * @param str 字符串
+     * @param start 开始
+     * @return 结果
+     */
+    public static String substring(final String str, int start)
+    {
+        if (str == null)
+        {
+            return NULLSTR;
+        }
+
+        if (start < 0)
+        {
+            start = str.length() + start;
+        }
+
+        if (start < 0)
+        {
+            start = 0;
+        }
+        if (start > str.length())
+        {
+            return NULLSTR;
+        }
+
+        return str.substring(start);
+    }
+
+    /**
+     * 截取字符串
+     *
+     * @param str 字符串
+     * @param start 开始
+     * @param end 结束
+     * @return 结果
+     */
+    public static String substring(final String str, int start, int end)
+    {
+        if (str == null)
+        {
+            return NULLSTR;
+        }
+
+        if (end < 0)
+        {
+            end = str.length() + end;
+        }
+        if (start < 0)
+        {
+            start = str.length() + start;
+        }
+
+        if (end > str.length())
+        {
+            end = str.length();
+        }
+
+        if (start > end)
+        {
+            return NULLSTR;
+        }
+
+        if (start < 0)
+        {
+            start = 0;
+        }
+        if (end < 0)
+        {
+            end = 0;
+        }
+
+        return str.substring(start, end);
+    }
+
+    /**
+     * 格式化文本, {} 表示占位符<br>
+     * 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
+     * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
+     * 例:<br>
+     * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
+     * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
+     * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
+     *
+     * @param template 文本模板,被替换的部分用 {} 表示
+     * @param params 参数值
+     * @return 格式化后的文本
+     */
+    public static String format(String template, Object... params)
+    {
+        if (isEmpty(params) || isEmpty(template))
+        {
+            return template;
+        }
+        return StrFormatter.format(template, params);
+    }
+
+    /**
+     * 下划线转驼峰命名
+     */
+    public static String toUnderScoreCase(String str)
+    {
+        if (str == null)
+        {
+            return null;
+        }
+        StringBuilder sb = new StringBuilder();
+        // 前置字符是否大写
+        boolean preCharIsUpperCase = true;
+        // 当前字符是否大写
+        boolean curreCharIsUpperCase = true;
+        // 下一字符是否大写
+        boolean nexteCharIsUpperCase = true;
+        for (int i = 0; i < str.length(); i++)
+        {
+            char c = str.charAt(i);
+            if (i > 0)
+            {
+                preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
+            }
+            else
+            {
+                preCharIsUpperCase = false;
+            }
+
+            curreCharIsUpperCase = Character.isUpperCase(c);
+
+            if (i < (str.length() - 1))
+            {
+                nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
+            }
+
+            if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase)
+            {
+                sb.append(SEPARATOR);
+            }
+            else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase)
+            {
+                sb.append(SEPARATOR);
+            }
+            sb.append(Character.toLowerCase(c));
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * 是否包含字符串
+     *
+     * @param str 验证字符串
+     * @param strs 字符串组
+     * @return 包含返回true
+     */
+    public static boolean inStringIgnoreCase(String str, String... strs)
+    {
+        if (str != null && strs != null)
+        {
+            for (String s : strs)
+            {
+                if (str.equalsIgnoreCase(trim(s)))
+                {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
+     *
+     * @param name 转换前的下划线大写方式命名的字符串
+     * @return 转换后的驼峰式命名的字符串
+     */
+    public static String convertToCamelCase(String name)
+    {
+        StringBuilder result = new StringBuilder();
+        // 快速检查
+        if (name == null || name.isEmpty())
+        {
+            // 没必要转换
+            return "";
+        }
+        else if (!name.contains("_"))
+        {
+            // 不含下划线,仅将首字母大写
+            return name.substring(0, 1).toUpperCase() + name.substring(1);
+        }
+        // 用下划线将原始字符串分割
+        String[] camels = name.split("_");
+        for (String camel : camels)
+        {
+            // 跳过原始字符串中开头、结尾的下换线或双重下划线
+            if (camel.isEmpty())
+            {
+                continue;
+            }
+            // 首字母大写
+            result.append(camel.substring(0, 1).toUpperCase());
+            result.append(camel.substring(1).toLowerCase());
+        }
+        return result.toString();
+    }
+
+    /**
+     * 驼峰式命名法 例如:user_name->userName
+     */
+    public static String toCamelCase(String s)
+    {
+        if (s == null)
+        {
+            return null;
+        }
+        s = s.toLowerCase();
+        StringBuilder sb = new StringBuilder(s.length());
+        boolean upperCase = false;
+        for (int i = 0; i < s.length(); i++)
+        {
+            char c = s.charAt(i);
+
+            if (c == SEPARATOR)
+            {
+                upperCase = true;
+            }
+            else if (upperCase)
+            {
+                sb.append(Character.toUpperCase(c));
+                upperCase = false;
+            }
+            else
+            {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+
+    @SuppressWarnings("unchecked")
+    public static <T> T cast(Object obj)
+    {
+        return (T) obj;
+    }
+}

+ 49 - 0
src/main/java/com/activiti6/common/utils/TableSupport.java

@@ -0,0 +1,49 @@
+package com.activiti6.common.utils;
+
+import com.activiti6.domain.PageDomain;
+
+/**
+ * 表格数据处理
+ *
+ * @author gybank
+ */
+public class TableSupport
+{
+    /**
+     * 当前记录起始索引
+     */
+    public static final String PAGE_NUM = "pageNum";
+
+    /**
+     * 每页显示记录数
+     */
+    public static final String PAGE_SIZE = "pageSize";
+
+    /**
+     * 排序列
+     */
+    public static final String ORDER_BY_COLUMN = "orderByColumn";
+
+    /**
+     * 排序的方向 "desc" 或者 "asc".
+     */
+    public static final String IS_ASC = "isAsc";
+
+    /**
+     * 封装分页对象
+     */
+    public static PageDomain getPageDomain()
+    {
+        PageDomain pageDomain = new PageDomain();
+        pageDomain.setPageNum(ServletUtils.getParameterToInt(PAGE_NUM));
+        pageDomain.setPageSize(ServletUtils.getParameterToInt(PAGE_SIZE));
+        pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN));
+        pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC));
+        return pageDomain;
+    }
+
+    public static PageDomain buildPageRequest()
+    {
+        return getPageDomain();
+    }
+}

+ 48 - 0
src/main/java/com/activiti6/config/ActivitiConfig.java

@@ -0,0 +1,48 @@
+package com.activiti6.config;
+
+import javax.sql.DataSource;
+
+import org.activiti.engine.ProcessEngineConfiguration;
+import org.activiti.engine.impl.history.HistoryLevel;
+import org.activiti.spring.SpringProcessEngineConfiguration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.PlatformTransactionManager;
+
+/**
+ * activiti 配置类
+ * liuzhize 2019年3月7日下午3:26:56
+ */
+@Configuration
+public class ActivitiConfig {
+
+    @Autowired
+    private DataSource dataSource;
+    @Autowired
+    private PlatformTransactionManager transactionManager;
+
+    /**
+     * 初始化配置
+     *
+     * @return
+     */
+    @Bean
+    public SpringProcessEngineConfiguration processEngineConfiguration() {
+        SpringProcessEngineConfiguration configuration = new SpringProcessEngineConfiguration();
+        // 执行工作流对应的数据源
+        configuration.setDataSource(dataSource);
+        // 是否自动创建流程引擎表
+        configuration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
+        configuration.setAsyncExecutorActivate(false);
+        // 流程历史等级
+        configuration.setHistoryLevel(HistoryLevel.FULL);
+        // 流程图字体
+        configuration.setActivityFontName("宋体");
+        configuration.setAnnotationFontName("宋体");
+        configuration.setLabelFontName("宋体");
+        configuration.setTransactionManager(transactionManager);
+        return configuration;
+
+    }
+}

+ 26 - 0
src/main/java/com/activiti6/config/CorsConfig.java

@@ -0,0 +1,26 @@
+package com.activiti6.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class CorsConfig {
+    private CorsConfiguration buildConfig() {
+        CorsConfiguration corsConfiguration = new CorsConfiguration();
+        corsConfiguration.addAllowedOrigin("*"); //允许任何域名
+        corsConfiguration.addAllowedHeader("*"); //允许任何头
+        corsConfiguration.addAllowedMethod("*"); //允许任何方法
+        return corsConfiguration;
+    }
+
+    @Bean
+    public CorsFilter corsFilter() {
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", buildConfig()); //注册
+        return new CorsFilter(source);
+    }
+}

+ 42 - 0
src/main/java/com/activiti6/config/MyFilter.java

@@ -0,0 +1,42 @@
+package com.activiti6.config;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.util.Map;
+
+@Component
+public class MyFilter implements Filter {
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    @Override
+    public void init(FilterConfig filterConfig) throws ServletException {
+        System.out.println(" myfilter init");
+    }
+
+    @Override
+    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+        HttpServletRequest request= (HttpServletRequest) servletRequest;
+        String requestURI = request.getRequestURI();
+        String method = request.getMethod();
+        logger.info("******目标访问参数******");
+        logger.info("目标访问路径:" + requestURI);
+        logger.info("目标访问提交方式:" + method);
+        Map<String, String[]> map = request.getParameterMap();
+        map.forEach((k, v) -> {
+            logger.info("请求参数-- " + k + ": " + v[0]);
+        });
+        logger.info("************************");
+        filterChain.doFilter(servletRequest, servletResponse);
+
+    }
+
+    @Override
+    public void destroy() {
+        System.out.println("myfilter destroy");
+    }
+}

+ 31 - 0
src/main/java/com/activiti6/config/WebMvcConfigurer.java

@@ -0,0 +1,31 @@
+package com.activiti6.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.Ordered;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+/**
+ * 加载静态资源类
+ * liuzhize 2019年3月7日下午3:25:49
+ */
+@Configuration
+public class WebMvcConfigurer extends WebMvcConfigurerAdapter {
+
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("/static/**")
+                .addResourceLocations("classpath:/static/");
+        super.addResourceHandlers(registry);
+    }
+
+    @Override
+    public void addViewControllers(ViewControllerRegistry registry) {
+        registry.addViewController("/").setViewName("forward:/index");
+        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
+        super.addViewControllers(registry);
+    }
+
+
+}

+ 36 - 0
src/main/java/com/activiti6/config/event/listener/task/EndListener.java

@@ -0,0 +1,36 @@
+package com.activiti6.config.event.listener.task;
+
+
+import com.activiti6.domain.ProcessInstanceEvEntFrom;
+import org.activiti.engine.delegate.DelegateExecution;
+import org.activiti.engine.delegate.ExecutionListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+@Component
+public class EndListener implements ExecutionListener {
+    protected final Logger logger = LoggerFactory.getLogger(EndListener.class);
+
+    @Override
+    public void notify(DelegateExecution delegateExecution) {
+        Map<String, Object> variables =  delegateExecution.getVariables();
+        Long formId =Long.parseLong(delegateExecution.getVariable("formId").toString());
+        String formKey =delegateExecution.getVariable("formKey").toString();
+        ProcessInstanceEvEntFrom processInstanceEvEntFrom=new ProcessInstanceEvEntFrom();
+        processInstanceEvEntFrom.setFormId(formId);
+        processInstanceEvEntFrom.setFormKey(formKey);
+//        RemoteActivitiOperationService remoteActivitiOperationService = SpringUtils.getBean(RemoteActivitiOperationService.class);
+//        R end = remoteActivitiOperationService.end(processInstanceEvEntFrom);
+//        int code = end.getCode();
+//        if(200!=code){
+//            throw new RuntimeException("远程更新数据失败!");
+//        }
+        logger.info("执行了结束监听");
+    }
+
+
+
+}

+ 33 - 0
src/main/java/com/activiti6/config/event/listener/task/RejectListener.java

@@ -0,0 +1,33 @@
+
+package com.activiti6.config.event.listener.task;
+
+
+import com.activiti6.domain.ProcessInstanceEvEntFrom;
+import org.activiti.engine.delegate.DelegateExecution;
+import org.activiti.engine.delegate.ExecutionListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class RejectListener implements ExecutionListener {
+    protected final Logger logger = LoggerFactory.getLogger(RejectListener.class);
+
+    @Override
+    public void notify(DelegateExecution delegateExecution) {
+        Long formId =Long.parseLong(delegateExecution.getVariable("formId").toString());
+        String formKey =delegateExecution.getVariable("formKey").toString();
+        ProcessInstanceEvEntFrom processInstanceEvEntFrom=new ProcessInstanceEvEntFrom();
+        processInstanceEvEntFrom.setFormId(formId);
+        processInstanceEvEntFrom.setFormKey(formKey);
+//        RemoteActivitiOperationService remoteActivitiOperationService = SpringUtils.getBean(RemoteActivitiOperationService.class);
+//        R end = remoteActivitiOperationService.reject(processInstanceEvEntFrom);
+//        int code = end.getCode();
+//        if(200!=code){
+//            throw new RuntimeException("远程更新数据失败!");
+//        }
+        logger.info("执行了驳回监听");
+}
+
+}
+

+ 189 - 0
src/main/java/com/activiti6/config/img/CFProcessDiagramCanvasExt.java

@@ -0,0 +1,189 @@
+package com.activiti6.config.img;
+
+
+import org.activiti.bpmn.model.AssociationDirection;
+import org.activiti.bpmn.model.GraphicInfo;
+import org.activiti.image.impl.DefaultProcessDiagramCanvas;
+
+import java.awt.*;
+import java.awt.font.FontRenderContext;
+import java.awt.font.LineBreakMeasurer;
+import java.awt.font.TextAttribute;
+import java.awt.font.TextLayout;
+import java.awt.geom.Path2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.geom.RoundRectangle2D;
+import java.text.AttributedCharacterIterator;
+import java.text.AttributedString;
+
+public class CFProcessDiagramCanvasExt extends DefaultProcessDiagramCanvas {
+
+    private static final int FONT = 15;
+
+    //定义连线颜色为蓝色
+    protected static Color HIGHLIGHT_SequenceFlow_COLOR = Color.green;
+
+    public CFProcessDiagramCanvasExt(int width, int height, int minX, int minY, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) {
+        super(width, height, minX, minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
+    }
+
+    /**
+     * 重写绘制连线的方式,设置绘制颜色
+     */
+    @Override
+    public void drawConnection(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, String connectionType, AssociationDirection associationDirection, boolean highLighted, double scaleFactor) {
+        Paint originalPaint = this.g.getPaint();
+        Stroke originalStroke = this.g.getStroke();
+        this.g.setPaint(CONNECTION_COLOR);
+        if (connectionType.equals("association")) {
+            this.g.setStroke(ASSOCIATION_STROKE);
+        } else if (highLighted) {
+            this.g.setPaint(HIGHLIGHT_SequenceFlow_COLOR);
+            this.g.setStroke(HIGHLIGHT_FLOW_STROKE);
+        }
+
+        for (int i = 1; i < xPoints.length; ++i) {
+            Integer sourceX = xPoints[i - 1];
+            Integer sourceY = yPoints[i - 1];
+            Integer targetX = xPoints[i];
+            Integer targetY = yPoints[i];
+            java.awt.geom.Line2D.Double line = new java.awt.geom.Line2D.Double((double) sourceX, (double) sourceY, (double) targetX, (double) targetY);
+            this.g.draw(line);
+        }
+
+        java.awt.geom.Line2D.Double line;
+        if (isDefault) {
+            line = new java.awt.geom.Line2D.Double((double) xPoints[0], (double) yPoints[0], (double) xPoints[1], (double) yPoints[1]);
+            this.drawDefaultSequenceFlowIndicator(line, scaleFactor);
+        }
+
+        if (conditional) {
+            line = new java.awt.geom.Line2D.Double((double) xPoints[0], (double) yPoints[0], (double) xPoints[1], (double) yPoints[1]);
+            this.drawConditionalSequenceFlowIndicator(line, scaleFactor);
+        }
+
+        if (associationDirection.equals(AssociationDirection.ONE) || associationDirection.equals(AssociationDirection.BOTH)) {
+            line = new java.awt.geom.Line2D.Double((double) xPoints[xPoints.length - 2], (double) yPoints[xPoints.length - 2], (double) xPoints[xPoints.length - 1], (double) yPoints[xPoints.length - 1]);
+            this.drawArrowHead(line, scaleFactor);
+        }
+
+        if (associationDirection.equals(AssociationDirection.BOTH)) {
+            line = new java.awt.geom.Line2D.Double((double) xPoints[1], (double) yPoints[1], (double) xPoints[0], (double) yPoints[0]);
+            this.drawArrowHead(line, scaleFactor);
+        }
+
+        this.g.setPaint(originalPaint);
+        this.g.setStroke(originalStroke);
+    }
+
+    @Override
+    public void drawHighLight(int x, int y, int width, int height) {
+        Paint originalPaint = g.getPaint();
+        Stroke originalStroke = g.getStroke();
+        this.g.setPaint(Color.GREEN);
+        this.g.setStroke(THICK_TASK_BORDER_STROKE);
+
+        RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
+        this.g.draw(rect);
+
+        this.g.setPaint(originalPaint);
+        this.g.setStroke(originalStroke);
+    }
+
+    public void drawHighLight(int x, int y, int width, int height, Color color) {
+        Paint originalPaint = g.getPaint();
+        Stroke originalStroke = g.getStroke();
+        this.g.setPaint(color);
+        this.g.setStroke(THICK_TASK_BORDER_STROKE);
+
+        RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
+        this.g.draw(rect);
+
+        this.g.setPaint(originalPaint);
+        this.g.setStroke(originalStroke);
+    }
+
+    @Override
+    public void drawTextAnnotation(String text, GraphicInfo graphicInfo) {
+        int x = (int) graphicInfo.getX();
+        int y = (int) graphicInfo.getY();
+        int width = (int) graphicInfo.getWidth();
+        int height = (int) graphicInfo.getHeight();
+
+        Font originalFont = g.getFont();
+        Stroke originalStroke = g.getStroke();
+
+        ANNOTATION_FONT = new Font(labelFontName, Font.ITALIC, FONT);
+        g.setFont(ANNOTATION_FONT);
+
+        Path2D path = new Path2D.Double();
+        x += .5;
+        int lineLength = 18;
+        path.moveTo(x + lineLength, y);
+        path.lineTo(x, y);
+        path.lineTo(x, y + height);
+        path.lineTo(x + lineLength, y + height);
+
+        path.lineTo(x + lineLength, y + height -1);
+        path.lineTo(x + 1, y + height -1);
+        path.lineTo(x + 1, y + 1);
+        path.lineTo(x + lineLength, y + 1);
+        path.closePath();
+
+        g.draw(path);
+
+        int boxWidth = width - (2 * ANNOTATION_TEXT_PADDING);
+        int boxHeight = height - (2 * ANNOTATION_TEXT_PADDING);
+        int boxX = x + width/2 - boxWidth/2;
+        int boxY = y + height/2 - boxHeight/2;
+
+        if (text != null && text.isEmpty() == false) {
+            drawMultilineAnnotationText(text, boxX, boxY, boxWidth, boxHeight);
+        }
+
+        // restore originals
+        g.setFont(originalFont);
+        g.setStroke(originalStroke);
+    }
+
+    @Override
+    public void drawLabel(String text, GraphicInfo graphicInfo, boolean centered) {
+        float interline = 1.0f;
+
+        // text
+        if (text != null && text.length() > 0) {
+            Paint originalPaint = g.getPaint();
+            Font originalFont = g.getFont();
+
+            g.setPaint(Color.BLACK);
+            LABEL_FONT = new Font(labelFontName, Font.ITALIC, FONT);
+            g.setFont(LABEL_FONT);
+            int wrapWidth = 200;
+            int textY = (int) graphicInfo.getY();
+
+            // TODO: use drawMultilineText()
+            AttributedString as = new AttributedString(text);
+            as.addAttribute(TextAttribute.FOREGROUND, g.getPaint());
+            as.addAttribute(TextAttribute.FONT, g.getFont());
+            AttributedCharacterIterator aci = as.getIterator();
+            FontRenderContext frc = new FontRenderContext(null, true, false);
+            LineBreakMeasurer lbm = new LineBreakMeasurer(aci, frc);
+
+            while (lbm.getPosition() < text.length()) {
+                TextLayout tl = lbm.nextLayout(wrapWidth);
+                textY += tl.getAscent();
+                Rectangle2D bb = tl.getBounds();
+                double tX = graphicInfo.getX();
+                if (centered) {
+                    tX += (int) (graphicInfo.getWidth() / 2 - bb.getWidth() / 2);
+                }
+                tl.draw(g, (float) tX, textY);
+                textY += tl.getDescent() + tl.getLeading() + (interline - 1.0f) * tl.getAscent();
+            }
+
+            // restore originals
+            g.setFont(originalFont);
+            g.setPaint(originalPaint);
+        }
+    }
+}

+ 324 - 0
src/main/java/com/activiti6/config/img/ProcessDiagramGenarateExt.java

@@ -0,0 +1,324 @@
+package com.activiti6.config.img;
+
+import org.activiti.bpmn.model.Process;
+import org.activiti.bpmn.model.*;
+import org.activiti.image.impl.DefaultProcessDiagramCanvas;
+import org.activiti.image.impl.DefaultProcessDiagramGenerator;
+
+import java.awt.*;
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.List;
+
+public class ProcessDiagramGenarateExt extends DefaultProcessDiagramGenerator {
+
+    public InputStream generateDiagram(boolean end,BpmnModel bpmnModel, String imageType, List<String> highLightedActivities, List<String> highLightedFlows,
+                                       String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader, double scaleFactor) {
+
+        return generateProcessDiagram(end,bpmnModel, imageType, highLightedActivities, highLightedFlows,
+                activityFontName, labelFontName, annotationFontName, customClassLoader, scaleFactor).generateImage(imageType);
+    }
+
+    public InputStream generateDiagram(BpmnModel bpmnModel, String imageType, String activityFontName,
+                                       String labelFontName, String annotationFontName, ClassLoader customClassLoader, double scaleFactor) {
+
+        return generateDiagram(bpmnModel, imageType, Collections.<String>emptyList(), Collections.<String>emptyList(),
+                activityFontName, labelFontName, annotationFontName, customClassLoader, scaleFactor);
+    }
+
+    public InputStream generateDiagram(BpmnModel bpmnModel, String imageType, List<String> highLightedActivities, List<String> highLightedFlows,
+                                       String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader, double scaleFactor) {
+
+        return generateProcessDiagram(bpmnModel, imageType, highLightedActivities, highLightedFlows,
+                activityFontName, labelFontName, annotationFontName, customClassLoader, scaleFactor).generateImage(imageType);
+    }
+
+    protected DefaultProcessDiagramCanvas generateProcessDiagram(BpmnModel bpmnModel, String imageType,
+                                                                 List<String> highLightedActivities, List<String> highLightedFlows,
+                                                                 String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader, double scaleFactor) {
+
+        prepareBpmnModel(bpmnModel);
+
+        DefaultProcessDiagramCanvas processDiagramCanvas = initProcessDiagramCanvas(bpmnModel, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
+
+        // Draw pool shape, if process is participant in collaboration
+        for (Pool pool : bpmnModel.getPools()) {
+            GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(pool.getId());
+            processDiagramCanvas.drawPoolOrLane(pool.getName(), graphicInfo);
+        }
+
+        // Draw lanes
+        for (Process process : bpmnModel.getProcesses()) {
+            for (Lane lane : process.getLanes()) {
+                GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(lane.getId());
+                processDiagramCanvas.drawPoolOrLane(lane.getName(), graphicInfo);
+            }
+        }
+
+        // Draw activities and their sequence-flows
+        for (FlowNode flowNode : bpmnModel.getProcesses().get(0).findFlowElementsOfType(FlowNode.class)) {
+            drawActivity(processDiagramCanvas, bpmnModel, flowNode, highLightedActivities, highLightedFlows, scaleFactor);
+        }
+
+        for (Process process: bpmnModel.getProcesses()) {
+            for (FlowNode flowNode : process.findFlowElementsOfType(FlowNode.class)) {
+                drawActivity(processDiagramCanvas, bpmnModel, flowNode, highLightedActivities, highLightedFlows, scaleFactor);
+            }
+        }
+
+        // Draw artifacts
+        for (Process process : bpmnModel.getProcesses()) {
+
+            for (Artifact artifact : process.getArtifacts()) {
+                drawArtifact(processDiagramCanvas, bpmnModel, artifact);
+            }
+
+            List<SubProcess> subProcesses = process.findFlowElementsOfType(SubProcess.class, true);
+            if (subProcesses != null) {
+                for (SubProcess subProcess : subProcesses) {
+                    for (Artifact subProcessArtifact : subProcess.getArtifacts()) {
+                        drawArtifact(processDiagramCanvas, bpmnModel, subProcessArtifact);
+                    }
+                }
+            }
+        }
+
+        return processDiagramCanvas;
+    }
+
+
+    //@Override
+    protected DefaultProcessDiagramCanvas generateProcessDiagram(boolean end,BpmnModel bpmnModel, String imageType, List<String> highLightedActivities, List<String> highLightedFlows, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader, double scaleFactor) {
+        this.prepareBpmnModel(bpmnModel);
+        DefaultProcessDiagramCanvas processDiagramCanvas = initProcessDiagramCanvas(bpmnModel, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
+        // Draw pool shape, if process is participant in collaboration
+        for (Pool pool : bpmnModel.getPools()) {
+            GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(pool.getId());
+            processDiagramCanvas.drawPoolOrLane(pool.getName(), graphicInfo);
+        }
+
+        // Draw lanes
+        for (Process process : bpmnModel.getProcesses()) {
+            for (Lane lane : process.getLanes()) {
+                GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(lane.getId());
+                processDiagramCanvas.drawPoolOrLane(lane.getName(), graphicInfo);
+            }
+        }
+
+        // Draw activities and their sequence-flows
+        for (FlowNode flowNode : bpmnModel.getProcesses().get(0).findFlowElementsOfType(FlowNode.class)) {
+            drawActivity(processDiagramCanvas, bpmnModel, flowNode, highLightedActivities, highLightedFlows, scaleFactor);
+        }
+
+        for (Process process : bpmnModel.getProcesses()) {
+            for (FlowNode flowNode : process.findFlowElementsOfType(FlowNode.class)) {
+                drawActivity(processDiagramCanvas, bpmnModel, flowNode, highLightedActivities, highLightedFlows, scaleFactor);
+            }
+        }
+
+        // Draw artifacts
+        for (Process process : bpmnModel.getProcesses()) {
+
+            for (Artifact artifact : process.getArtifacts()) {
+                drawArtifact(processDiagramCanvas, bpmnModel, artifact);
+            }
+
+            List<SubProcess> subProcesses = process.findFlowElementsOfType(SubProcess.class, true);
+            if (subProcesses != null) {
+                for (SubProcess subProcess : subProcesses) {
+                    for (Artifact subProcessArtifact : subProcess.getArtifacts()) {
+                        drawArtifact(processDiagramCanvas, bpmnModel, subProcessArtifact);
+                    }
+                }
+            }
+        }
+        if(!end){
+            int size = highLightedActivities.size();
+            if(size>0){
+                String s = highLightedActivities.get( size- 1);
+                GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(s);
+                drawHighLight(processDiagramCanvas,graphicInfo , Color.RED);
+            }
+        }
+        return processDiagramCanvas;
+    }
+
+
+
+    @Override
+    protected void drawActivity(DefaultProcessDiagramCanvas ccf, BpmnModel bpmnModel,
+                                FlowNode flowNode, List<String> highLightedActivities, List<String> highLightedFlows, double scaleFactor) {
+        CFProcessDiagramCanvasExt processDiagramCanvas = (CFProcessDiagramCanvasExt) ccf;
+        ActivityDrawInstruction drawInstruction = activityDrawInstructions.get(flowNode.getClass());
+        if (drawInstruction != null) {
+
+            drawInstruction.draw(processDiagramCanvas, bpmnModel, flowNode);
+
+            // Gather info on the multi instance marker
+            boolean multiInstanceSequential = false, multiInstanceParallel = false, collapsed = false;
+            if (flowNode instanceof Activity) {
+                Activity activity = (Activity) flowNode;
+                MultiInstanceLoopCharacteristics multiInstanceLoopCharacteristics = activity.getLoopCharacteristics();
+                if (multiInstanceLoopCharacteristics != null) {
+                    multiInstanceSequential = multiInstanceLoopCharacteristics.isSequential();
+                    multiInstanceParallel = !multiInstanceSequential;
+                }
+            }
+
+            // Gather info on the collapsed marker
+            GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(flowNode.getId());
+            if (flowNode instanceof SubProcess) {
+                collapsed = graphicInfo.getExpanded() != null && !graphicInfo.getExpanded();
+            } else if (flowNode instanceof CallActivity) {
+                collapsed = true;
+            }
+
+            if (scaleFactor == 1.0) {
+                // Actually draw the markers
+                processDiagramCanvas.drawActivityMarkers((int) graphicInfo.getX(), (int) graphicInfo.getY(), (int) graphicInfo.getWidth(), (int) graphicInfo.getHeight(),
+                        multiInstanceSequential, multiInstanceParallel, collapsed);
+            }
+
+            // Draw highlighted activities
+            if (highLightedActivities.contains(flowNode.getId())) {
+                GraphicInfo graphicInfo1 = bpmnModel.getGraphicInfo(flowNode.getId());
+                drawHighLight(processDiagramCanvas,graphicInfo1 , Color.GREEN);
+            }
+
+        }
+
+        // Outgoing transitions of activity
+        for (SequenceFlow sequenceFlow : flowNode.getOutgoingFlows()) {
+            boolean highLighted = (highLightedFlows.contains(sequenceFlow.getId()));
+            String defaultFlow = null;
+            if (flowNode instanceof Activity) {
+                defaultFlow = ((Activity) flowNode).getDefaultFlow();
+            } else if (flowNode instanceof Gateway) {
+                defaultFlow = ((Gateway) flowNode).getDefaultFlow();
+            }
+
+            boolean isDefault = false;
+            if (defaultFlow != null && defaultFlow.equalsIgnoreCase(sequenceFlow.getId())) {
+                isDefault = true;
+            }
+            boolean drawConditionalIndicator = sequenceFlow.getConditionExpression() != null && !(flowNode instanceof Gateway);
+
+            String sourceRef = sequenceFlow.getSourceRef();
+            String targetRef = sequenceFlow.getTargetRef();
+            FlowElement sourceElement = bpmnModel.getFlowElement(sourceRef);
+            FlowElement targetElement = bpmnModel.getFlowElement(targetRef);
+            List<GraphicInfo> graphicInfoList = bpmnModel.getFlowLocationGraphicInfo(sequenceFlow.getId());
+            if (graphicInfoList != null && graphicInfoList.size() > 0) {
+                graphicInfoList = connectionPerfectionizer(processDiagramCanvas, bpmnModel, sourceElement, targetElement, graphicInfoList);
+                int xPoints[] = new int[graphicInfoList.size()];
+                int yPoints[] = new int[graphicInfoList.size()];
+
+                for (int i = 1; i < graphicInfoList.size(); i++) {
+                    GraphicInfo graphicInfo = graphicInfoList.get(i);
+                    GraphicInfo previousGraphicInfo = graphicInfoList.get(i - 1);
+
+                    if (i == 1) {
+                        xPoints[0] = (int) previousGraphicInfo.getX();
+                        yPoints[0] = (int) previousGraphicInfo.getY();
+                    }
+                    xPoints[i] = (int) graphicInfo.getX();
+                    yPoints[i] = (int) graphicInfo.getY();
+
+                }
+
+                processDiagramCanvas.drawSequenceflow(xPoints, yPoints, drawConditionalIndicator, isDefault, highLighted, scaleFactor);
+                GraphicInfo labelGraphicInfo = bpmnModel.getLabelGraphicInfo(sequenceFlow.getId());
+                if (labelGraphicInfo != null) {
+                    processDiagramCanvas.drawLabel(sequenceFlow.getName(), labelGraphicInfo, false);
+                } else {
+                    //反编译class得到,主要处理线文字不显示
+                    GraphicInfo lineCenter = getLineCenter(graphicInfoList);
+                    processDiagramCanvas.drawLabel(sequenceFlow.getName(), lineCenter, false);
+                }
+            }
+        }
+
+        // Nested elements
+        if (flowNode instanceof FlowElementsContainer) {
+            for (FlowElement nestedFlowElement : ((FlowElementsContainer) flowNode).getFlowElements()) {
+                if (nestedFlowElement instanceof FlowNode) {
+                    drawActivity(processDiagramCanvas, bpmnModel, (FlowNode) nestedFlowElement,
+                            highLightedActivities, highLightedFlows, scaleFactor);
+                }
+            }
+        }
+    }
+
+
+
+    private static void drawHighLight(DefaultProcessDiagramCanvas processDiagramCanvas, GraphicInfo graphicInfo) {
+        processDiagramCanvas.drawHighLight((int) graphicInfo.getX(), (int) graphicInfo.getY(), (int) graphicInfo.getWidth(), (int) graphicInfo.getHeight());
+    }
+
+    private static void drawHighLight(DefaultProcessDiagramCanvas pdcs, GraphicInfo graphicInfo, Color color) {
+        CFProcessDiagramCanvasExt processDiagramCanvas = (CFProcessDiagramCanvasExt) pdcs;
+        processDiagramCanvas.drawHighLight((int) graphicInfo.getX(), (int) graphicInfo.getY(), (int) graphicInfo.getWidth(), (int) graphicInfo.getHeight(), color);
+    }
+
+
+    protected static DefaultProcessDiagramCanvas initProcessDiagramCanvas(BpmnModel bpmnModel, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) {
+        // We need to calculate maximum values to know how big the image will be in its entirety
+        double minX = Double.MAX_VALUE;
+        double maxX = 0;
+        double minY = Double.MAX_VALUE;
+        double maxY = 0;
+
+        for (Pool pool : bpmnModel.getPools()) {
+            GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(pool.getId());
+            minX = graphicInfo.getX();
+            maxX = graphicInfo.getX() + graphicInfo.getWidth();
+            minY = graphicInfo.getY();
+            maxY = graphicInfo.getY() + graphicInfo.getHeight();
+        }
+
+        List<FlowNode> flowNodes = gatherAllFlowNodes(bpmnModel);
+        for (FlowNode flowNode : flowNodes) {
+
+            GraphicInfo flowNodeGraphicInfo = bpmnModel.getGraphicInfo(flowNode.getId());
+
+            // width
+            if (flowNodeGraphicInfo.getX() + flowNodeGraphicInfo.getWidth() > maxX) {
+                maxX = flowNodeGraphicInfo.getX() + flowNodeGraphicInfo.getWidth();
+            }
+            if (flowNodeGraphicInfo.getX() < minX) {
+                minX = flowNodeGraphicInfo.getX();
+            }
+            // height
+            if (flowNodeGraphicInfo.getY() + flowNodeGraphicInfo.getHeight() > maxY) {
+                maxY = flowNodeGraphicInfo.getY() + flowNodeGraphicInfo.getHeight();
+            }
+            if (flowNodeGraphicInfo.getY() < minY) {
+                minY = flowNodeGraphicInfo.getY();
+            }
+
+            for (SequenceFlow sequenceFlow : flowNode.getOutgoingFlows()) {
+                List<GraphicInfo> graphicInfoList = bpmnModel.getFlowLocationGraphicInfo(sequenceFlow.getId());
+                if (graphicInfoList != null) {
+                    for (GraphicInfo graphicInfo : graphicInfoList) {
+                        // width
+                        if (graphicInfo.getX() > maxX) {
+                            maxX = graphicInfo.getX();
+                        }
+                        if (graphicInfo.getX() < minX) {
+                            minX = graphicInfo.getX();
+                        }
+                        // height
+                        if (graphicInfo.getY() > maxY) {
+                            maxY = graphicInfo.getY();
+                        }
+                        if (graphicInfo.getY() < minY) {
+                            minY = graphicInfo.getY();
+                        }
+                    }
+                }
+            }
+        }
+        //设置返回自定义ProcessDiagramCanvas
+        return new CFProcessDiagramCanvasExt((int) maxX + 20, (int) maxY + 20, (int) minX, (int) minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
+    }
+}

+ 37 - 0
src/main/java/com/activiti6/controller/BaseController.java

@@ -0,0 +1,37 @@
+package com.activiti6.controller;
+
+import com.activiti6.entity.AjaxEntityVo;
+
+public class BaseController {
+    public AjaxEntityVo success(){
+        AjaxEntityVo ajaxEntityVo=new AjaxEntityVo();
+        ajaxEntityVo.setCode(0);
+        ajaxEntityVo.setMsg("success");
+        return  ajaxEntityVo;
+    }
+
+    public AjaxEntityVo success(Object data){
+        AjaxEntityVo ajaxEntityVo=new AjaxEntityVo();
+        ajaxEntityVo.setCode(0);
+        ajaxEntityVo.setMsg("success");
+        ajaxEntityVo.setData(data);
+        return  ajaxEntityVo;
+    }
+
+    public AjaxEntityVo success(Integer count,Object data){
+        AjaxEntityVo ajaxEntityVo=new AjaxEntityVo();
+        ajaxEntityVo.setCode(0);
+        ajaxEntityVo.setMsg("success");
+        ajaxEntityVo.setData(data);
+        ajaxEntityVo.setCount(count);
+        return  ajaxEntityVo;
+    }
+
+    public AjaxEntityVo error(String msg){
+        AjaxEntityVo ajaxEntityVo=new AjaxEntityVo();
+        ajaxEntityVo.setCode(1);
+        ajaxEntityVo.setMsg(msg);
+        return  ajaxEntityVo;
+    }
+
+}

+ 363 - 0
src/main/java/com/activiti6/controller/ModelerController.java

@@ -0,0 +1,363 @@
+package com.activiti6.controller;
+
+import com.activiti6.controller.editor.ModelSaveRestResource;
+import com.activiti6.entity.AjaxEntityVo;
+import com.activiti6.service.ModelService;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.activiti.bpmn.converter.BpmnXMLConverter;
+import org.activiti.bpmn.model.BpmnModel;
+import org.activiti.bpmn.model.Process;
+import org.activiti.editor.constants.ModelDataJsonConstants;
+import org.activiti.editor.language.json.converter.BpmnJsonConverter;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.RepositoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.repository.Deployment;
+import org.activiti.engine.repository.Model;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.BufferedOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 流程控制器
+ * liuzhize 2019年3月7日下午3:28:14
+ */
+@Controller
+public class ModelerController extends BaseController {
+
+    private static final Logger logger = LoggerFactory.getLogger(ModelerController.class);
+
+    @Autowired
+    private RepositoryService repositoryService;
+    @Autowired
+    private ObjectMapper objectMapper;
+    @Autowired
+    private HistoryService historyService;
+    @Autowired
+    private RuntimeService runtimeService;
+
+
+
+    @RequestMapping("index")
+    public ModelAndView index(ModelAndView modelAndView) {
+        modelAndView.setViewName("index");
+        modelAndView.addObject("modelList", repositoryService.createModelQuery().list());
+        return modelAndView;
+    }
+
+    @RequestMapping("/list")
+    @ResponseBody
+    public AjaxEntityVo list(ModelAndView modelAndView) {
+        List<Model> list = repositoryService.createModelQuery().list();
+        return success(list.size(), list);
+    }
+
+
+    /**
+     * 跳转编辑器页面
+     *
+     * @return
+     */
+    @GetMapping("editor")
+    public String editor() {
+        return "modeler";
+    }
+
+
+    /**
+     * 创建模型
+     *
+     * @param response
+     * @param name     模型名称
+     * @param key      模型key
+     */
+    @RequestMapping("/create")
+    public void create(HttpServletResponse response, String name, String key, String description) throws IOException {
+        logger.info("创建模型入参name:{},key:{}", name, key);
+        Model model = repositoryService.newModel();
+        ObjectNode modelNode = objectMapper.createObjectNode();
+        //模型名称
+        modelNode.put(ModelDataJsonConstants.MODEL_NAME, name);
+        //模型备注
+        modelNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, description);
+        modelNode.put(ModelDataJsonConstants.MODEL_REVISION, 1);
+        model.setName(name);
+        model.setKey(key);
+        model.setMetaInfo(modelNode.toString());
+        repositoryService.saveModel(model);
+        createObjectNode(model.getId());
+        response.sendRedirect("/editor?modelId=" + model.getId());
+        logger.info("创建模型结束,返回模型ID:{}", model.getId());
+    }
+
+    /**
+     * 创建模型时完善ModelEditorSource
+     *
+     * @param modelId
+     */
+    @SuppressWarnings("deprecation")
+    private void createObjectNode(String modelId) {
+        logger.info("创建模型完善ModelEditorSource入参模型ID:{}", modelId);
+        ObjectNode editorNode = objectMapper.createObjectNode();
+        editorNode.put("id", "canvas");
+        editorNode.put("resourceId", "canvas");
+        ObjectNode stencilSetNode = objectMapper.createObjectNode();
+        stencilSetNode.put("namespace", "http://b3mn.org/stencilset/bpmn2.0#");
+        editorNode.put("stencilset", stencilSetNode);
+        try {
+            repositoryService.addModelEditorSource(modelId, editorNode.toString().getBytes("utf-8"));
+        } catch (Exception e) {
+            logger.info("创建模型时完善ModelEditorSource服务异常:{}", e);
+        }
+        logger.info("创建模型完善ModelEditorSource结束");
+    }
+
+    /**
+     * 发布流程
+     *
+     * @param modelId 模型ID
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("/publish")
+    public Object publish(String modelId) {
+        logger.info("流程部署入参modelId:{}", modelId);
+        try {
+            Model modelData = repositoryService.getModel(modelId);
+            ObjectNode modelNode = (ObjectNode) new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelData.getId()));
+            byte[] bpmnBytes = null;
+            BpmnModel model = new BpmnJsonConverter().convertToBpmnModel(modelNode);
+            bpmnBytes = new BpmnXMLConverter().convertToXML(model);
+            String processName = modelData.getName() + ".bpmn20.xml";
+            Deployment deployment = repositoryService.createDeployment().name(modelData.getName()).addString(processName, new String(bpmnBytes)).deploy();
+        } catch (Exception e) {
+            logger.info("部署modelId:{}模型服务异常:{}", modelId, e);
+            return error(e.getMessage());
+        }
+        return success();
+    }
+
+    /**
+     * 根据模型id导出模型图
+     *
+     * @param response
+     * @param modelId
+     */
+    @GetMapping("export/{modelId}")
+    @ResponseBody
+    public void exportModel(HttpServletResponse response, @PathVariable String modelId) {
+        BufferedOutputStream bos = null;
+        try {
+            Model modelData = repositoryService.getModel(modelId);
+            byte[] modelEditorSource = repositoryService
+                    .getModelEditorSource(modelData.getId());
+            JsonNode editorNode = new ObjectMapper().readTree(modelEditorSource);
+            BpmnJsonConverter jsonConverter = new BpmnJsonConverter();
+            BpmnModel model = jsonConverter.convertToBpmnModel(editorNode);
+            byte[] bpmnBytes;
+            try {
+                bpmnBytes = new BpmnXMLConverter().convertToXML(model);
+            } catch (Exception e) {
+                bpmnBytes = new byte[10];
+            }
+            // 写入流
+            String filename = modelData.getName();
+            if (StringUtils.isNoneBlank(filename) && filename.length() > 20) {
+                filename = filename.substring(0, 20);
+            }
+            filename = modelData.getKey() + ".bpmn";
+            response.setContentType("application/x-msdownload;");
+            response.setHeader("Content-Disposition",
+                    "attachment; filename=" + URLEncoder.encode(filename, "UTF-8"));
+            // 封装输出流
+            bos = new BufferedOutputStream(response.getOutputStream());
+            bos.write(bpmnBytes);
+        } catch (Exception e) {
+            logger.error("下载模板失败:" + modelId + "erro:" + e);
+        } finally {
+            try {
+                bos.flush();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+            try {
+                bos.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    /**
+     * 撤销流程定义
+     *
+     * @param modelId 模型ID
+     * @param
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("/revokePublish")
+    public Object revokePublish(String modelId) {
+        logger.info("撤销发布流程入参modelId:{}", modelId);
+        Map<String, String> map = new HashMap<String, String>();
+        Model modelData = repositoryService.getModel(modelId);
+        if (null != modelData) {
+            try {
+                /**
+                 * 参数不加true:为普通删除,如果当前规则下有正在执行的流程,则抛异常
+                 * 参数加true:为级联删除,会删除和当前规则相关的所有信息,包括历史
+                 */
+                repositoryService.deleteDeployment(modelData.getDeploymentId(), true);
+                map.put("code", "SUCCESS");
+            } catch (Exception e) {
+                logger.error("撤销已部署流程服务异常:{}", e);
+                map.put("code", "FAILURE");
+            }
+        }
+        logger.info("撤销发布流程出参map:{}", map);
+        return map;
+    }
+
+
+    @Autowired
+    private ModelService modelService;
+
+    /**
+     * 删除流程实例
+     *
+     * @param modelId 模型ID
+     * @param
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("/delete")
+    public Object deleteProcessInstance(String modelId) {
+        modelService.deleteProcessInstance(modelId);
+        return success();
+    }
+
+
+    @Autowired
+    private ModelSaveRestResource modelSaveRestResource;
+
+    protected BpmnXMLConverter bpmnXmlConverter = new BpmnXMLConverter();
+
+    protected BpmnJsonConverter bpmnJsonConverter = new BpmnJsonConverter();
+
+    @ResponseBody
+    @PostMapping("upload")
+    public AjaxEntityVo importProcessModel(HttpServletRequest request, @RequestParam("file") MultipartFile file) {
+        try {
+            convertInputStreamToModel(file.getInputStream());
+        } catch (Exception e) {
+            return error(e.getMessage());
+        }
+        return success();
+    }
+
+    public void convertInputStreamToModel(InputStream is) throws Exception {
+        String modelId = null;
+
+        XMLInputFactory xif = XMLInputFactory.newInstance();
+        InputStreamReader isr = null;
+        XMLStreamReader xtr = null;
+        try {
+            isr = new InputStreamReader(is, "utf-8");
+            xtr = xif.createXMLStreamReader(isr);
+            BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr);
+            // 处理异常
+            if (bpmnModel.getMainProcess() == null
+                    || bpmnModel.getMainProcess().getId() == null) {
+                throw new Exception("模板文件可能存在问题,请检查后重试!");
+            }
+
+            ObjectNode modelNode = new BpmnJsonConverter().convertToJson(bpmnModel);
+            Model modelData = repositoryService.newModel();
+            org.activiti.bpmn.model.Process process = bpmnModel.getMainProcess();
+            String key = process.getId();
+            checkName(process);
+            String name = process.getName();
+            String description = process.getDocumentation();
+            modelData.setKey(key);
+            modelData.setName(name);
+
+            ObjectNode modelObjectNode = new ObjectMapper().createObjectNode();
+            modelObjectNode.put(ModelDataJsonConstants.MODEL_NAME, name);
+            modelObjectNode.put(ModelDataJsonConstants.MODEL_REVISION, 1);
+            modelObjectNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, description);
+            modelData.setMetaInfo(modelObjectNode.toString());
+            repositoryService.saveModel(modelData);
+            repositoryService.addModelEditorSource(modelData.getId(), modelNode.toString().getBytes("utf-8"));
+
+            modelId = modelData.getId();
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new Exception(e.getMessage());
+        } finally {
+            try {
+                xtr.close();
+            } catch (XMLStreamException e) {
+                e.printStackTrace();
+            }
+            try {
+                isr.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+            try {
+                is.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    private void checkName(Process process) {
+        String key = process.getId();
+        List<Model> list = repositoryService.createModelQuery().modelKey(key).list();
+        if (list.size() > 0) {
+            throw new RuntimeException("该流程文件已存在无法上传");
+        }
+    }
+
+    private Model uploadModel(String name, String key, String description) {
+        logger.info("创建模型入参name:{},key:{}", name, key);
+        Model model = repositoryService.newModel();
+        ObjectNode modelNode = objectMapper.createObjectNode();
+        //模型名称
+        modelNode.put(ModelDataJsonConstants.MODEL_NAME, name);
+        //模型备注
+        modelNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, description);
+        modelNode.put(ModelDataJsonConstants.MODEL_REVISION, 1);
+        model.setName(name);
+        model.setKey(key);
+        model.setMetaInfo(modelNode.toString());
+        repositoryService.saveModel(model);
+        createObjectNode(model.getId());
+        return model;
+    }
+
+
+}

+ 190 - 0
src/main/java/com/activiti6/controller/ZipFileController.java

@@ -0,0 +1,190 @@
+package com.activiti6.controller;
+
+import com.activiti6.common.utils.MultipartFileToFile;
+import com.activiti6.entity.AjaxEntityVo;
+import com.activiti6.entity.MyFormData;
+import com.activiti6.entity.MyFormDataZip;
+import com.activiti6.mapper.MyFormDataMapper;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.activiti.bpmn.converter.BpmnXMLConverter;
+import org.activiti.bpmn.model.BpmnModel;
+import org.activiti.bpmn.model.Process;
+import org.activiti.editor.constants.ModelDataJsonConstants;
+import org.activiti.editor.language.json.converter.BpmnJsonConverter;
+import org.activiti.engine.RepositoryService;
+import org.activiti.engine.repository.Model;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.*;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+@RestController
+@RequestMapping("zip")
+public class ZipFileController extends BaseController {
+
+
+    protected final Logger log = LoggerFactory.getLogger(this.getClass());
+
+    @Autowired
+    private RepositoryService repositoryService;
+
+    @Autowired
+    private MyFormDataMapper myFormDataMapper;
+
+    /*文件上传*/
+    @PostMapping("upload")
+    public AjaxEntityVo upload(MultipartFile file) throws Exception {
+
+        File parseFile = MultipartFileToFile.multipartFileToFile(file);
+        ZipFile zip = null;
+        try {
+            //指定编码,否则压缩包里面不能有中文目录
+            zip = new ZipFile(parseFile, StandardCharsets.UTF_8);
+            String msg = null;
+            List<MyFormData> list = new ArrayList();
+            for (Enumeration entries = zip.entries(); entries.hasMoreElements(); ) {
+                ZipEntry entry = (ZipEntry) entries.nextElement();
+                String zipEntryName = entry.getName();
+                String filterName = zipEntryName.split("\\.")[1].toLowerCase();
+                if (filterName.contains("o") || filterName.contains("m") || filterName.contains("n")) {
+                    //fileName +=zipEntryName+",";
+                    InputStream in = zip.getInputStream(entry);
+                    if ("bpmn".equals(filterName)) {
+                        //pushBpmn(zipEntryName, in);
+                        msg = convertInputStreamToModel(in);
+                    }
+                    if ("json".equals(filterName)) {
+                        list.add(addMyFormData(zipEntryName, in));
+                    }
+                }
+            }
+            if (!StringUtils.isEmpty(msg)) {
+                myFormDataMapper.insertList(list);
+            }
+            //必须关闭,否则无法删除该zip文件
+            zip.close();
+        } catch (Exception e) {
+            log.info("文件解析出错:文件名------->" + parseFile.getName());
+            e.printStackTrace();
+            throw new Exception(e.getMessage());
+
+        }
+        return success();
+    }
+
+    private MyFormData addMyFormData(String zipEntryName, InputStream in) {
+        log.info("文件名------->" + zipEntryName);
+        String defaultString = null;
+        try {
+            StringBuffer message = new StringBuffer();
+            BufferedReader br = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
+            String line = null;
+            while ((line = br.readLine()) != null) {
+                message.append(line);
+            }
+            defaultString = message.toString();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        String result = defaultString.replace("\r\n", "").replaceAll(" +", "");
+        MyFormDataZip jsonData = JSONObject.parseObject(result, MyFormDataZip.class);
+        MyFormData myFormData = new MyFormData();
+        BeanUtils.copyProperties(jsonData, myFormData);
+        Object jsonData1 = jsonData.getJsonData();
+        String string = JSON.toJSONString(jsonData1);
+        myFormData.setJsonData(string);
+        return myFormData;
+    }
+
+    private void pushBpmn(String zipEntryName, InputStream in) {
+        try {
+            repositoryService.createDeployment()
+                    .addInputStream(zipEntryName, in).deploy();
+        } catch (Exception e) {
+            log.info("文件解析出错:文件名------->");
+        }
+    }
+
+    public String convertInputStreamToModel(InputStream is) throws Exception {
+        String modelId = null;
+        XMLInputFactory xif = XMLInputFactory.newInstance();
+        InputStreamReader isr = null;
+        XMLStreamReader xtr = null;
+        try {
+            isr = new InputStreamReader(is, "utf-8");
+            xtr = xif.createXMLStreamReader(isr);
+            BpmnModel bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr);
+            // 处理异常
+            if (bpmnModel.getMainProcess() == null
+                    || bpmnModel.getMainProcess().getId() == null) {
+                throw new Exception("模板文件可能存在问题,请检查后重试!");
+            }
+
+            ObjectNode modelNode = new BpmnJsonConverter().convertToJson(bpmnModel);
+            Model modelData = repositoryService.newModel();
+            org.activiti.bpmn.model.Process process = bpmnModel.getMainProcess();
+            checkName(process);
+            String key = process.getId();
+            String name = process.getName();
+            String description = process.getDocumentation();
+            modelData.setKey(key);
+            modelData.setName(name);
+
+            ObjectNode modelObjectNode = new ObjectMapper().createObjectNode();
+            modelObjectNode.put(ModelDataJsonConstants.MODEL_NAME, name);
+            modelObjectNode.put(ModelDataJsonConstants.MODEL_REVISION, 1);
+            modelObjectNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, description);
+            modelData.setMetaInfo(modelObjectNode.toString());
+            repositoryService.saveModel(modelData);
+            repositoryService.addModelEditorSource(modelData.getId(), modelNode.toString().getBytes("utf-8"));
+            modelId = modelData.getId();
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new Exception(e.getMessage());
+        } finally {
+            try {
+                xtr.close();
+            } catch (XMLStreamException e) {
+                e.printStackTrace();
+            }
+            try {
+                isr.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+            try {
+                is.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return modelId;
+    }
+
+    private void checkName(Process process) throws Exception {
+        String key = process.getId();
+        List<Model> list = repositoryService.createModelQuery().modelKey(key).list();
+        if (list.size() > 0) {
+            throw new Exception("该流程文件已存在无法上传");
+        }
+    }
+}

+ 98 - 0
src/main/java/com/activiti6/controller/activiti/BaseController.java

@@ -0,0 +1,98 @@
+package com.activiti6.controller.activiti;
+
+
+import com.activiti6.common.utils.DateUtils;
+import com.activiti6.common.utils.SqlUtil;
+import com.activiti6.common.utils.StringUtils;
+import com.activiti6.common.utils.TableSupport;
+import com.activiti6.domain.AjaxResult;
+import com.activiti6.domain.HttpStatus;
+import com.activiti6.domain.PageDomain;
+import com.activiti6.domain.TableDataInfo;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.WebDataBinder;
+import org.springframework.web.bind.annotation.InitBinder;
+
+import java.beans.PropertyEditorSupport;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * web层通用数据处理
+ *
+ * @author gybank
+ */
+public class BaseController
+{
+    protected final Logger logger = LoggerFactory.getLogger(BaseController.class);
+
+    /**
+     * 将前台传递过来的日期格式的字符串,自动转化为Date类型
+     */
+    @InitBinder
+    public void initBinder(WebDataBinder binder)
+    {
+        // Date 类型转换
+        binder.registerCustomEditor(Date.class, new PropertyEditorSupport()
+        {
+            @Override
+            public void setAsText(String text)
+            {
+                setValue(DateUtils.parseDate(text));
+            }
+        });
+    }
+
+    /**
+     * 设置请求分页数据
+     */
+    protected void startPage()
+    {
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum() == null ? 1: pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize() == null ? 10 : pageDomain.getPageSize();
+        if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
+        {
+            String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
+            PageHelper.startPage(pageNum, pageSize, orderBy);
+        }
+    }
+
+    /**
+     * 响应请求分页数据
+     */
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    protected TableDataInfo getDataTable(List<?> list)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        rspData.setCode(HttpStatus.SUCCESS);
+        rspData.setRows(list);
+        rspData.setTotal(new PageInfo(list).getTotal());
+        return rspData;
+    }
+
+
+    protected TableDataInfo getDataTableByMap(List<Map<String, Object>> list)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        rspData.setCode(HttpStatus.SUCCESS);
+        rspData.setRows(list);
+        rspData.setTotal(new PageInfo(list).getTotal());
+        return rspData;
+    }
+
+    /**
+     * 响应返回结果
+     *
+     * @param rows 影响行数
+     * @return 操作结果
+     */
+    protected AjaxResult toAjax(int rows)
+    {
+        return rows > 0 ? AjaxResult.success() : AjaxResult.error();
+    }
+}

+ 73 - 0
src/main/java/com/activiti6/controller/activiti/DbTableHisController.java

@@ -0,0 +1,73 @@
+package com.activiti6.controller.activiti;
+
+
+import com.activiti6.domain.AjaxResult;
+import com.activiti6.domain.DbTableHis;
+import com.activiti6.domain.TableDataInfo;
+import com.activiti6.service.activiti.IDbTableHisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 流程历史单Controller
+ *
+ * @author xtd
+ * @date 2020-04-14
+ */
+@RestController
+@RequestMapping("/his")
+public class DbTableHisController extends BaseController
+{
+    @Autowired
+    private IDbTableHisService dbTableHisService;
+
+    /**
+     * 查询流程历史单列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(DbTableHis dbTableHis)
+    {
+        startPage();
+        List<DbTableHis> list = dbTableHisService.selectDbTableHisList(dbTableHis);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 获取流程历史单详细信息
+     */
+    @GetMapping(value = "/{instanceId}")
+    public AjaxResult getInfo(@PathVariable("instanceId") String instanceId)
+    {
+        return AjaxResult.success(dbTableHisService.selectDbTableHisById(instanceId));
+    }
+
+    /**
+     * 新增流程历史单
+     */
+    @PostMapping
+    public AjaxResult add(@RequestBody DbTableHis dbTableHis)
+    {
+        return toAjax(dbTableHisService.insertDbTableHis(dbTableHis));
+    }
+
+    /**
+     * 修改流程历史单
+     */
+    @PutMapping
+    public AjaxResult edit(@RequestBody DbTableHis dbTableHis)
+    {
+        return toAjax(dbTableHisService.updateDbTableHis(dbTableHis));
+    }
+
+    /**
+     * 删除流程历史单
+     */
+	@DeleteMapping("/{instanceIds}")
+    public AjaxResult remove(@PathVariable String[] instanceIds)
+    {
+        return toAjax(dbTableHisService.deleteDbTableHisByIds(instanceIds));
+    }
+}

+ 51 - 0
src/main/java/com/activiti6/controller/activiti/FormDataController.java

@@ -0,0 +1,51 @@
+package com.activiti6.controller.activiti;
+
+
+import com.activiti6.domain.AjaxResult;
+import com.activiti6.domain.FormdataForm;
+import com.activiti6.domain.MyFormData;
+import com.activiti6.domain.TableDataInfo;
+import com.activiti6.service.activiti.MyFormDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/formdata")
+public class FormDataController extends BaseController {
+
+    @Autowired
+    private MyFormDataService myFormDataService;
+
+    @PutMapping
+    public AjaxResult add(@RequestBody FormdataForm myFormData) {
+        myFormDataService.add(myFormData, myFormData.getUserId());
+        return AjaxResult.success();
+    }
+
+    @GetMapping("list")
+    public TableDataInfo list(MyFormData myFormData) {
+        startPage();
+        List<MyFormData> list = myFormDataService.list(myFormData);
+        return getDataTable(list);
+    }
+
+    @GetMapping("/{id}")
+    public AjaxResult get(@PathVariable Long id) {
+        MyFormData myFormData = myFormDataService.get(id);
+        return AjaxResult.success(myFormData);
+    }
+
+    @PostMapping
+    public AjaxResult update(@RequestBody MyFormData myFormData) {
+        myFormDataService.update(myFormData);
+        return AjaxResult.success();
+    }
+
+    @DeleteMapping
+    public AjaxResult delete(@RequestBody List<Long> ids) {
+        myFormDataService.delete(ids);
+        return AjaxResult.success();
+    }
+}

+ 361 - 0
src/main/java/com/activiti6/controller/activiti/LeaveNewController.java

@@ -0,0 +1,361 @@
+package com.activiti6.controller.activiti;
+
+
+import com.activiti6.common.utils.StringUtils;
+import com.activiti6.config.img.ProcessDiagramGenarateExt;
+import com.activiti6.domain.*;
+import com.activiti6.domain.form.MyFormDataActivitiForm;
+import com.activiti6.domain.form.TaskDoneListForm;
+import com.activiti6.domain.form.TaskListForm;
+import com.activiti6.service.activiti.LeaveNewService;
+import org.activiti.bpmn.model.BpmnModel;
+import org.activiti.bpmn.model.FlowNode;
+import org.activiti.bpmn.model.SequenceFlow;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.ProcessEngine;
+import org.activiti.engine.RepositoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.history.HistoricActivityInstance;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.impl.RepositoryServiceImpl;
+import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.activiti.engine.repository.ProcessDefinitionQuery;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 请假业务Controller
+ *
+ * @author Xianlu Tech
+ * @date 2019-10-11
+ */
+@RestController
+@RequestMapping("/leaveNew")
+public class LeaveNewController extends BaseController {
+    @Autowired
+    private LeaveNewService leaveNewService;
+
+    /**
+     * 更具流程key获取开始表单key
+     *
+     * @param processKey
+     * @return
+     */
+    @GetMapping("/processKey/{processKey}/{userId}")
+    @ResponseBody
+    public AjaxResult getFormData(@PathVariable("processKey") String processKey, @PathVariable("userId") Long userId) {
+
+        return AjaxResult.success(leaveNewService.getFormData(processKey, userId));
+    }
+
+    /**
+     * 提交表单
+     *
+     * @param myFormDataActiviti
+     * @return
+     */
+    @PutMapping
+    @ResponseBody
+    public AjaxResult add(@RequestBody MyFormDataActivitiForm myFormDataActivitiForm) {
+        MyFormDataActiviti myFormDataActiviti = myFormDataActivitiForm.getMyFormDataActiviti();
+        SysUser user = myFormDataActivitiForm.getUser();
+        Long userId = user.getUserId();
+        myFormDataActiviti.setApplyUser(userId.toString());
+        myFormDataActiviti.setCreateUser(user.getNickName());
+        myFormDataActiviti.setCreateDept(user.getDept().getDeptName());
+        myFormDataActiviti.setCreateBy(userId.toString());
+        myFormDataActiviti.setCreateTime(new Date());
+        return AjaxResult.success(leaveNewService.add(myFormDataActiviti, userId));
+    }
+
+
+    @GetMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(Long userId) {
+        startPage();
+        List<MyFormDataActiviti> list = leaveNewService.select(userId);
+        return getDataTable(list);
+    }
+
+    @GetMapping("/task")
+    @ResponseBody
+    public AjaxResult task(String id) {
+        List<MyTaskVo> list = leaveNewService.taskList(id);
+        return AjaxResult.success(list);
+    }
+
+    @GetMapping("/{id}")
+    @ResponseBody
+    public AjaxResult get(@PathVariable("id") Long id) {
+        MyFormDataActiviti myFormDataActiviti = leaveNewService.get(id);
+        return AjaxResult.success(myFormDataActiviti);
+    }
+
+    @GetMapping("/showForms/{instanceId}")
+    @ResponseBody
+    public AjaxResult showForms(@PathVariable("instanceId") String instanceId) {
+        List<FormsVo> list = leaveNewService.showForms(instanceId);
+        return AjaxResult.success(list);
+    }
+
+    @PostMapping
+    @ResponseBody
+    public AjaxResult update(@RequestBody MyFormDataActivitiForm myFormDataActivitiForm) {
+        return toAjax(leaveNewService.update(myFormDataActivitiForm.getMyFormDataActiviti(),myFormDataActivitiForm.getUser().getUserId()));
+    }
+
+    /**
+     * 删除请假业务
+     */
+
+    @DeleteMapping
+    @ResponseBody
+    public AjaxResult remove(@RequestBody List<Long> ids) {
+        return toAjax(leaveNewService.remove(ids));
+    }
+
+    /**
+     * 提交申请
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/submitApply/{id}/{userId}")
+    @ResponseBody
+    public AjaxResult submitApply(@PathVariable("id") Long id, @PathVariable("userId") Long userId) {
+        leaveNewService.submitApply(id, userId);
+        return AjaxResult.success();
+    }
+
+    @Autowired
+    private RepositoryService repositoryService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+
+//    @RequestMapping(value = "/read-resource")
+//    public void readResource(@RequestParam("processDefinitionKey") String processDefinitionKey, @RequestParam("version") Integer version, @RequestParam("processInstanceId") String processInstanceId, HttpServletResponse response)
+//            throws Exception {
+//        // 设置页面不缓存
+//        showImage(processDefinitionKey, version, processInstanceId, response);
+//    }
+
+    @GetMapping(value = "/read-resource")
+    public void readResource(@RequestParam("processInstanceId") String processInstanceId, HttpServletResponse response)
+            throws Exception {
+        response.setHeader("Pragma", "No-cache");
+        response.setHeader("Cache-Control", "no-cache");
+        response.setDateHeader("Expires", 0);
+        getActivitiProccessImage(processInstanceId, response);
+
+    }
+
+
+    @GetMapping(value = "/read-activiti")
+    public void readActiviti(@RequestParam("processDefinitionKey") String processDefinitionKey, @RequestParam("version") Integer version, HttpServletResponse response)
+            throws Exception {
+        // 设置页面不缓存
+        response.setHeader("Pragma", "No-cache");
+        response.setHeader("Cache-Control", "no-cache");
+        response.setDateHeader("Expires", 0);
+
+        ProcessDefinitionQuery pdq = repositoryService.createProcessDefinitionQuery();
+
+        ProcessDefinition pd = pdq.processDefinitionKey(processDefinitionKey).processDefinitionVersion(version).singleResult();
+
+        BpmnModel bpmnModel = repositoryService.getBpmnModel(pd.getId());
+
+        // 获取流程图图像字符流
+        // ProcessDiagramGenerator pec = processEngine.getProcessEngineConfiguration().getProcessDiagramGenerator();
+        // 获取流程图图像字符流
+        ProcessDiagramGenarateExt pec = new ProcessDiagramGenarateExt();
+        //配置字体
+        InputStream imageStream = pec.generateDiagram(bpmnModel, "png", "宋体", "宋体", "宋体", null, 2.0);
+
+        response.setContentType("image/png");
+        OutputStream os = response.getOutputStream();
+        int bytesRead = 0;
+        byte[] buffer = new byte[8192];
+        while ((bytesRead = imageStream.read(buffer, 0, 8192)) != -1) {
+            os.write(buffer, 0, bytesRead);
+        }
+        os.close();
+        imageStream.close();
+    }
+
+    /**
+     * 查询代办事项
+     *
+     * @return
+     */
+    @GetMapping("/taskList")
+    @ResponseBody
+    public TableDataInfo taskList(TaskListForm taskListForm) throws InterruptedException {
+        TableDataInfo tableDataInfo = leaveNewService.findTodoTasks(taskListForm,taskListForm.getUserId());
+        return tableDataInfo;
+    }
+
+    @GetMapping("/task/user/{userId}")
+    public AjaxResult taskUser(@PathVariable("userId") String userId) {
+        return AjaxResult.success(leaveNewService.taskUserMsg(userId));
+    }
+
+    /**
+     * 更具流程key获取开始表单key
+     *
+     * @param
+     * @return
+     */
+    @GetMapping("/taskFormData")
+    @ResponseBody
+    public AjaxResult taskFormData(MyTaskVo myTaskVo) {
+        MyFormData myFormData = leaveNewService.taskFormData(myTaskVo);
+        return AjaxResult.success(myFormData);
+    }
+
+    /**
+     * 完成task
+     *
+     * @return
+     */
+    @PostMapping("/taskCommit")
+    @ResponseBody
+    public AjaxResult taskCommit(@RequestBody TaskCommitForm taskCommitForm) {
+        leaveNewService.taskCommit(taskCommitForm,taskCommitForm.getUser());
+        return AjaxResult.success();
+    }
+
+
+    @GetMapping("/taskDoneList")
+    @ResponseBody
+    public TableDataInfo taskDoneList(TaskDoneListForm myFormDataActiviti) {
+        startPage();
+        List<MyFormDataActiviti> list = leaveNewService.taskDoneList(myFormDataActiviti,myFormDataActiviti.getUserId());
+        return getDataTable(list);
+    }
+
+    @Autowired
+    private HistoryService historyService;
+
+    @Autowired
+    private ProcessEngine processEngine;
+
+    private void showImage(String processDefinitionKey, Integer version, String processInstanceId, HttpServletResponse response) throws IOException {
+        response.setHeader("Pragma", "No-cache");
+        response.setHeader("Cache-Control", "no-cache");
+        response.setDateHeader("Expires", 0);
+
+        ProcessDefinitionQuery pdq = repositoryService.createProcessDefinitionQuery();
+        ProcessDefinition pd = pdq.processDefinitionKey(processDefinitionKey).processDefinitionVersion(version).singleResult();
+
+        String resourceName = pd.getDiagramResourceName();
+
+        if (resourceName.endsWith(".png") && StringUtils.isEmpty(processInstanceId) == false) {
+            getActivitiProccessImage(processInstanceId, response);
+        }
+    }
+
+
+    /**
+     * 获取流程图像,已执行节点和流程线高亮显示
+     */
+    public void getActivitiProccessImage(String processInstanceId, HttpServletResponse response) {
+        //logger.info("[开始]-获取流程图图像");
+        try {
+            //  获取历史流程实例
+            HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
+                    .processInstanceId(processInstanceId).singleResult();
+
+            if (historicProcessInstance == null) {
+                //throw new BusinessException("获取流程实例ID[" + processInstanceId + "]对应的历史流程实例失败!");
+            } else {
+                // 获取流程定义
+                ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService)
+                        .getDeployedProcessDefinition(historicProcessInstance.getProcessDefinitionId());
+
+                // 获取流程历史中已执行节点,并按照节点在流程中执行先后顺序排序
+                List<HistoricActivityInstance> historicActivityInstanceList = historyService.createHistoricActivityInstanceQuery()
+                        .processInstanceId(processInstanceId).orderByHistoricActivityInstanceId().asc().list();
+                // 已执行的节点ID集合
+                List<String> executedActivityIdList = new ArrayList<String>();
+                int index = 1;
+                //logger.info("获取已经执行的节点ID");
+                for (HistoricActivityInstance activityInstance : historicActivityInstanceList) {
+                    executedActivityIdList.add(activityInstance.getActivityId());
+                    //logger.info("第[" + index + "]个已执行节点=" + activityInstance.getActivityId() + " : " +activityInstance.getActivityName());
+                    index++;
+                }
+
+                BpmnModel bpmnModel = repositoryService.getBpmnModel(historicProcessInstance.getProcessDefinitionId());
+
+                // 已执行的线集合
+                List<String> flowIds = new ArrayList<String>();
+                // 获取流程走过的线 (getHighLightedFlows是下面的方法)
+                flowIds = executedFlowIdList(bpmnModel, processDefinition, historicActivityInstanceList);
+
+                // 获取流程图图像字符流
+                ProcessDiagramGenarateExt pec = new ProcessDiagramGenarateExt();
+
+                ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
+                boolean end = false;
+                if (StringUtils.isNull(processInstance)) {
+                    end = true;
+                }
+                //配置字体
+                InputStream imageStream = pec.generateDiagram(end, bpmnModel, "png", executedActivityIdList, flowIds, "宋体", "宋体", "宋体", null, 2.0);
+
+                response.setContentType("image/png");
+                OutputStream os = response.getOutputStream();
+                int bytesRead = 0;
+                byte[] buffer = new byte[8192];
+                while ((bytesRead = imageStream.read(buffer, 0, 8192)) != -1) {
+                    os.write(buffer, 0, bytesRead);
+                }
+                os.close();
+                imageStream.close();
+            }
+            //logger.info("[完成]-获取流程图图像");
+        } catch (Exception e) {
+            System.out.println(e.getMessage());
+            //logger.error("【异常】-获取流程图失败!" + e.getMessage());
+            //throw new BusinessException("获取流程图失败!" + e.getMessage());
+        }
+    }
+
+    private static List<String> executedFlowIdList(BpmnModel bpmnModel, ProcessDefinitionEntity processDefinitionEntity,
+                                                   List<HistoricActivityInstance> historicActivityInstanceList) {
+
+        List<String> executedFlowIdList = new ArrayList<>();
+
+
+        for (int i = 0; i < historicActivityInstanceList.size() - 1; i++) {
+            HistoricActivityInstance hai = historicActivityInstanceList.get(i);
+            FlowNode flowNode = (FlowNode) bpmnModel.getFlowElement(hai.getActivityId());
+            List<SequenceFlow> sequenceFlows = flowNode.getOutgoingFlows();
+            if (sequenceFlows.size() > 1) {
+                HistoricActivityInstance nextHai = historicActivityInstanceList.get(i + 1);
+                sequenceFlows.forEach(sequenceFlow -> {
+                    if (sequenceFlow.getTargetFlowElement().getId().equals(nextHai.getActivityId())) {
+                        executedFlowIdList.add(sequenceFlow.getId());
+                    }
+                });
+            } else {
+                executedFlowIdList.add(sequenceFlows.get(0).getId());
+            }
+        }
+
+        return executedFlowIdList;
+    }
+
+}

+ 239 - 0
src/main/java/com/activiti6/controller/activiti/ProcessDefinitionController.java

@@ -0,0 +1,239 @@
+package com.activiti6.controller.activiti;
+
+
+
+import com.activiti6.common.utils.StringUtils;
+import com.activiti6.domain.*;
+import com.activiti6.mapper.MyActivitiMapper;
+import com.activiti6.service.activiti.impl.ProcessDefinitionServiceImpl;
+import org.activiti.engine.IdentityService;
+import org.activiti.engine.identity.Group;
+import org.activiti.engine.identity.User;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.activiti.engine.task.Task;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/definition")
+public class ProcessDefinitionController extends BaseController {
+
+    private static final Logger log = LoggerFactory.getLogger(ProcessDefinitionController.class);
+
+
+    @Autowired
+    private ProcessDefinitionServiceImpl processDefinitionService;
+
+    /**
+     * 部署流程定义
+     */
+    @PostMapping("/upload")
+
+    public AjaxResult upload(@RequestParam("processDefinition") MultipartFile file) {
+        try {
+            if (!file.isEmpty()) {
+                String extensionName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf('.') + 1);
+                if ("xml".equalsIgnoreCase(extensionName)) {
+                    if (!file.getOriginalFilename().contains("bpmn20.xml")) {
+                        return AjaxResult.error("流程定义文件仅支持 bpmn, bpmn20.xml, zip 和 bar 格式!");
+                    }
+                }
+                if (!"xml".equalsIgnoreCase(extensionName)
+                        && !"bpmn".equalsIgnoreCase(extensionName)
+                        && !"zip".equalsIgnoreCase(extensionName)
+                        && !"bar".equalsIgnoreCase(extensionName)) {
+                    return AjaxResult.error("流程定义文件仅支持 bpmn, bpmn20.xml, zip 和 bar 格式!");
+                }
+                processDefinitionService.deployProcessDefinition(file);
+                return AjaxResult.success();
+
+            }
+            return AjaxResult.error();
+        } catch (Exception e) {
+            log.error("上传流程定义文件失败!", e);
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 获取部署的流程文件
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(String title, Integer pageNum, Integer pageSize) {
+        TableDataInfo list = processDefinitionService.list(title, pageNum, pageSize);
+        return list;
+    }
+
+    /**
+     * 获取部署的流程文件
+     */
+    @GetMapping("/key/{processDefinitionKey}")
+    public AjaxResult processDefinitionKey(@PathVariable("processDefinitionKey") String processDefinitionKey) {
+        MyProcessDefinition myProcessDefinition = processDefinitionService.processDefinitionKey(processDefinitionKey);
+        return AjaxResult.success(myProcessDefinition);
+    }
+
+
+    /**
+     * 获取部署的流程文件
+     */
+    @GetMapping("/{id}")
+    public AjaxResult get(@PathVariable("id") String id) {
+        return AjaxResult.success(processDefinitionService.get(id));
+    }
+
+    /**
+     * 获取部署的流程文件
+     */
+    @GetMapping("/start")
+
+    public AjaxResult start() {
+        processDefinitionService.start();
+        return AjaxResult.success();
+    }
+
+    /**
+     * 移除流程对象
+     *
+     * @param ids
+     * @return
+     */
+    @DeleteMapping
+    public AjaxResult remove(@RequestBody List<String> ids) {
+        try {
+            return toAjax(processDefinitionService.deleteProcessDeploymentByIds(ids));
+        } catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+
+    @PostMapping("/export")
+    public TableDataInfo export() {
+        List<ProcessDefinition> list = processDefinitionService.listProcessDefinition();
+        return getDataTable(list);
+    }
+
+
+    @RequestMapping(value = "/tasks", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+    public List<TaskRepresentation> getTasks(@RequestParam String assignee) {
+        List<Task> tasks = processDefinitionService.getTasks(assignee);
+        List<TaskRepresentation> dtos = new ArrayList<TaskRepresentation>();
+        for (Task task : tasks) {
+            dtos.add(new TaskRepresentation(task.getId(), task.getName()));
+        }
+        return dtos;
+    }
+
+    static class StartProcessRepresentation {
+
+        private String assignee;
+
+        public String getAssignee() {
+            return assignee;
+        }
+
+        public void setAssignee(String assignee) {
+            this.assignee = assignee;
+        }
+    }
+
+    static class TaskRepresentation {
+
+        private String id;
+        private String name;
+
+        public TaskRepresentation(String id, String name) {
+            this.id = id;
+            this.name = name;
+        }
+
+        public String getId() {
+            return id;
+        }
+
+        public void setId(String id) {
+            this.id = id;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+    }
+
+
+    @Autowired
+    private IdentityService identityService;
+
+    @Autowired
+    private MyActivitiMapper myActivitiMapper;
+
+    /**
+     * 新增用户和
+     *
+     * @param
+     */
+    @PostMapping("/user")
+    public AjaxResult addUser(@RequestBody SysUser sysUser) {
+        String userId = sysUser.getUserId().toString();
+        String userName = sysUser.getUserName();
+        User user = null;
+        try {
+            user = identityService.createUserQuery().userId(userId).singleResult();
+            if (null == user) {
+                user = identityService.newUser(userId);
+            } else {
+                int i = myActivitiMapper.deleteGroupByUserId(userId);
+            }
+        } catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
+        user.setFirstName(userName);
+        identityService.saveUser(user);
+        Long deptId = sysUser.getDeptId();
+        if (StringUtils.isNotNull(deptId)) {
+            String groupId = deptId.toString();
+            identityService.createMembership(userId, groupId);
+        }
+        return AjaxResult.success();
+    }
+
+    @DeleteMapping("/user")
+    public AjaxResult deleteUser(String id) {
+        identityService.deleteUser(id);
+        return AjaxResult.success();
+    }
+
+    @PostMapping("/group")
+    public AjaxResult addGroup(@RequestBody SysDept sysDept) {
+        String deptName = sysDept.getDeptName();
+        String deptId = sysDept.getDeptId().toString();
+        Group group = identityService.createGroupQuery().groupId(deptId).singleResult();
+        if (null == group) {
+            group = identityService.newGroup(deptId);
+        }
+        group.setName(deptName);
+        identityService.saveGroup(group);
+        return AjaxResult.success();
+    }
+
+    @DeleteMapping("/group")
+    public AjaxResult deleteGroup(String id) {
+        identityService.deleteGroup(id);
+        return AjaxResult.success();
+    }
+
+}

+ 124 - 0
src/main/java/com/activiti6/controller/activiti/ProcessInstanceController.java

@@ -0,0 +1,124 @@
+package com.activiti6.controller.activiti;
+
+
+import com.activiti6.domain.*;
+
+import com.activiti6.service.activiti.ProcessInstanceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/processInstance")
+public class ProcessInstanceController extends BaseController {
+    @Autowired
+    private ProcessInstanceService processInstanceService;
+
+    @GetMapping("list")
+    public TableDataInfo list() {
+        TableDataInfo list = processInstanceService.list();
+        return list;
+    }
+
+    @GetMapping("listTask")
+    public AjaxResult listTask(String processInstanceId) {
+        List<TreeVo> list = processInstanceService.listTask(processInstanceId);
+        return AjaxResult.success(list);
+    }
+
+    @GetMapping("listUser")
+    public AjaxResult listUser() {
+        List<TreeVo> list = processInstanceService.listUser();
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 提交流程
+     */
+    @PostMapping(value = "/commit")
+    public R<String> commit(@RequestBody ProcessInstanceCommitFrom processInstanceCommitFrom) {
+        return R.ok(processInstanceService.commit(processInstanceCommitFrom));
+    }
+
+    /**
+     * 重新提交流程
+     */
+    @PostMapping(value = "/recommit")
+    public R<String> recommit(@RequestBody ProcessInstanceCommitFrom processInstanceCommitFrom) {
+        return R.ok(processInstanceService.recommit(processInstanceCommitFrom));
+    }
+
+    /**
+     * 提交流程
+     */
+    @PostMapping(value = "/task/check")
+    public R<Map<String, String>> check(@RequestBody ProcessInstanceCheckFrom processInstanceCommitFrom) {
+        return R.ok(processInstanceService.check(processInstanceCommitFrom));
+    }
+
+
+    /**
+     * 挂起流程实例
+     *
+     * @param processInstanceId
+     * @return
+     */
+    @PostMapping("suspend")
+    public AjaxResult suspendProcess(String processInstanceId, Integer status) {
+        processInstanceService.suspendProcess(processInstanceId, status);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 转办流程
+     *
+     * @param taskId
+     * @param userId
+     * @return
+     */
+    @PostMapping("transToOffice")
+    public AjaxResult transToOffice(String taskId, String userId) {
+        processInstanceService.transToOffice(taskId, userId);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 委托
+     *
+     * @param taskId
+     * @param userId
+     * @return
+     */
+    @PostMapping("entrust/{taskId}/{userId}")
+    public AjaxResult entrust(@PathVariable("taskId") String taskId, @PathVariable("userId") String userId) {
+        processInstanceService.entrust(taskId, userId);
+        return AjaxResult.success();
+    }
+
+
+    /**
+     * 删除运行中流程实例
+     *
+     * @param processInstanceId
+     * @return
+     */
+    @DeleteMapping("{processInstanceId}")
+    public AjaxResult deleteProcess(@PathVariable("processInstanceId") String processInstanceId) {
+        processInstanceService.deleteProcess(processInstanceId);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 删除流程实例
+     *
+     * @param list
+     * @return
+     */
+    @DeleteMapping()
+    public AjaxResult deleteProcess(@RequestBody List<String> list) {
+        processInstanceService.deleteProcess(list);
+        return AjaxResult.success();
+    }
+}

+ 119 - 0
src/main/java/com/activiti6/controller/editor/ModelEditorJsonRestResource.java

@@ -0,0 +1,119 @@
+package com.activiti6.controller.editor;
+
+import com.activiti6.controller.BaseController;
+import com.activiti6.entity.ActivitiUser;
+import com.activiti6.entity.AjaxEntityVo;
+import com.activiti6.entity.GroupActiviti;
+import com.activiti6.entity.SelectVo;
+import org.activiti.editor.constants.ModelDataJsonConstants;
+import org.activiti.engine.ActivitiException;
+import org.activiti.engine.IdentityService;
+import org.activiti.engine.RepositoryService;
+import org.activiti.engine.identity.Group;
+import org.activiti.engine.identity.User;
+import org.activiti.engine.repository.Model;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 获取model的节点信息,编辑器根据返回的json进行绘图
+ * liuzhize 2019年3月7日下午3:29:15
+ */
+@RestController
+@RequestMapping("service")
+public class ModelEditorJsonRestResource  extends BaseController implements ModelDataJsonConstants {
+
+    protected static final Logger LOGGER = LoggerFactory.getLogger(ModelEditorJsonRestResource.class);
+
+    @Autowired
+    private RepositoryService repositoryService;
+
+    @Autowired
+    private ObjectMapper objectMapper;
+
+    @Autowired
+    private IdentityService identityService;
+
+    /**
+     * 获取流程json信息
+     *
+     * @param modelId
+     * @return
+     */
+    @SuppressWarnings("deprecation")
+    @RequestMapping(value = "/model/{modelId}/json", method = RequestMethod.GET, produces = "application/json")
+    public ObjectNode getEditorJson(@PathVariable String modelId) {
+        ObjectNode modelNode = null;
+        Model model = repositoryService.getModel(modelId);
+        if (model != null) {
+            try {
+                if (StringUtils.isNotEmpty(model.getMetaInfo())) {
+                    modelNode = (ObjectNode) objectMapper.readTree(model.getMetaInfo());
+                } else {
+                    modelNode = objectMapper.createObjectNode();
+                    modelNode.put(MODEL_NAME, model.getName());
+                }
+                modelNode.put(MODEL_ID, model.getId());
+                ObjectNode editorJsonNode = (ObjectNode) objectMapper.readTree(
+                        new String(repositoryService.getModelEditorSource(model.getId()), "utf-8"));
+                modelNode.put("model", editorJsonNode);
+            } catch (Exception e) {
+                LOGGER.error("Error creating model JSON", e);
+                throw new ActivitiException("Error creating model JSON", e);
+            }
+        }
+        return modelNode;
+    }
+
+    @GetMapping(value = "/model/user")
+    public AjaxEntityVo getUser() {
+
+        List<User> list = identityService.createUserQuery().list();
+        List<ActivitiUser> collect = list.stream().map(x -> {
+            ActivitiUser activitiUser = new ActivitiUser();
+            String id = x.getId();
+            String firstName = x.getFirstName();
+            activitiUser.setId(id);
+            activitiUser.setFirstName(firstName);
+            return activitiUser;
+        }).collect(Collectors.toList());
+        return  success(collect);
+    }
+    @GetMapping(value = "/model/user/select")
+    public List<SelectVo> getUserSelect() {
+        List<User> list = identityService.createUserQuery().list();
+        List<SelectVo> collect = list.stream().map(x -> {
+            SelectVo activitiUser = new SelectVo();
+            String id = x.getId();
+            String firstName = x.getFirstName();
+            activitiUser.setValue(id);
+            activitiUser.setText(firstName);
+            return activitiUser;
+        }).collect(Collectors.toList());
+        return  collect;
+    }
+
+    @GetMapping(value = "/model/group")
+    public AjaxEntityVo getGroup() {
+
+        List<Group> list = identityService.createGroupQuery().list();
+        list.stream().map(x->{
+            String id = x.getId();
+            String name = x.getName();
+            GroupActiviti groupActiviti=new GroupActiviti();
+            groupActiviti.setId(id);
+            groupActiviti.setName(name);
+            return  groupActiviti;
+        }).collect(Collectors.toList());
+        return  success(list);
+    }
+}

+ 88 - 0
src/main/java/com/activiti6/controller/editor/ModelSaveRestResource.java

@@ -0,0 +1,88 @@
+package com.activiti6.controller.editor;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+
+import org.activiti.editor.constants.ModelDataJsonConstants;
+import org.activiti.engine.ActivitiException;
+import org.activiti.engine.RepositoryService;
+import org.activiti.engine.repository.Model;
+import org.apache.batik.transcoder.TranscoderInput;
+import org.apache.batik.transcoder.TranscoderOutput;
+import org.apache.batik.transcoder.image.PNGTranscoder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+/**
+ * 流程信息入库
+ * liuzhize 2019年3月7日下午3:32:32
+ */
+@RestController
+@RequestMapping("service")
+public class ModelSaveRestResource implements ModelDataJsonConstants {
+  
+  protected static final Logger LOGGER = LoggerFactory.getLogger(ModelSaveRestResource.class);
+
+  @Autowired
+  private RepositoryService repositoryService;
+  
+  @Autowired
+  private ObjectMapper objectMapper;
+ 
+  /**
+   * 保存流程
+   * @param modelId 模型ID
+   * @param name 流程模型名称
+   * @param description
+   * @param json_xml 流程文件
+   * @param svg_xml 图片
+   */
+  @RequestMapping(value="/model/{modelId}/save", method = RequestMethod.PUT)
+  @ResponseStatus(value = HttpStatus.OK)
+  public void saveModel(@PathVariable String modelId
+          , String name, String description
+          , String json_xml, String svg_xml) {
+    try {
+      
+      Model model = repositoryService.getModel(modelId);
+      
+      ObjectNode modelJson = (ObjectNode) objectMapper.readTree(model.getMetaInfo());
+      
+      modelJson.put(MODEL_NAME, name);
+      modelJson.put(MODEL_DESCRIPTION, description);
+      model.setMetaInfo(modelJson.toString());
+      model.setName(name);
+      repositoryService.saveModel(model);
+      
+      repositoryService.addModelEditorSource(model.getId(), json_xml.getBytes("utf-8"));
+      
+      InputStream svgStream = new ByteArrayInputStream(svg_xml.getBytes("utf-8"));
+      TranscoderInput input = new TranscoderInput(svgStream);
+      
+      PNGTranscoder transcoder = new PNGTranscoder();
+      // Setup output
+      ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+      TranscoderOutput output = new TranscoderOutput(outStream);
+      
+      // Do the transformation
+      transcoder.transcode(input, output);
+      final byte[] result = outStream.toByteArray();
+      repositoryService.addModelEditorSourceExtra(model.getId(), result);
+      outStream.close();
+    } catch (Exception e) {
+      LOGGER.error("Error saving model", e);
+      throw new ActivitiException("Error saving model", e);
+    }
+  }
+  
+}

+ 33 - 0
src/main/java/com/activiti6/controller/editor/StencilsetRestResource.java

@@ -0,0 +1,33 @@
+package com.activiti6.controller.editor;
+
+import org.activiti.engine.ActivitiException;
+import org.apache.commons.io.IOUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.InputStream;
+/**
+ * 获取编辑器组件及配置项信息
+ * liuzhize 2019年3月7日下午3:33:28
+ */
+@RestController
+@RequestMapping("service")
+public class StencilsetRestResource {
+  
+/**
+ * 获取流程json文件
+ * @return
+ */
+  @RequestMapping(value="/editor/stencilset", method = RequestMethod.GET, produces = "application/json;charset=utf-8")
+  @ResponseBody
+  public String getStencilset() {
+    InputStream stencilsetStream = this.getClass().getClassLoader().getResourceAsStream("stencilset.json");
+    try {
+      return IOUtils.toString(stencilsetStream, "utf-8");
+    } catch (Exception e) {
+      throw new ActivitiException("Error while loading stencil set", e);
+    }
+  }
+}

+ 149 - 0
src/main/java/com/activiti6/domain/AjaxResult.java

@@ -0,0 +1,149 @@
+package com.activiti6.domain;
+
+
+import com.activiti6.common.utils.StringUtils;
+
+import java.util.HashMap;
+
+/**
+ * 操作消息提醒
+ *
+ * @author gybank
+ */
+public class AjaxResult extends HashMap<String, Object>
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 状态码 */
+    public static final String CODE_TAG = "code";
+
+    /** 返回内容 */
+    public static final String MSG_TAG = "msg";
+
+    /** 数据对象 */
+    public static final String DATA_TAG = "data";
+
+    /**
+     * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
+     */
+    public AjaxResult()
+    {
+    }
+
+    /**
+     * 初始化一个新创建的 AjaxResult 对象
+     *
+     * @param code 状态码
+     * @param msg 返回内容
+     */
+    public AjaxResult(int code, String msg)
+    {
+        super.put(CODE_TAG, code);
+        super.put(MSG_TAG, msg);
+    }
+
+    /**
+     * 初始化一个新创建的 AjaxResult 对象
+     *
+     * @param code 状态码
+     * @param msg 返回内容
+     * @param data 数据对象
+     */
+    public AjaxResult(int code, String msg, Object data)
+    {
+        super.put(CODE_TAG, code);
+        super.put(MSG_TAG, msg);
+        if (StringUtils.isNotNull(data))
+        {
+            super.put(DATA_TAG, data);
+        }
+    }
+
+    /**
+     * 返回成功消息
+     *
+     * @return 成功消息
+     */
+    public static AjaxResult success()
+    {
+        return AjaxResult.success("操作成功");
+    }
+
+    /**
+     * 返回成功数据
+     *
+     * @return 成功消息
+     */
+    public static AjaxResult success(Object data)
+    {
+        return AjaxResult.success("操作成功", data);
+    }
+
+    /**
+     * 返回成功消息
+     *
+     * @param msg 返回内容
+     * @return 成功消息
+     */
+    public static AjaxResult success(String msg)
+    {
+        return AjaxResult.success(msg, null);
+    }
+
+    /**
+     * 返回成功消息
+     *
+     * @param msg 返回内容
+     * @param data 数据对象
+     * @return 成功消息
+     */
+    public static AjaxResult success(String msg, Object data)
+    {
+        return new AjaxResult(HttpStatus.SUCCESS, msg, data);
+    }
+
+    /**
+     * 返回错误消息
+     *
+     * @return
+     */
+    public static AjaxResult error()
+    {
+        return AjaxResult.error("操作失败");
+    }
+
+    /**
+     * 返回错误消息
+     *
+     * @param msg 返回内容
+     * @return 警告消息
+     */
+    public static AjaxResult error(String msg)
+    {
+        return AjaxResult.error(msg, null);
+    }
+
+    /**
+     * 返回错误消息
+     *
+     * @param msg 返回内容
+     * @param data 数据对象
+     * @return 警告消息
+     */
+    public static AjaxResult error(String msg, Object data)
+    {
+        return new AjaxResult(HttpStatus.BAD_REQUEST, msg, data);
+    }
+
+    /**
+     * 返回错误消息
+     *
+     * @param code 状态码
+     * @param msg 返回内容
+     * @return 警告消息
+     */
+    public static AjaxResult error(int code, String msg)
+    {
+        return new AjaxResult(code, msg, null);
+    }
+}

+ 157 - 0
src/main/java/com/activiti6/domain/BaseEntity.java

@@ -0,0 +1,157 @@
+package com.activiti6.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Entity基类
+ *
+ * @author gybank
+ */
+public class BaseEntity implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 搜索值 */
+    private String searchValue;
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /** 备注 */
+    private String remark;
+
+    /** 数据权限 */
+    private String dataScope;
+
+    /** 开始时间 */
+    @JsonIgnore
+    private String beginTime;
+
+    /** 结束时间 */
+    @JsonIgnore
+    private String endTime;
+
+    /** 请求参数 */
+    private Map<String, Object> params;
+
+    public String getSearchValue()
+    {
+        return searchValue;
+    }
+
+    public void setSearchValue(String searchValue)
+    {
+        this.searchValue = searchValue;
+    }
+
+    public String getCreateBy()
+    {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy)
+    {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime()
+    {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime)
+    {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy()
+    {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy)
+    {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime()
+    {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime)
+    {
+        this.updateTime = updateTime;
+    }
+
+    public String getRemark()
+    {
+        return remark;
+    }
+
+    public void setRemark(String remark)
+    {
+        this.remark = remark;
+    }
+
+    public String getDataScope()
+    {
+        return dataScope;
+    }
+
+    public void setDataScope(String dataScope)
+    {
+        this.dataScope = dataScope;
+    }
+
+    public String getBeginTime()
+    {
+        return beginTime;
+    }
+
+    public void setBeginTime(String beginTime)
+    {
+        this.beginTime = beginTime;
+    }
+
+    public String getEndTime()
+    {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime)
+    {
+        this.endTime = endTime;
+    }
+
+    public Map<String, Object> getParams()
+    {
+        if (params == null)
+        {
+            params = new HashMap<>();
+        }
+        return params;
+    }
+
+    public void setParams(Map<String, Object> params)
+    {
+        this.params = params;
+    }
+}

+ 65 - 0
src/main/java/com/activiti6/domain/DbTableHis.java

@@ -0,0 +1,65 @@
+package com.activiti6.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 流程历史单对象 db_table_his
+ *
+ * @author xtd
+ * @date 2020-04-14
+ */
+public class DbTableHis extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 流程id */
+    private String instanceId;
+
+    /** 表单名称 */
+    private Long tableId;
+
+    /** 表单名称 */
+    private String tableName;
+
+    public void setInstanceId(String instanceId)
+    {
+        this.instanceId = instanceId;
+    }
+
+    public String getInstanceId()
+    {
+        return instanceId;
+    }
+    public void setTableId(Long tableId)
+    {
+        this.tableId = tableId;
+    }
+
+    public Long getTableId()
+    {
+        return tableId;
+    }
+    public void setTableName(String tableName)
+    {
+        this.tableName = tableName;
+    }
+
+    public String getTableName()
+    {
+        return tableName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+            .append("instanceId", getInstanceId())
+            .append("tableId", getTableId())
+            .append("tableName", getTableName())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 14 - 0
src/main/java/com/activiti6/domain/FormdataForm.java

@@ -0,0 +1,14 @@
+package com.activiti6.domain;
+
+public class FormdataForm  extends MyFormData{
+
+    private Long userId;
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+}

+ 57 - 0
src/main/java/com/activiti6/domain/FormsVo.java

@@ -0,0 +1,57 @@
+package com.activiti6.domain;
+
+public class FormsVo {
+    private String taskName;
+
+    /** 提交者*/
+    private String createUser;
+
+    /** 提交部门*/
+    private String createDept;
+
+
+    private String formObj;
+    /** 创建时间*/
+    private String createTime;
+
+
+    public String getTaskName() {
+        return taskName;
+    }
+
+    public void setTaskName(String taskName) {
+        this.taskName = taskName;
+    }
+
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser;
+    }
+
+    public String getCreateDept() {
+        return createDept;
+    }
+
+    public void setCreateDept(String createDept) {
+        this.createDept = createDept;
+    }
+
+    public String getFormObj() {
+        return formObj;
+    }
+
+    public void setFormObj(String formObj) {
+        this.formObj = formObj;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+}

+ 89 - 0
src/main/java/com/activiti6/domain/HttpStatus.java

@@ -0,0 +1,89 @@
+package com.activiti6.domain;
+
+/**
+ * 返回状态码
+ *
+ * @author gybank
+ */
+public interface HttpStatus
+{
+    /**
+     * 操作成功
+     */
+    public static final int SUCCESS = 200;
+
+    /**
+     * 对象创建成功
+     */
+    public static final int CREATED = 201;
+
+    /**
+     * 请求已经被接受
+     */
+    public static final int ACCEPTED = 202;
+
+    /**
+     * 操作已经执行成功,但是没有返回数据
+     */
+    public static final int NO_CONTENT = 204;
+
+    /**
+     * 资源已被移除
+     */
+    public static final int MOVED_PERM = 301;
+
+    /**
+     * 重定向
+     */
+    public static final int SEE_OTHER = 303;
+
+    /**
+     * 资源没有被修改
+     */
+    public static final int NOT_MODIFIED = 304;
+
+    /**
+     * 参数列表错误(缺少,格式不匹配)
+     */
+    public static final int BAD_REQUEST = 400;
+
+    /**
+     * 未授权
+     */
+    public static final int UNAUTHORIZED = 401;
+
+    /**
+     * 访问受限,授权过期
+     */
+    public static final int FORBIDDEN = 403;
+
+    /**
+     * 资源,服务未找到
+     */
+    public static final int NOT_FOUND = 404;
+
+    /**
+     * 不允许的http方法
+     */
+    public static final int BAD_METHOD = 405;
+
+    /**
+     * 资源冲突,或者资源被锁
+     */
+    public static final int CONFLICT = 409;
+
+    /**
+     * 不支持的数据,媒体类型
+     */
+    public static final int UNSUPPORTED_TYPE = 415;
+
+    /**
+     * 系统内部错误
+     */
+    public static final int ERROR = 500;
+
+    /**
+     * 接口未实现
+     */
+    public static final int NOT_IMPLEMENTED = 501;
+}

+ 149 - 0
src/main/java/com/activiti6/domain/MyFormData.java

@@ -0,0 +1,149 @@
+package com.activiti6.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MyFormData implements Serializable {
+    /** 主键*/
+    private Long fId;
+
+    /** 模型key*/
+    private String modelKey;
+
+    /** 模型版本*/
+    private Integer modelVersion;
+
+    /** 模块id*/
+    private String modulId;
+
+    /** 名称*/
+    private String fName;
+
+    /** key*/
+    private String fKey;
+
+    /** 版本*/
+    private Long fVersion;
+
+    /** json数据*/
+    private String jsonData;
+
+    /** 是否可用 0 不可用 1 可用*/
+    private Integer status;
+
+    /** 创建人*/
+    private String createBy;
+
+    /** 创建时间*/
+    private Date createTime;
+
+    /** 更新用户*/
+    private String updateBy;
+
+    /** 更新时间*/
+    private Date updateTime;
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public String getModelKey() {
+        return modelKey;
+    }
+
+    public void setModelKey(String modelKey) {
+        this.modelKey = modelKey == null ? null : modelKey.trim();
+    }
+
+    public Integer getModelVersion() {
+        return modelVersion;
+    }
+
+    public void setModelVersion(Integer modelVersion) {
+        this.modelVersion = modelVersion;
+    }
+
+    public String getModulId() {
+        return modulId;
+    }
+
+    public void setModulId(String modulId) {
+        this.modulId = modulId == null ? null : modulId.trim();
+    }
+
+    public String getfName() {
+        return fName;
+    }
+
+    public void setfName(String fName) {
+        this.fName = fName == null ? null : fName.trim();
+    }
+
+    public String getfKey() {
+        return fKey;
+    }
+
+    public void setfKey(String fKey) {
+        this.fKey = fKey == null ? null : fKey.trim();
+    }
+
+    public Long getfVersion() {
+        return fVersion;
+    }
+
+    public void setfVersion(Long fVersion) {
+        this.fVersion = fVersion;
+    }
+
+    public String getJsonData() {
+        return jsonData;
+    }
+
+    public void setJsonData(String jsonData) {
+        this.jsonData = jsonData == null ? null : jsonData.trim();
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy == null ? null : createBy.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy == null ? null : updateBy.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 280 - 0
src/main/java/com/activiti6/domain/MyFormDataActiviti.java

@@ -0,0 +1,280 @@
+package com.activiti6.domain;
+
+import java.util.Date;
+
+public class MyFormDataActiviti {
+    /** 主键*/
+    private Long fId;
+
+    /** 模型key*/
+    private String modelKey;
+
+    /** 模型版本*/
+    private Integer modelVersion;
+
+    /** 模块id*/
+    private String modulId;
+
+    /** 名称*/
+    private String fName;
+
+    /** 工单号*/
+    private String workNum;
+
+    /** 标题*/
+    private String title;
+
+    /** 流程实例ID*/
+    private String instanceId;
+
+    /** 流程名称*/
+    private String processDefinitionName;
+
+    /** 任务名称*/
+    private String taskName;
+
+    /** 申请提交人*/
+    private String creatUserName;
+
+    /** 申请提交部门*/
+    private String creatDeptName;
+
+    /** 申请提交时间*/
+    private Date creatFormTime;
+
+    /** 任务id*/
+    private String taskId;
+
+    /** key*/
+    private String fKey;
+
+    /** 版本*/
+    private Long fVersion;
+
+    /** 申请人*/
+    private String applyUser;
+
+    /** json数据*/
+    private String jsonData;
+
+    /** 是否可用 0 不可用 1 可用*/
+    private Integer status;
+
+    /** 提交者*/
+    private String createUser;
+
+    /** 提交部门*/
+    private String createDept;
+
+    /** 创建人*/
+    private String createBy;
+
+    /** 创建时间*/
+    private Date createTime;
+
+    /** 更新用户*/
+    private String updateBy;
+
+    /** 更新时间*/
+    private Date updateTime;
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public String getModelKey() {
+        return modelKey;
+    }
+
+    public void setModelKey(String modelKey) {
+        this.modelKey = modelKey == null ? null : modelKey.trim();
+    }
+
+    public Integer getModelVersion() {
+        return modelVersion;
+    }
+
+    public void setModelVersion(Integer modelVersion) {
+        this.modelVersion = modelVersion;
+    }
+
+    public String getModulId() {
+        return modulId;
+    }
+
+    public void setModulId(String modulId) {
+        this.modulId = modulId == null ? null : modulId.trim();
+    }
+
+    public String getfName() {
+        return fName;
+    }
+
+    public void setfName(String fName) {
+        this.fName = fName == null ? null : fName.trim();
+    }
+
+    public String getWorkNum() {
+        return workNum;
+    }
+
+    public void setWorkNum(String workNum) {
+        this.workNum = workNum == null ? null : workNum.trim();
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title == null ? null : title.trim();
+    }
+
+    public String getInstanceId() {
+        return instanceId;
+    }
+
+    public void setInstanceId(String instanceId) {
+        this.instanceId = instanceId == null ? null : instanceId.trim();
+    }
+
+    public String getProcessDefinitionName() {
+        return processDefinitionName;
+    }
+
+    public void setProcessDefinitionName(String processDefinitionName) {
+        this.processDefinitionName = processDefinitionName == null ? null : processDefinitionName.trim();
+    }
+
+    public String getTaskName() {
+        return taskName;
+    }
+
+    public void setTaskName(String taskName) {
+        this.taskName = taskName == null ? null : taskName.trim();
+    }
+
+    public String getCreatUserName() {
+        return creatUserName;
+    }
+
+    public void setCreatUserName(String creatUserName) {
+        this.creatUserName = creatUserName == null ? null : creatUserName.trim();
+    }
+
+    public String getCreatDeptName() {
+        return creatDeptName;
+    }
+
+    public void setCreatDeptName(String creatDeptName) {
+        this.creatDeptName = creatDeptName == null ? null : creatDeptName.trim();
+    }
+
+    public Date getCreatFormTime() {
+        return creatFormTime;
+    }
+
+    public void setCreatFormTime(Date creatFormTime) {
+        this.creatFormTime = creatFormTime;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId == null ? null : taskId.trim();
+    }
+
+    public String getfKey() {
+        return fKey;
+    }
+
+    public void setfKey(String fKey) {
+        this.fKey = fKey == null ? null : fKey.trim();
+    }
+
+    public Long getfVersion() {
+        return fVersion;
+    }
+
+    public void setfVersion(Long fVersion) {
+        this.fVersion = fVersion;
+    }
+
+    public String getApplyUser() {
+        return applyUser;
+    }
+
+    public void setApplyUser(String applyUser) {
+        this.applyUser = applyUser == null ? null : applyUser.trim();
+    }
+
+    public String getJsonData() {
+        return jsonData;
+    }
+
+    public void setJsonData(String jsonData) {
+        this.jsonData = jsonData == null ? null : jsonData.trim();
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser == null ? null : createUser.trim();
+    }
+
+    public String getCreateDept() {
+        return createDept;
+    }
+
+    public void setCreateDept(String createDept) {
+        this.createDept = createDept == null ? null : createDept.trim();
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy == null ? null : createBy.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy == null ? null : updateBy.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 1881 - 0
src/main/java/com/activiti6/domain/MyFormDataActivitiExample.java

@@ -0,0 +1,1881 @@
+package com.activiti6.domain;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class MyFormDataActivitiExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public MyFormDataActivitiExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andFIdIsNull() {
+            addCriterion("f_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdIsNotNull() {
+            addCriterion("f_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdEqualTo(Long value) {
+            addCriterion("f_id =", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotEqualTo(Long value) {
+            addCriterion("f_id <>", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdGreaterThan(Long value) {
+            addCriterion("f_id >", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("f_id >=", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdLessThan(Long value) {
+            addCriterion("f_id <", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdLessThanOrEqualTo(Long value) {
+            addCriterion("f_id <=", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdIn(List<Long> values) {
+            addCriterion("f_id in", values, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotIn(List<Long> values) {
+            addCriterion("f_id not in", values, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdBetween(Long value1, Long value2) {
+            addCriterion("f_id between", value1, value2, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotBetween(Long value1, Long value2) {
+            addCriterion("f_id not between", value1, value2, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIsNull() {
+            addCriterion("model_key is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIsNotNull() {
+            addCriterion("model_key is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyEqualTo(String value) {
+            addCriterion("model_key =", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotEqualTo(String value) {
+            addCriterion("model_key <>", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyGreaterThan(String value) {
+            addCriterion("model_key >", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyGreaterThanOrEqualTo(String value) {
+            addCriterion("model_key >=", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLessThan(String value) {
+            addCriterion("model_key <", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLessThanOrEqualTo(String value) {
+            addCriterion("model_key <=", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLike(String value) {
+            addCriterion("model_key like", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotLike(String value) {
+            addCriterion("model_key not like", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIn(List<String> values) {
+            addCriterion("model_key in", values, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotIn(List<String> values) {
+            addCriterion("model_key not in", values, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyBetween(String value1, String value2) {
+            addCriterion("model_key between", value1, value2, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotBetween(String value1, String value2) {
+            addCriterion("model_key not between", value1, value2, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIsNull() {
+            addCriterion("model_version is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIsNotNull() {
+            addCriterion("model_version is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionEqualTo(Integer value) {
+            addCriterion("model_version =", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotEqualTo(Integer value) {
+            addCriterion("model_version <>", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionGreaterThan(Integer value) {
+            addCriterion("model_version >", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionGreaterThanOrEqualTo(Integer value) {
+            addCriterion("model_version >=", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionLessThan(Integer value) {
+            addCriterion("model_version <", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionLessThanOrEqualTo(Integer value) {
+            addCriterion("model_version <=", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIn(List<Integer> values) {
+            addCriterion("model_version in", values, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotIn(List<Integer> values) {
+            addCriterion("model_version not in", values, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionBetween(Integer value1, Integer value2) {
+            addCriterion("model_version between", value1, value2, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotBetween(Integer value1, Integer value2) {
+            addCriterion("model_version not between", value1, value2, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIsNull() {
+            addCriterion("modul_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIsNotNull() {
+            addCriterion("modul_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdEqualTo(String value) {
+            addCriterion("modul_id =", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotEqualTo(String value) {
+            addCriterion("modul_id <>", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdGreaterThan(String value) {
+            addCriterion("modul_id >", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdGreaterThanOrEqualTo(String value) {
+            addCriterion("modul_id >=", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLessThan(String value) {
+            addCriterion("modul_id <", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLessThanOrEqualTo(String value) {
+            addCriterion("modul_id <=", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLike(String value) {
+            addCriterion("modul_id like", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotLike(String value) {
+            addCriterion("modul_id not like", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIn(List<String> values) {
+            addCriterion("modul_id in", values, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotIn(List<String> values) {
+            addCriterion("modul_id not in", values, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdBetween(String value1, String value2) {
+            addCriterion("modul_id between", value1, value2, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotBetween(String value1, String value2) {
+            addCriterion("modul_id not between", value1, value2, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIsNull() {
+            addCriterion("f_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIsNotNull() {
+            addCriterion("f_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameEqualTo(String value) {
+            addCriterion("f_name =", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotEqualTo(String value) {
+            addCriterion("f_name <>", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameGreaterThan(String value) {
+            addCriterion("f_name >", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameGreaterThanOrEqualTo(String value) {
+            addCriterion("f_name >=", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLessThan(String value) {
+            addCriterion("f_name <", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLessThanOrEqualTo(String value) {
+            addCriterion("f_name <=", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLike(String value) {
+            addCriterion("f_name like", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotLike(String value) {
+            addCriterion("f_name not like", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIn(List<String> values) {
+            addCriterion("f_name in", values, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotIn(List<String> values) {
+            addCriterion("f_name not in", values, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameBetween(String value1, String value2) {
+            addCriterion("f_name between", value1, value2, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotBetween(String value1, String value2) {
+            addCriterion("f_name not between", value1, value2, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumIsNull() {
+            addCriterion("work_num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumIsNotNull() {
+            addCriterion("work_num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumEqualTo(String value) {
+            addCriterion("work_num =", value, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumNotEqualTo(String value) {
+            addCriterion("work_num <>", value, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumGreaterThan(String value) {
+            addCriterion("work_num >", value, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumGreaterThanOrEqualTo(String value) {
+            addCriterion("work_num >=", value, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumLessThan(String value) {
+            addCriterion("work_num <", value, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumLessThanOrEqualTo(String value) {
+            addCriterion("work_num <=", value, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumLike(String value) {
+            addCriterion("work_num like", value, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumNotLike(String value) {
+            addCriterion("work_num not like", value, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumIn(List<String> values) {
+            addCriterion("work_num in", values, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumNotIn(List<String> values) {
+            addCriterion("work_num not in", values, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumBetween(String value1, String value2) {
+            addCriterion("work_num between", value1, value2, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andWorkNumNotBetween(String value1, String value2) {
+            addCriterion("work_num not between", value1, value2, "workNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdIsNull() {
+            addCriterion("instance_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdIsNotNull() {
+            addCriterion("instance_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdEqualTo(String value) {
+            addCriterion("instance_id =", value, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdNotEqualTo(String value) {
+            addCriterion("instance_id <>", value, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdGreaterThan(String value) {
+            addCriterion("instance_id >", value, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdGreaterThanOrEqualTo(String value) {
+            addCriterion("instance_id >=", value, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdLessThan(String value) {
+            addCriterion("instance_id <", value, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdLessThanOrEqualTo(String value) {
+            addCriterion("instance_id <=", value, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdLike(String value) {
+            addCriterion("instance_id like", value, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdNotLike(String value) {
+            addCriterion("instance_id not like", value, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdIn(List<String> values) {
+            addCriterion("instance_id in", values, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdNotIn(List<String> values) {
+            addCriterion("instance_id not in", values, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdBetween(String value1, String value2) {
+            addCriterion("instance_id between", value1, value2, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInstanceIdNotBetween(String value1, String value2) {
+            addCriterion("instance_id not between", value1, value2, "instanceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameIsNull() {
+            addCriterion("process_definition_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameIsNotNull() {
+            addCriterion("process_definition_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameEqualTo(String value) {
+            addCriterion("process_definition_name =", value, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameNotEqualTo(String value) {
+            addCriterion("process_definition_name <>", value, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameGreaterThan(String value) {
+            addCriterion("process_definition_name >", value, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameGreaterThanOrEqualTo(String value) {
+            addCriterion("process_definition_name >=", value, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameLessThan(String value) {
+            addCriterion("process_definition_name <", value, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameLessThanOrEqualTo(String value) {
+            addCriterion("process_definition_name <=", value, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameLike(String value) {
+            addCriterion("process_definition_name like", value, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameNotLike(String value) {
+            addCriterion("process_definition_name not like", value, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameIn(List<String> values) {
+            addCriterion("process_definition_name in", values, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameNotIn(List<String> values) {
+            addCriterion("process_definition_name not in", values, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameBetween(String value1, String value2) {
+            addCriterion("process_definition_name between", value1, value2, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andProcessDefinitionNameNotBetween(String value1, String value2) {
+            addCriterion("process_definition_name not between", value1, value2, "processDefinitionName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameIsNull() {
+            addCriterion("task_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameIsNotNull() {
+            addCriterion("task_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameEqualTo(String value) {
+            addCriterion("task_name =", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameNotEqualTo(String value) {
+            addCriterion("task_name <>", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameGreaterThan(String value) {
+            addCriterion("task_name >", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameGreaterThanOrEqualTo(String value) {
+            addCriterion("task_name >=", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameLessThan(String value) {
+            addCriterion("task_name <", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameLessThanOrEqualTo(String value) {
+            addCriterion("task_name <=", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameLike(String value) {
+            addCriterion("task_name like", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameNotLike(String value) {
+            addCriterion("task_name not like", value, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameIn(List<String> values) {
+            addCriterion("task_name in", values, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameNotIn(List<String> values) {
+            addCriterion("task_name not in", values, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameBetween(String value1, String value2) {
+            addCriterion("task_name between", value1, value2, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskNameNotBetween(String value1, String value2) {
+            addCriterion("task_name not between", value1, value2, "taskName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameIsNull() {
+            addCriterion("creat_user_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameIsNotNull() {
+            addCriterion("creat_user_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameEqualTo(String value) {
+            addCriterion("creat_user_name =", value, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameNotEqualTo(String value) {
+            addCriterion("creat_user_name <>", value, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameGreaterThan(String value) {
+            addCriterion("creat_user_name >", value, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameGreaterThanOrEqualTo(String value) {
+            addCriterion("creat_user_name >=", value, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameLessThan(String value) {
+            addCriterion("creat_user_name <", value, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameLessThanOrEqualTo(String value) {
+            addCriterion("creat_user_name <=", value, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameLike(String value) {
+            addCriterion("creat_user_name like", value, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameNotLike(String value) {
+            addCriterion("creat_user_name not like", value, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameIn(List<String> values) {
+            addCriterion("creat_user_name in", values, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameNotIn(List<String> values) {
+            addCriterion("creat_user_name not in", values, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameBetween(String value1, String value2) {
+            addCriterion("creat_user_name between", value1, value2, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatUserNameNotBetween(String value1, String value2) {
+            addCriterion("creat_user_name not between", value1, value2, "creatUserName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameIsNull() {
+            addCriterion("creat_dept_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameIsNotNull() {
+            addCriterion("creat_dept_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameEqualTo(String value) {
+            addCriterion("creat_dept_name =", value, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameNotEqualTo(String value) {
+            addCriterion("creat_dept_name <>", value, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameGreaterThan(String value) {
+            addCriterion("creat_dept_name >", value, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameGreaterThanOrEqualTo(String value) {
+            addCriterion("creat_dept_name >=", value, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameLessThan(String value) {
+            addCriterion("creat_dept_name <", value, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameLessThanOrEqualTo(String value) {
+            addCriterion("creat_dept_name <=", value, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameLike(String value) {
+            addCriterion("creat_dept_name like", value, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameNotLike(String value) {
+            addCriterion("creat_dept_name not like", value, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameIn(List<String> values) {
+            addCriterion("creat_dept_name in", values, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameNotIn(List<String> values) {
+            addCriterion("creat_dept_name not in", values, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameBetween(String value1, String value2) {
+            addCriterion("creat_dept_name between", value1, value2, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatDeptNameNotBetween(String value1, String value2) {
+            addCriterion("creat_dept_name not between", value1, value2, "creatDeptName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeIsNull() {
+            addCriterion("creat_form_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeIsNotNull() {
+            addCriterion("creat_form_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeEqualTo(Date value) {
+            addCriterion("creat_form_time =", value, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeNotEqualTo(Date value) {
+            addCriterion("creat_form_time <>", value, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeGreaterThan(Date value) {
+            addCriterion("creat_form_time >", value, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("creat_form_time >=", value, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeLessThan(Date value) {
+            addCriterion("creat_form_time <", value, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeLessThanOrEqualTo(Date value) {
+            addCriterion("creat_form_time <=", value, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeIn(List<Date> values) {
+            addCriterion("creat_form_time in", values, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeNotIn(List<Date> values) {
+            addCriterion("creat_form_time not in", values, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeBetween(Date value1, Date value2) {
+            addCriterion("creat_form_time between", value1, value2, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatFormTimeNotBetween(Date value1, Date value2) {
+            addCriterion("creat_form_time not between", value1, value2, "creatFormTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIsNull() {
+            addCriterion("task_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIsNotNull() {
+            addCriterion("task_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdEqualTo(String value) {
+            addCriterion("task_id =", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotEqualTo(String value) {
+            addCriterion("task_id <>", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdGreaterThan(String value) {
+            addCriterion("task_id >", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdGreaterThanOrEqualTo(String value) {
+            addCriterion("task_id >=", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLessThan(String value) {
+            addCriterion("task_id <", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLessThanOrEqualTo(String value) {
+            addCriterion("task_id <=", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLike(String value) {
+            addCriterion("task_id like", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotLike(String value) {
+            addCriterion("task_id not like", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIn(List<String> values) {
+            addCriterion("task_id in", values, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotIn(List<String> values) {
+            addCriterion("task_id not in", values, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdBetween(String value1, String value2) {
+            addCriterion("task_id between", value1, value2, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotBetween(String value1, String value2) {
+            addCriterion("task_id not between", value1, value2, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIsNull() {
+            addCriterion("f_key is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIsNotNull() {
+            addCriterion("f_key is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyEqualTo(String value) {
+            addCriterion("f_key =", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotEqualTo(String value) {
+            addCriterion("f_key <>", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyGreaterThan(String value) {
+            addCriterion("f_key >", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyGreaterThanOrEqualTo(String value) {
+            addCriterion("f_key >=", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLessThan(String value) {
+            addCriterion("f_key <", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLessThanOrEqualTo(String value) {
+            addCriterion("f_key <=", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLike(String value) {
+            addCriterion("f_key like", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotLike(String value) {
+            addCriterion("f_key not like", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIn(List<String> values) {
+            addCriterion("f_key in", values, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotIn(List<String> values) {
+            addCriterion("f_key not in", values, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyBetween(String value1, String value2) {
+            addCriterion("f_key between", value1, value2, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotBetween(String value1, String value2) {
+            addCriterion("f_key not between", value1, value2, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIsNull() {
+            addCriterion("f_version is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIsNotNull() {
+            addCriterion("f_version is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionEqualTo(Long value) {
+            addCriterion("f_version =", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotEqualTo(Long value) {
+            addCriterion("f_version <>", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionGreaterThan(Long value) {
+            addCriterion("f_version >", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionGreaterThanOrEqualTo(Long value) {
+            addCriterion("f_version >=", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionLessThan(Long value) {
+            addCriterion("f_version <", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionLessThanOrEqualTo(Long value) {
+            addCriterion("f_version <=", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIn(List<Long> values) {
+            addCriterion("f_version in", values, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotIn(List<Long> values) {
+            addCriterion("f_version not in", values, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionBetween(Long value1, Long value2) {
+            addCriterion("f_version between", value1, value2, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotBetween(Long value1, Long value2) {
+            addCriterion("f_version not between", value1, value2, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserIsNull() {
+            addCriterion("apply_user is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserIsNotNull() {
+            addCriterion("apply_user is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserEqualTo(String value) {
+            addCriterion("apply_user =", value, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserNotEqualTo(String value) {
+            addCriterion("apply_user <>", value, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserGreaterThan(String value) {
+            addCriterion("apply_user >", value, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserGreaterThanOrEqualTo(String value) {
+            addCriterion("apply_user >=", value, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserLessThan(String value) {
+            addCriterion("apply_user <", value, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserLessThanOrEqualTo(String value) {
+            addCriterion("apply_user <=", value, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserLike(String value) {
+            addCriterion("apply_user like", value, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserNotLike(String value) {
+            addCriterion("apply_user not like", value, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserIn(List<String> values) {
+            addCriterion("apply_user in", values, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserNotIn(List<String> values) {
+            addCriterion("apply_user not in", values, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserBetween(String value1, String value2) {
+            addCriterion("apply_user between", value1, value2, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andApplyUserNotBetween(String value1, String value2) {
+            addCriterion("apply_user not between", value1, value2, "applyUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIsNull() {
+            addCriterion("json_data is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIsNotNull() {
+            addCriterion("json_data is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataEqualTo(String value) {
+            addCriterion("json_data =", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotEqualTo(String value) {
+            addCriterion("json_data <>", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataGreaterThan(String value) {
+            addCriterion("json_data >", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataGreaterThanOrEqualTo(String value) {
+            addCriterion("json_data >=", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLessThan(String value) {
+            addCriterion("json_data <", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLessThanOrEqualTo(String value) {
+            addCriterion("json_data <=", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLike(String value) {
+            addCriterion("json_data like", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotLike(String value) {
+            addCriterion("json_data not like", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIn(List<String> values) {
+            addCriterion("json_data in", values, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotIn(List<String> values) {
+            addCriterion("json_data not in", values, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataBetween(String value1, String value2) {
+            addCriterion("json_data between", value1, value2, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotBetween(String value1, String value2) {
+            addCriterion("json_data not between", value1, value2, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIsNull() {
+            addCriterion("create_user is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIsNotNull() {
+            addCriterion("create_user is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserEqualTo(String value) {
+            addCriterion("create_user =", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotEqualTo(String value) {
+            addCriterion("create_user <>", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserGreaterThan(String value) {
+            addCriterion("create_user >", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
+            addCriterion("create_user >=", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserLessThan(String value) {
+            addCriterion("create_user <", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserLessThanOrEqualTo(String value) {
+            addCriterion("create_user <=", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserLike(String value) {
+            addCriterion("create_user like", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotLike(String value) {
+            addCriterion("create_user not like", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIn(List<String> values) {
+            addCriterion("create_user in", values, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotIn(List<String> values) {
+            addCriterion("create_user not in", values, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserBetween(String value1, String value2) {
+            addCriterion("create_user between", value1, value2, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotBetween(String value1, String value2) {
+            addCriterion("create_user not between", value1, value2, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptIsNull() {
+            addCriterion("create_dept is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptIsNotNull() {
+            addCriterion("create_dept is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptEqualTo(String value) {
+            addCriterion("create_dept =", value, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptNotEqualTo(String value) {
+            addCriterion("create_dept <>", value, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptGreaterThan(String value) {
+            addCriterion("create_dept >", value, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptGreaterThanOrEqualTo(String value) {
+            addCriterion("create_dept >=", value, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptLessThan(String value) {
+            addCriterion("create_dept <", value, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptLessThanOrEqualTo(String value) {
+            addCriterion("create_dept <=", value, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptLike(String value) {
+            addCriterion("create_dept like", value, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptNotLike(String value) {
+            addCriterion("create_dept not like", value, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptIn(List<String> values) {
+            addCriterion("create_dept in", values, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptNotIn(List<String> values) {
+            addCriterion("create_dept not in", values, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptBetween(String value1, String value2) {
+            addCriterion("create_dept between", value1, value2, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateDeptNotBetween(String value1, String value2) {
+            addCriterion("create_dept not between", value1, value2, "createDept");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIsNull() {
+            addCriterion("create_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIsNotNull() {
+            addCriterion("create_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByEqualTo(String value) {
+            addCriterion("create_by =", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotEqualTo(String value) {
+            addCriterion("create_by <>", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByGreaterThan(String value) {
+            addCriterion("create_by >", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByGreaterThanOrEqualTo(String value) {
+            addCriterion("create_by >=", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLessThan(String value) {
+            addCriterion("create_by <", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLessThanOrEqualTo(String value) {
+            addCriterion("create_by <=", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLike(String value) {
+            addCriterion("create_by like", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotLike(String value) {
+            addCriterion("create_by not like", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIn(List<String> values) {
+            addCriterion("create_by in", values, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotIn(List<String> values) {
+            addCriterion("create_by not in", values, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByBetween(String value1, String value2) {
+            addCriterion("create_by between", value1, value2, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotBetween(String value1, String value2) {
+            addCriterion("create_by not between", value1, value2, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIsNull() {
+            addCriterion("update_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIsNotNull() {
+            addCriterion("update_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByEqualTo(String value) {
+            addCriterion("update_by =", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotEqualTo(String value) {
+            addCriterion("update_by <>", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByGreaterThan(String value) {
+            addCriterion("update_by >", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
+            addCriterion("update_by >=", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLessThan(String value) {
+            addCriterion("update_by <", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLessThanOrEqualTo(String value) {
+            addCriterion("update_by <=", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLike(String value) {
+            addCriterion("update_by like", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotLike(String value) {
+            addCriterion("update_by not like", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIn(List<String> values) {
+            addCriterion("update_by in", values, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotIn(List<String> values) {
+            addCriterion("update_by not in", values, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByBetween(String value1, String value2) {
+            addCriterion("update_by between", value1, value2, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotBetween(String value1, String value2) {
+            addCriterion("update_by not between", value1, value2, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 1051 - 0
src/main/java/com/activiti6/domain/MyFormDataExample.java

@@ -0,0 +1,1051 @@
+package com.activiti6.domain;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class MyFormDataExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public MyFormDataExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andFIdIsNull() {
+            addCriterion("f_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdIsNotNull() {
+            addCriterion("f_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdEqualTo(Long value) {
+            addCriterion("f_id =", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotEqualTo(Long value) {
+            addCriterion("f_id <>", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdGreaterThan(Long value) {
+            addCriterion("f_id >", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("f_id >=", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdLessThan(Long value) {
+            addCriterion("f_id <", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdLessThanOrEqualTo(Long value) {
+            addCriterion("f_id <=", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdIn(List<Long> values) {
+            addCriterion("f_id in", values, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotIn(List<Long> values) {
+            addCriterion("f_id not in", values, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdBetween(Long value1, Long value2) {
+            addCriterion("f_id between", value1, value2, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotBetween(Long value1, Long value2) {
+            addCriterion("f_id not between", value1, value2, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIsNull() {
+            addCriterion("model_key is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIsNotNull() {
+            addCriterion("model_key is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyEqualTo(String value) {
+            addCriterion("model_key =", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotEqualTo(String value) {
+            addCriterion("model_key <>", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyGreaterThan(String value) {
+            addCriterion("model_key >", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyGreaterThanOrEqualTo(String value) {
+            addCriterion("model_key >=", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLessThan(String value) {
+            addCriterion("model_key <", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLessThanOrEqualTo(String value) {
+            addCriterion("model_key <=", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLike(String value) {
+            addCriterion("model_key like", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotLike(String value) {
+            addCriterion("model_key not like", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIn(List<String> values) {
+            addCriterion("model_key in", values, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotIn(List<String> values) {
+            addCriterion("model_key not in", values, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyBetween(String value1, String value2) {
+            addCriterion("model_key between", value1, value2, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotBetween(String value1, String value2) {
+            addCriterion("model_key not between", value1, value2, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIsNull() {
+            addCriterion("model_version is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIsNotNull() {
+            addCriterion("model_version is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionEqualTo(Integer value) {
+            addCriterion("model_version =", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotEqualTo(Integer value) {
+            addCriterion("model_version <>", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionGreaterThan(Integer value) {
+            addCriterion("model_version >", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionGreaterThanOrEqualTo(Integer value) {
+            addCriterion("model_version >=", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionLessThan(Integer value) {
+            addCriterion("model_version <", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionLessThanOrEqualTo(Integer value) {
+            addCriterion("model_version <=", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIn(List<Integer> values) {
+            addCriterion("model_version in", values, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotIn(List<Integer> values) {
+            addCriterion("model_version not in", values, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionBetween(Integer value1, Integer value2) {
+            addCriterion("model_version between", value1, value2, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotBetween(Integer value1, Integer value2) {
+            addCriterion("model_version not between", value1, value2, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIsNull() {
+            addCriterion("modul_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIsNotNull() {
+            addCriterion("modul_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdEqualTo(String value) {
+            addCriterion("modul_id =", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotEqualTo(String value) {
+            addCriterion("modul_id <>", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdGreaterThan(String value) {
+            addCriterion("modul_id >", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdGreaterThanOrEqualTo(String value) {
+            addCriterion("modul_id >=", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLessThan(String value) {
+            addCriterion("modul_id <", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLessThanOrEqualTo(String value) {
+            addCriterion("modul_id <=", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLike(String value) {
+            addCriterion("modul_id like", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotLike(String value) {
+            addCriterion("modul_id not like", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIn(List<String> values) {
+            addCriterion("modul_id in", values, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotIn(List<String> values) {
+            addCriterion("modul_id not in", values, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdBetween(String value1, String value2) {
+            addCriterion("modul_id between", value1, value2, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotBetween(String value1, String value2) {
+            addCriterion("modul_id not between", value1, value2, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIsNull() {
+            addCriterion("f_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIsNotNull() {
+            addCriterion("f_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameEqualTo(String value) {
+            addCriterion("f_name =", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotEqualTo(String value) {
+            addCriterion("f_name <>", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameGreaterThan(String value) {
+            addCriterion("f_name >", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameGreaterThanOrEqualTo(String value) {
+            addCriterion("f_name >=", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLessThan(String value) {
+            addCriterion("f_name <", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLessThanOrEqualTo(String value) {
+            addCriterion("f_name <=", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLike(String value) {
+            addCriterion("f_name like", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotLike(String value) {
+            addCriterion("f_name not like", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIn(List<String> values) {
+            addCriterion("f_name in", values, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotIn(List<String> values) {
+            addCriterion("f_name not in", values, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameBetween(String value1, String value2) {
+            addCriterion("f_name between", value1, value2, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotBetween(String value1, String value2) {
+            addCriterion("f_name not between", value1, value2, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIsNull() {
+            addCriterion("f_key is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIsNotNull() {
+            addCriterion("f_key is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyEqualTo(String value) {
+            addCriterion("f_key =", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotEqualTo(String value) {
+            addCriterion("f_key <>", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyGreaterThan(String value) {
+            addCriterion("f_key >", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyGreaterThanOrEqualTo(String value) {
+            addCriterion("f_key >=", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLessThan(String value) {
+            addCriterion("f_key <", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLessThanOrEqualTo(String value) {
+            addCriterion("f_key <=", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLike(String value) {
+            addCriterion("f_key like", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotLike(String value) {
+            addCriterion("f_key not like", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIn(List<String> values) {
+            addCriterion("f_key in", values, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotIn(List<String> values) {
+            addCriterion("f_key not in", values, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyBetween(String value1, String value2) {
+            addCriterion("f_key between", value1, value2, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotBetween(String value1, String value2) {
+            addCriterion("f_key not between", value1, value2, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIsNull() {
+            addCriterion("f_version is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIsNotNull() {
+            addCriterion("f_version is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionEqualTo(Long value) {
+            addCriterion("f_version =", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotEqualTo(Long value) {
+            addCriterion("f_version <>", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionGreaterThan(Long value) {
+            addCriterion("f_version >", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionGreaterThanOrEqualTo(Long value) {
+            addCriterion("f_version >=", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionLessThan(Long value) {
+            addCriterion("f_version <", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionLessThanOrEqualTo(Long value) {
+            addCriterion("f_version <=", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIn(List<Long> values) {
+            addCriterion("f_version in", values, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotIn(List<Long> values) {
+            addCriterion("f_version not in", values, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionBetween(Long value1, Long value2) {
+            addCriterion("f_version between", value1, value2, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotBetween(Long value1, Long value2) {
+            addCriterion("f_version not between", value1, value2, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIsNull() {
+            addCriterion("json_data is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIsNotNull() {
+            addCriterion("json_data is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataEqualTo(String value) {
+            addCriterion("json_data =", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotEqualTo(String value) {
+            addCriterion("json_data <>", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataGreaterThan(String value) {
+            addCriterion("json_data >", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataGreaterThanOrEqualTo(String value) {
+            addCriterion("json_data >=", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLessThan(String value) {
+            addCriterion("json_data <", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLessThanOrEqualTo(String value) {
+            addCriterion("json_data <=", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLike(String value) {
+            addCriterion("json_data like", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotLike(String value) {
+            addCriterion("json_data not like", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIn(List<String> values) {
+            addCriterion("json_data in", values, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotIn(List<String> values) {
+            addCriterion("json_data not in", values, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataBetween(String value1, String value2) {
+            addCriterion("json_data between", value1, value2, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotBetween(String value1, String value2) {
+            addCriterion("json_data not between", value1, value2, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIsNull() {
+            addCriterion("create_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIsNotNull() {
+            addCriterion("create_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByEqualTo(String value) {
+            addCriterion("create_by =", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotEqualTo(String value) {
+            addCriterion("create_by <>", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByGreaterThan(String value) {
+            addCriterion("create_by >", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByGreaterThanOrEqualTo(String value) {
+            addCriterion("create_by >=", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLessThan(String value) {
+            addCriterion("create_by <", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLessThanOrEqualTo(String value) {
+            addCriterion("create_by <=", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLike(String value) {
+            addCriterion("create_by like", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotLike(String value) {
+            addCriterion("create_by not like", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIn(List<String> values) {
+            addCriterion("create_by in", values, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotIn(List<String> values) {
+            addCriterion("create_by not in", values, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByBetween(String value1, String value2) {
+            addCriterion("create_by between", value1, value2, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotBetween(String value1, String value2) {
+            addCriterion("create_by not between", value1, value2, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIsNull() {
+            addCriterion("update_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIsNotNull() {
+            addCriterion("update_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByEqualTo(String value) {
+            addCriterion("update_by =", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotEqualTo(String value) {
+            addCriterion("update_by <>", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByGreaterThan(String value) {
+            addCriterion("update_by >", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
+            addCriterion("update_by >=", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLessThan(String value) {
+            addCriterion("update_by <", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLessThanOrEqualTo(String value) {
+            addCriterion("update_by <=", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLike(String value) {
+            addCriterion("update_by like", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotLike(String value) {
+            addCriterion("update_by not like", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIn(List<String> values) {
+            addCriterion("update_by in", values, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotIn(List<String> values) {
+            addCriterion("update_by not in", values, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByBetween(String value1, String value2) {
+            addCriterion("update_by between", value1, value2, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotBetween(String value1, String value2) {
+            addCriterion("update_by not between", value1, value2, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 107 - 0
src/main/java/com/activiti6/domain/MyProcessDefinition.java

@@ -0,0 +1,107 @@
+package com.activiti6.domain;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MyProcessDefinition implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+    private String id;
+
+
+    private String deploymentId;
+    /**
+     * 流程名称
+     */
+    private String name;
+    /**
+     * 流程KEY
+     */
+    private String key;
+    /**
+     * 流程版本
+     */
+    private int version;
+    /**
+     * 所属分类
+     */
+    private String category;
+    /**
+     * 流程描述
+     */
+    private String description;
+
+    /**
+     * 部署时间
+     */
+    private Date deploymentTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public int getVersion() {
+        return version;
+    }
+
+    public void setVersion(int version) {
+        this.version = version;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getDeploymentId() {
+        return deploymentId;
+    }
+
+    public void setDeploymentId(String deploymentId) {
+        this.deploymentId = deploymentId;
+    }
+
+    public Date getDeploymentTime() {
+        return deploymentTime;
+    }
+
+    public void setDeploymentTime(Date deploymentTime) {
+        this.deploymentTime = deploymentTime;
+    }
+
+
+}

+ 237 - 0
src/main/java/com/activiti6/domain/MyProcessInstance.java

@@ -0,0 +1,237 @@
+package com.activiti6.domain;
+
+
+import java.util.Date;
+import java.util.Map;
+
+public class MyProcessInstance {
+    private String processDefinitionId;
+
+    private String processDefinitionName;
+
+    private String processDefinitionKey;
+
+    private Integer processDefinitionVersion;
+
+    private String deploymentId;
+
+    private String businessKey;
+
+    private boolean isSuspended;
+
+    private Map<String, Object> processVariables;
+
+    private String tenantId;
+
+    private String name;
+
+    private String nextTask;
+
+    private String description;
+
+    private String localizedName;
+
+    private String localizedDescription;
+
+    private Date startTime;
+
+    private String startUserId;
+
+    private String id;
+
+    private boolean isEnded;
+
+    private String activityId;
+
+    private String processInstanceId;
+
+    private String parentId;
+
+    private String superExecutionId;
+
+    private String rootProcessInstanceId;
+
+    public String getProcessDefinitionId() {
+        return processDefinitionId;
+    }
+
+    public void setProcessDefinitionId(String processDefinitionId) {
+        this.processDefinitionId = processDefinitionId;
+    }
+
+    public String getProcessDefinitionName() {
+        return processDefinitionName;
+    }
+
+    public void setProcessDefinitionName(String processDefinitionName) {
+        this.processDefinitionName = processDefinitionName;
+    }
+
+    public String getProcessDefinitionKey() {
+        return processDefinitionKey;
+    }
+
+    public void setProcessDefinitionKey(String processDefinitionKey) {
+        this.processDefinitionKey = processDefinitionKey;
+    }
+
+    public Integer getProcessDefinitionVersion() {
+        return processDefinitionVersion;
+    }
+
+    public void setProcessDefinitionVersion(Integer processDefinitionVersion) {
+        this.processDefinitionVersion = processDefinitionVersion;
+    }
+
+    public String getDeploymentId() {
+        return deploymentId;
+    }
+
+    public void setDeploymentId(String deploymentId) {
+        this.deploymentId = deploymentId;
+    }
+
+    public String getBusinessKey() {
+        return businessKey;
+    }
+
+    public void setBusinessKey(String businessKey) {
+        this.businessKey = businessKey;
+    }
+
+    public boolean isSuspended() {
+        return isSuspended;
+    }
+
+    public void setSuspended(boolean suspended) {
+        isSuspended = suspended;
+    }
+
+    public Map<String, Object> getProcessVariables() {
+        return processVariables;
+    }
+
+    public void setProcessVariables(Map<String, Object> processVariables) {
+        this.processVariables = processVariables;
+    }
+
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    public void setTenantId(String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getLocalizedName() {
+        return localizedName;
+    }
+
+    public void setLocalizedName(String localizedName) {
+        this.localizedName = localizedName;
+    }
+
+    public String getLocalizedDescription() {
+        return localizedDescription;
+    }
+
+    public void setLocalizedDescription(String localizedDescription) {
+        this.localizedDescription = localizedDescription;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getStartUserId() {
+        return startUserId;
+    }
+
+    public void setStartUserId(String startUserId) {
+        this.startUserId = startUserId;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public boolean isEnded() {
+        return isEnded;
+    }
+
+    public void setEnded(boolean ended) {
+        isEnded = ended;
+    }
+
+    public String getActivityId() {
+        return activityId;
+    }
+
+    public void setActivityId(String activityId) {
+        this.activityId = activityId;
+    }
+
+    public String getProcessInstanceId() {
+        return processInstanceId;
+    }
+
+    public void setProcessInstanceId(String processInstanceId) {
+        this.processInstanceId = processInstanceId;
+    }
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getSuperExecutionId() {
+        return superExecutionId;
+    }
+
+    public void setSuperExecutionId(String superExecutionId) {
+        this.superExecutionId = superExecutionId;
+    }
+
+    public String getRootProcessInstanceId() {
+        return rootProcessInstanceId;
+    }
+
+    public void setRootProcessInstanceId(String rootProcessInstanceId) {
+        this.rootProcessInstanceId = rootProcessInstanceId;
+    }
+
+    public String getNextTask() {
+        return nextTask;
+    }
+
+    public void setNextTask(String nextTask) {
+        this.nextTask = nextTask;
+    }
+}

+ 271 - 0
src/main/java/com/activiti6/domain/MyTask.java

@@ -0,0 +1,271 @@
+package com.activiti6.domain;
+
+import org.activiti.engine.task.DelegationState;
+import org.activiti.engine.task.Task;
+
+import java.util.Date;
+import java.util.Map;
+
+public class MyTask implements Task {
+    private String id;
+
+    private String name;
+
+    private String localizedName;
+
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getLocalizedName() {
+        return localizedName;
+    }
+
+    @Override
+    public void setLocalizedName(String localizedName) {
+        this.localizedName = localizedName;
+    }
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    @Override
+    public String getProcessDefinitionId() {
+        return processDefinitionId;
+    }
+
+    public void setProcessDefinitionId(String processDefinitionId) {
+        this.processDefinitionId = processDefinitionId;
+    }
+
+    public String getLocalizedDescription() {
+        return localizedDescription;
+    }
+
+    @Override
+    public void setLocalizedDescription(String localizedDescription) {
+        this.localizedDescription = localizedDescription;
+    }
+
+    @Override
+    public String getOwner() {
+        return owner;
+    }
+
+    @Override
+    public void setOwner(String owner) {
+        this.owner = owner;
+    }
+
+    @Override
+    public String getAssignee() {
+        return assignee;
+    }
+
+    @Override
+    public void setAssignee(String assignee) {
+        this.assignee = assignee;
+    }
+
+    @Override
+    public DelegationState getDelegationState() {
+        return delegationState;
+    }
+
+    @Override
+    public void setDelegationState(DelegationState delegationState) {
+        this.delegationState = delegationState;
+    }
+
+    @Override
+    public Date getDueDate() {
+        return dueDate;
+    }
+
+    @Override
+    public void setDueDate(Date dueDate) {
+        this.dueDate = dueDate;
+    }
+
+    @Override
+    public String getFormKey() {
+        return formKey;
+    }
+
+    @Override
+    public void setFormKey(String formKey) {
+        this.formKey = formKey;
+    }
+
+    @Override
+    public boolean isSuspended() {
+        return false;
+    }
+
+    @Override
+    public Map<String, Object> getTaskLocalVariables() {
+        return TaskLocalVariables;
+    }
+
+    public void setTaskLocalVariables(Map<String, Object> taskLocalVariables) {
+        TaskLocalVariables = taskLocalVariables;
+    }
+
+    @Override
+    public String getParentTaskId() {
+        return parentTaskId;
+    }
+
+    @Override
+    public void setParentTaskId(String parentTaskId) {
+        this.parentTaskId = parentTaskId;
+    }
+
+    @Override
+    public String getProcessInstanceId() {
+        return processInstanceId;
+    }
+
+    public void setProcessInstanceId(String processInstanceId) {
+        this.processInstanceId = processInstanceId;
+    }
+
+    @Override
+    public int getPriority() {
+        return priority;
+    }
+
+    @Override
+    public void setPriority(int priority) {
+        this.priority = priority;
+    }
+
+    @Override
+    public Date getClaimTime() {
+        return claimTime;
+    }
+
+    public void setClaimTime(Date claimTime) {
+        this.claimTime = claimTime;
+    }
+
+    @Override
+    public Map<String, Object> getProcessVariables() {
+        return processVariables;
+    }
+
+    public void setProcessVariables(Map<String, Object> processVariables) {
+        this.processVariables = processVariables;
+    }
+
+    @Override
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public String getTaskDefinitionKey() {
+        return taskDefinitionKey;
+    }
+
+    public void setTaskDefinitionKey(String taskDefinitionKey) {
+        this.taskDefinitionKey = taskDefinitionKey;
+    }
+
+    @Override
+    public String getExecutionId() {
+        return executionId;
+    }
+
+    public void setExecutionId(String executionId) {
+        this.executionId = executionId;
+    }
+
+    @Override
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    @Override
+    public void setTenantId(String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+    @Override
+    public String getCategory() {
+        return category;
+    }
+
+    @Override
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    private String description;
+
+    private String processDefinitionId;
+
+    private String localizedDescription;
+
+    private String owner;
+
+    private String assignee;
+
+    private DelegationState delegationState;
+
+    private Date dueDate;
+
+    private String formKey;
+
+    private Map<String, Object> TaskLocalVariables;
+
+    private String parentTaskId;
+
+    private String processInstanceId;
+
+    private int priority;
+
+    private Date claimTime;
+
+    private Map<String, Object> processVariables;
+
+    private Date createTime;
+
+    private String  taskDefinitionKey;
+
+    private String executionId;
+
+    private String tenantId;
+
+    private String category;
+
+
+
+
+}

+ 152 - 0
src/main/java/com/activiti6/domain/MyTaskVo.java

@@ -0,0 +1,152 @@
+package com.activiti6.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MyTaskVo implements Serializable {
+
+    /** 任务ID */
+    private String taskId;
+
+    /** 流程名称 */
+    private String processDefinitionName;
+    /**
+     * 工单编号
+     */
+    private String workNum;
+    /**
+     * 标题
+     */
+    private String title;
+
+
+    /** 任务名称 */
+    private String taskName;
+    /**
+     * 提交信息
+     */
+    private String creatUserName;
+    /**
+     *提交部门
+     */
+    private String creatDeptName;
+
+    /**
+     * 提交时间
+     */
+    private Date creatFormTime;
+
+    /**
+     * 外置表单key
+     */
+    private String formKey;
+    /**
+     * 模型key
+     */
+    private String modelKey;
+
+    /**
+     * 模型version
+     */
+    private Integer modelVersion;
+    /**
+     * 流程id
+     */
+    private String instanceId;
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getWorkNum() {
+        return workNum;
+    }
+
+    public void setWorkNum(String workNum) {
+        this.workNum = workNum;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getTaskName() {
+        return taskName;
+    }
+
+    public void setTaskName(String taskName) {
+        this.taskName = taskName;
+    }
+
+    public String getFormKey() {
+        return formKey;
+    }
+
+    public void setFormKey(String formKey) {
+        this.formKey = formKey;
+    }
+
+    public String getModelKey() {
+        return modelKey;
+    }
+
+    public void setModelKey(String modelKey) {
+        this.modelKey = modelKey;
+    }
+
+    public String getInstanceId() {
+        return instanceId;
+    }
+
+    public void setInstanceId(String instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    public Integer getModelVersion() {
+        return modelVersion;
+    }
+
+    public void setModelVersion(Integer modelVersion) {
+        this.modelVersion = modelVersion;
+    }
+
+    public String getProcessDefinitionName() {
+        return processDefinitionName;
+    }
+
+    public void setProcessDefinitionName(String processDefinitionName) {
+        this.processDefinitionName = processDefinitionName;
+    }
+
+    public String getCreatUserName() {
+        return creatUserName;
+    }
+
+    public void setCreatUserName(String creatUserName) {
+        this.creatUserName = creatUserName;
+    }
+
+    public String getCreatDeptName() {
+        return creatDeptName;
+    }
+
+    public void setCreatDeptName(String creatDeptName) {
+        this.creatDeptName = creatDeptName;
+    }
+
+    public Date getCreatFormTime() {
+        return creatFormTime;
+    }
+
+    public void setCreatFormTime(Date creatFormTime) {
+        this.creatFormTime = creatFormTime;
+    }
+}

+ 73 - 0
src/main/java/com/activiti6/domain/PageDomain.java

@@ -0,0 +1,73 @@
+package com.activiti6.domain;
+
+
+import com.activiti6.common.utils.StringUtils;
+
+/**
+ * 分页数据
+ *
+ * @author gybank
+ */
+public class PageDomain
+{
+    /** 当前记录起始索引 */
+    private Integer pageNum;
+
+    /** 每页显示记录数 */
+    private Integer pageSize;
+
+    /** 排序列 */
+    private String orderByColumn;
+    /** 排序的方向 "desc" 或者 "asc". */
+
+    private String isAsc;
+
+    public String getOrderBy()
+    {
+        if (StringUtils.isEmpty(orderByColumn))
+        {
+            return "";
+        }
+        return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
+    }
+
+    public Integer getPageNum()
+    {
+        return pageNum;
+    }
+
+    public void setPageNum(Integer pageNum)
+    {
+        this.pageNum = pageNum;
+    }
+
+    public Integer getPageSize()
+    {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize)
+    {
+        this.pageSize = pageSize;
+    }
+
+    public String getOrderByColumn()
+    {
+        return orderByColumn;
+    }
+
+    public void setOrderByColumn(String orderByColumn)
+    {
+        this.orderByColumn = orderByColumn;
+    }
+
+    public String getIsAsc()
+    {
+        return isAsc;
+    }
+
+    public void setIsAsc(String isAsc)
+    {
+        this.isAsc = isAsc;
+    }
+}

+ 31 - 0
src/main/java/com/activiti6/domain/ProcessInstanceCheckFrom.java

@@ -0,0 +1,31 @@
+package com.activiti6.domain;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ProcessInstanceCheckFrom implements Serializable {
+    /**
+     * 登录人id
+     */
+    private SysUser sysUser;
+
+    private List<String> instanceIdS=new ArrayList<>();
+
+
+    public List<String> getInstanceIdS() {
+        return instanceIdS;
+    }
+
+    public void setInstanceIdS(List<String> instanceIdS) {
+        this.instanceIdS = instanceIdS;
+    }
+
+    public SysUser getSysUser() {
+        return sysUser;
+    }
+
+    public void setSysUser(SysUser sysUser) {
+        this.sysUser = sysUser;
+    }
+}

+ 79 - 0
src/main/java/com/activiti6/domain/ProcessInstanceCommitFrom.java

@@ -0,0 +1,79 @@
+package com.activiti6.domain;
+
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ProcessInstanceCommitFrom implements Serializable {
+    /**
+     * 登录人id
+     */
+    private String userId;
+    /**
+     * 流程启动id
+     */
+    private String processId;
+    /**
+     * 数据集合
+     */
+    private Map<String, Object> dataMap = new HashMap<>();
+
+    private String taskId;
+    /**
+     * 表单id
+     */
+    private Long formId;
+    /**
+     * 提交表单名称
+     */
+    private String formKey;
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getProcessId() {
+        return processId;
+    }
+
+    public void setProcessId(String processId) {
+        this.processId = processId;
+    }
+
+    public Map<String, Object> getDataMap() {
+        return dataMap;
+    }
+
+    public void setDataMap(Map<String, Object> dataMap) {
+        this.dataMap = dataMap;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public Long getFormId() {
+        return formId;
+    }
+
+    public void setFormId(Long formId) {
+        this.formId = formId;
+    }
+
+    public String getFormKey() {
+        return formKey;
+    }
+
+    public void setFormKey(String formKey) {
+        this.formKey = formKey;
+    }
+}

+ 30 - 0
src/main/java/com/activiti6/domain/ProcessInstanceEvEntFrom.java

@@ -0,0 +1,30 @@
+package com.activiti6.domain;
+
+import java.io.Serializable;
+
+public class ProcessInstanceEvEntFrom implements Serializable {
+    /**
+     * 表单id
+     */
+    private Long formId;
+    /**
+     * 提交表单名称
+     */
+    private String formKey;
+
+    public Long getFormId() {
+        return formId;
+    }
+
+    public void setFormId(Long formId) {
+        this.formId = formId;
+    }
+
+    public String getFormKey() {
+        return formKey;
+    }
+
+    public void setFormKey(String formKey) {
+        this.formKey = formKey;
+    }
+}

+ 100 - 0
src/main/java/com/activiti6/domain/R.java

@@ -0,0 +1,100 @@
+package com.activiti6.domain;
+
+import com.activiti6.common.utils.Constants;
+
+import java.io.Serializable;
+
+/**
+ * 响应信息主体
+ *
+ * @author gybank
+ */
+public class R<T> implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+
+    private int code;
+
+    private String msg;
+
+    private T data;
+
+    public static <T> R<T> ok()
+    {
+        return restResult(null, Constants.SUCCESS, null);
+    }
+
+    public static <T> R<T> ok(T data)
+    {
+        return restResult(data, Constants.SUCCESS, null);
+    }
+
+    public static <T> R<T> ok(T data, String msg)
+    {
+        return restResult(data, Constants.SUCCESS, msg);
+    }
+
+    public static <T> R<T> failed()
+    {
+        return restResult(null, Constants.FAIL, null);
+    }
+
+    public static <T> R<T> failed(String msg)
+    {
+        return restResult(null, Constants.FAIL, msg);
+    }
+
+    public static <T> R<T> failed(T data)
+    {
+        return restResult(data, Constants.FAIL, null);
+    }
+
+    public static <T> R<T> failed(T data, String msg)
+    {
+        return restResult(data, Constants.FAIL, msg);
+    }
+
+    public static <T> R<T> failed(int code, String msg)
+    {
+        return restResult(null, code, msg);
+    }
+
+    private static <T> R<T> restResult(T data, int code, String msg)
+    {
+        R<T> apiResult = new R<>();
+        apiResult.setCode(code);
+        apiResult.setData(data);
+        apiResult.setMsg(msg);
+        return apiResult;
+    }
+
+    public int getCode()
+    {
+        return code;
+    }
+
+    public void setCode(int code)
+    {
+        this.code = code;
+    }
+
+    public String getMsg()
+    {
+        return msg;
+    }
+
+    public void setMsg(String msg)
+    {
+        this.msg = msg;
+    }
+
+    public T getData()
+    {
+        return data;
+    }
+
+    public void setData(T data)
+    {
+        this.data = data;
+    }
+}

+ 197 - 0
src/main/java/com/activiti6/domain/SysDept.java

@@ -0,0 +1,197 @@
+package com.activiti6.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import javax.validation.constraints.Size;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 部门表 sys_dept
+ *
+ * @author gybank
+ */
+public class SysDept extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 部门ID */
+    private Long deptId;
+
+    /** 父部门ID */
+    private Long parentId;
+
+    /** 祖级列表 */
+    private String ancestors;
+
+    /** 部门名称 */
+    private String deptName;
+
+    /** 显示顺序 */
+    private String orderNum;
+
+    /** 负责人 */
+    private String leader;
+
+    /** 联系电话 */
+    private String phone;
+
+    /** 邮箱 */
+    private String email;
+
+    /** 部门状态:0正常,1停用 */
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 父部门名称 */
+    private String parentName;
+
+    /** 子部门 */
+    private List<SysDept> children = new ArrayList<SysDept>();
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public Long getParentId()
+    {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId)
+    {
+        this.parentId = parentId;
+    }
+
+    public String getAncestors()
+    {
+        return ancestors;
+    }
+
+    public void setAncestors(String ancestors)
+    {
+        this.ancestors = ancestors;
+    }
+
+    @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
+    public String getDeptName()
+    {
+        return deptName;
+    }
+
+    public void setDeptName(String deptName)
+    {
+        this.deptName = deptName;
+    }
+
+    public String getOrderNum()
+    {
+        return orderNum;
+    }
+
+    public void setOrderNum(String orderNum)
+    {
+        this.orderNum = orderNum;
+    }
+
+    public String getLeader()
+    {
+        return leader;
+    }
+
+    public void setLeader(String leader)
+    {
+        this.leader = leader;
+    }
+
+    @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
+    public String getPhone()
+    {
+        return phone;
+    }
+
+    public void setPhone(String phone)
+    {
+        this.phone = phone;
+    }
+
+    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
+    public String getEmail()
+    {
+        return email;
+    }
+
+    public void setEmail(String email)
+    {
+        this.email = email;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getParentName()
+    {
+        return parentName;
+    }
+
+    public void setParentName(String parentName)
+    {
+        this.parentName = parentName;
+    }
+
+    public List<SysDept> getChildren()
+    {
+        return children;
+    }
+
+    public void setChildren(List<SysDept> children)
+    {
+        this.children = children;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+            .append("deptId", getDeptId())
+            .append("parentId", getParentId())
+            .append("ancestors", getAncestors())
+            .append("deptName", getDeptName())
+            .append("orderNum", getOrderNum())
+            .append("leader", getLeader())
+            .append("phone", getPhone())
+            .append("email", getEmail())
+            .append("status", getStatus())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 260 - 0
src/main/java/com/activiti6/domain/SysUser.java

@@ -0,0 +1,260 @@
+package com.activiti6.domain;
+
+import java.util.Date;
+
+
+/**
+ * 用户对象 sys_user
+ *
+ * @author gybank
+ */
+public class SysUser extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 用户ID */
+    private Long userId;
+
+    /** 部门ID */
+    private Long deptId;
+
+    /** 用户账号 */
+    private String userName;
+
+    /** 用户昵称 */
+    private String nickName;
+
+    /** 用户邮箱 */
+    private String email;
+
+    /** 手机号码 */
+    private String phonenumber;
+
+    /** 用户性别 */
+    private String sex;
+
+    /** 用户头像 */
+    private String avatar;
+
+    /** 密码 */
+    private String password;
+
+    /** 盐加密 */
+    private String salt;
+
+    /** 帐号状态(0正常 1停用) */
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 最后登陆IP */
+    private String loginIp;
+
+    /** 最后登陆时间 */
+    private Date loginDate;
+
+    /** 部门对象 */
+    private SysDept dept;
+
+
+    /** 角色组 */
+    private Long[] roleIds;
+
+    /** 岗位组 */
+    private Long[] postIds;
+
+    public SysUser()
+    {
+
+    }
+
+    public SysUser(Long userId)
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId()
+    {
+        return userId;
+    }
+
+    public void setUserId(Long userId)
+    {
+        this.userId = userId;
+    }
+
+    public boolean isAdmin()
+    {
+        return isAdmin(this.userId);
+    }
+
+    public static boolean isAdmin(Long userId)
+    {
+        return userId != null && 1L == userId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    public String getNickName()
+    {
+        return nickName;
+    }
+
+    public void setNickName(String nickName)
+    {
+        this.nickName = nickName;
+    }
+
+
+    public String getUserName()
+    {
+        return userName;
+    }
+
+    public void setUserName(String userName)
+    {
+        this.userName = userName;
+    }
+
+
+    public String getEmail()
+    {
+        return email;
+    }
+
+    public void setEmail(String email)
+    {
+        this.email = email;
+    }
+
+    public String getPhonenumber()
+    {
+        return phonenumber;
+    }
+
+    public void setPhonenumber(String phonenumber)
+    {
+        this.phonenumber = phonenumber;
+    }
+
+    public String getSex()
+    {
+        return sex;
+    }
+
+    public void setSex(String sex)
+    {
+        this.sex = sex;
+    }
+
+    public String getAvatar()
+    {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar)
+    {
+        this.avatar = avatar;
+    }
+
+    public String getPassword()
+    {
+        return password;
+    }
+
+    public void setPassword(String password)
+    {
+        this.password = password;
+    }
+
+    public String getSalt()
+    {
+        return salt;
+    }
+
+    public void setSalt(String salt)
+    {
+        this.salt = salt;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getLoginIp()
+    {
+        return loginIp;
+    }
+
+    public void setLoginIp(String loginIp)
+    {
+        this.loginIp = loginIp;
+    }
+
+    public Date getLoginDate()
+    {
+        return loginDate;
+    }
+
+    public void setLoginDate(Date loginDate)
+    {
+        this.loginDate = loginDate;
+    }
+
+    public SysDept getDept()
+    {
+        return dept;
+    }
+
+    public void setDept(SysDept dept)
+    {
+        this.dept = dept;
+    }
+
+
+    public Long[] getRoleIds()
+    {
+        return roleIds;
+    }
+
+    public void setRoleIds(Long[] roleIds)
+    {
+        this.roleIds = roleIds;
+    }
+
+    public Long[] getPostIds()
+    {
+        return postIds;
+    }
+
+    public void setPostIds(Long[] postIds)
+    {
+        this.postIds = postIds;
+    }
+
+}

+ 62 - 0
src/main/java/com/activiti6/domain/TableDataInfo.java

@@ -0,0 +1,62 @@
+package com.activiti6.domain;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 表格分页数据对象
+ *
+ * @author gybank
+ */
+public class TableDataInfo<T> implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 总记录数 */
+    private long total;
+
+    /** 列表数据 */
+    private List<T> rows;
+
+    /** 消息状态码 */
+    private int code;
+
+    /** 消息内容 */
+    private String msg;
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public long getTotal() {
+        return total;
+    }
+
+    public void setTotal(long total) {
+        this.total = total;
+    }
+
+    public List<T> getRows() {
+        return rows;
+    }
+
+    public void setRows(List<T> rows) {
+        this.rows = rows;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+}

+ 33 - 0
src/main/java/com/activiti6/domain/TaskCommitForm.java

@@ -0,0 +1,33 @@
+package com.activiti6.domain;
+
+public class TaskCommitForm {
+
+    private String taskId;
+    private SysUser user;
+
+    private MyFormDataActiviti myFormDataActiviti;
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public MyFormDataActiviti getMyFormDataActiviti() {
+        return myFormDataActiviti;
+    }
+
+    public void setMyFormDataActiviti(MyFormDataActiviti myFormDataActiviti) {
+        this.myFormDataActiviti = myFormDataActiviti;
+    }
+
+    public SysUser getUser() {
+        return user;
+    }
+
+    public void setUser(SysUser user) {
+        this.user = user;
+    }
+}

+ 34 - 0
src/main/java/com/activiti6/domain/TreeVo.java

@@ -0,0 +1,34 @@
+package com.activiti6.domain;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class TreeVo implements Serializable {
+    private String value;
+    private String label;
+    private List<TreeVo> children;
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public List<TreeVo> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<TreeVo> children) {
+        this.children = children;
+    }
+}

+ 25 - 0
src/main/java/com/activiti6/domain/form/MyFormDataActivitiForm.java

@@ -0,0 +1,25 @@
+package com.activiti6.domain.form;
+
+import com.activiti6.domain.MyFormDataActiviti;
+import com.activiti6.domain.SysUser;
+
+public class MyFormDataActivitiForm {
+    private MyFormDataActiviti myFormDataActiviti;
+    private SysUser user;
+
+    public MyFormDataActiviti getMyFormDataActiviti() {
+        return myFormDataActiviti;
+    }
+
+    public void setMyFormDataActiviti(MyFormDataActiviti myFormDataActiviti) {
+        this.myFormDataActiviti = myFormDataActiviti;
+    }
+
+    public SysUser getUser() {
+        return user;
+    }
+
+    public void setUser(SysUser user) {
+        this.user = user;
+    }
+}

+ 15 - 0
src/main/java/com/activiti6/domain/form/TaskDoneListForm.java

@@ -0,0 +1,15 @@
+package com.activiti6.domain.form;
+
+import com.activiti6.domain.MyFormDataActiviti;
+
+public class TaskDoneListForm extends MyFormDataActiviti {
+    private String userId;
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+}

+ 15 - 0
src/main/java/com/activiti6/domain/form/TaskListForm.java

@@ -0,0 +1,15 @@
+package com.activiti6.domain.form;
+
+import com.activiti6.domain.MyTaskVo;
+
+public class TaskListForm extends MyTaskVo {
+    private String userId;
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+}

+ 24 - 0
src/main/java/com/activiti6/entity/ActivitiUser.java

@@ -0,0 +1,24 @@
+package com.activiti6.entity;
+
+public class ActivitiUser {
+
+    private String id;
+
+    private String firstName;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+}

+ 42 - 0
src/main/java/com/activiti6/entity/AjaxEntityVo.java

@@ -0,0 +1,42 @@
+package com.activiti6.entity;
+
+import java.io.Serializable;
+
+public class AjaxEntityVo implements Serializable {
+    private Integer code;
+    private String msg;
+    private Integer count;
+    private Object data;
+
+    public Integer getCode() {
+        return code;
+    }
+
+    public void setCode(Integer code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public Object getData() {
+        return data;
+    }
+
+    public void setData(Object data) {
+        this.data = data;
+    }
+}

+ 23 - 0
src/main/java/com/activiti6/entity/GroupActiviti.java

@@ -0,0 +1,23 @@
+package com.activiti6.entity;
+
+public class GroupActiviti {
+
+    private String id;
+    private String name;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 148 - 0
src/main/java/com/activiti6/entity/MyFormData.java

@@ -0,0 +1,148 @@
+package com.activiti6.entity;
+
+import java.util.Date;
+
+public class MyFormData {
+    /** 主键*/
+    private Long fId;
+
+    /** 模型key*/
+    private String modelKey;
+
+    /** 模型版本*/
+    private Integer modelVersion;
+
+    /** 模块id*/
+    private String modulId;
+
+    /** 名称*/
+    private String fName;
+
+    /** key*/
+    private String fKey;
+
+    /** 版本*/
+    private Long fVersion;
+
+    /** json数据*/
+    private String jsonData;
+
+    /** 是否可用 0 不可用 1 可用*/
+    private Integer status;
+
+    /** 创建人*/
+    private String createBy;
+
+    /** 创建时间*/
+    private Date createTime;
+
+    /** 更新用户*/
+    private String updateBy;
+
+    /** 更新时间*/
+    private Date updateTime;
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public String getModelKey() {
+        return modelKey;
+    }
+
+    public void setModelKey(String modelKey) {
+        this.modelKey = modelKey == null ? null : modelKey.trim();
+    }
+
+    public Integer getModelVersion() {
+        return modelVersion;
+    }
+
+    public void setModelVersion(Integer modelVersion) {
+        this.modelVersion = modelVersion;
+    }
+
+    public String getModulId() {
+        return modulId;
+    }
+
+    public void setModulId(String modulId) {
+        this.modulId = modulId == null ? null : modulId.trim();
+    }
+
+    public String getfName() {
+        return fName;
+    }
+
+    public void setfName(String fName) {
+        this.fName = fName == null ? null : fName.trim();
+    }
+
+    public String getfKey() {
+        return fKey;
+    }
+
+    public void setfKey(String fKey) {
+        this.fKey = fKey == null ? null : fKey.trim();
+    }
+
+    public Long getfVersion() {
+        return fVersion;
+    }
+
+    public void setfVersion(Long fVersion) {
+        this.fVersion = fVersion;
+    }
+
+    public String getJsonData() {
+        return jsonData;
+    }
+
+    public void setJsonData(String jsonData) {
+        this.jsonData = jsonData == null ? null : jsonData.trim();
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy == null ? null : createBy.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy == null ? null : updateBy.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 1051 - 0
src/main/java/com/activiti6/entity/MyFormDataExample.java

@@ -0,0 +1,1051 @@
+package com.activiti6.entity;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class MyFormDataExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public MyFormDataExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andFIdIsNull() {
+            addCriterion("f_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdIsNotNull() {
+            addCriterion("f_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdEqualTo(Long value) {
+            addCriterion("f_id =", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotEqualTo(Long value) {
+            addCriterion("f_id <>", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdGreaterThan(Long value) {
+            addCriterion("f_id >", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("f_id >=", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdLessThan(Long value) {
+            addCriterion("f_id <", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdLessThanOrEqualTo(Long value) {
+            addCriterion("f_id <=", value, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdIn(List<Long> values) {
+            addCriterion("f_id in", values, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotIn(List<Long> values) {
+            addCriterion("f_id not in", values, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdBetween(Long value1, Long value2) {
+            addCriterion("f_id between", value1, value2, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFIdNotBetween(Long value1, Long value2) {
+            addCriterion("f_id not between", value1, value2, "fId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIsNull() {
+            addCriterion("model_key is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIsNotNull() {
+            addCriterion("model_key is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyEqualTo(String value) {
+            addCriterion("model_key =", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotEqualTo(String value) {
+            addCriterion("model_key <>", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyGreaterThan(String value) {
+            addCriterion("model_key >", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyGreaterThanOrEqualTo(String value) {
+            addCriterion("model_key >=", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLessThan(String value) {
+            addCriterion("model_key <", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLessThanOrEqualTo(String value) {
+            addCriterion("model_key <=", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyLike(String value) {
+            addCriterion("model_key like", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotLike(String value) {
+            addCriterion("model_key not like", value, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyIn(List<String> values) {
+            addCriterion("model_key in", values, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotIn(List<String> values) {
+            addCriterion("model_key not in", values, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyBetween(String value1, String value2) {
+            addCriterion("model_key between", value1, value2, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelKeyNotBetween(String value1, String value2) {
+            addCriterion("model_key not between", value1, value2, "modelKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIsNull() {
+            addCriterion("model_version is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIsNotNull() {
+            addCriterion("model_version is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionEqualTo(Integer value) {
+            addCriterion("model_version =", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotEqualTo(Integer value) {
+            addCriterion("model_version <>", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionGreaterThan(Integer value) {
+            addCriterion("model_version >", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionGreaterThanOrEqualTo(Integer value) {
+            addCriterion("model_version >=", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionLessThan(Integer value) {
+            addCriterion("model_version <", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionLessThanOrEqualTo(Integer value) {
+            addCriterion("model_version <=", value, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionIn(List<Integer> values) {
+            addCriterion("model_version in", values, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotIn(List<Integer> values) {
+            addCriterion("model_version not in", values, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionBetween(Integer value1, Integer value2) {
+            addCriterion("model_version between", value1, value2, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelVersionNotBetween(Integer value1, Integer value2) {
+            addCriterion("model_version not between", value1, value2, "modelVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIsNull() {
+            addCriterion("modul_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIsNotNull() {
+            addCriterion("modul_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdEqualTo(String value) {
+            addCriterion("modul_id =", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotEqualTo(String value) {
+            addCriterion("modul_id <>", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdGreaterThan(String value) {
+            addCriterion("modul_id >", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdGreaterThanOrEqualTo(String value) {
+            addCriterion("modul_id >=", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLessThan(String value) {
+            addCriterion("modul_id <", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLessThanOrEqualTo(String value) {
+            addCriterion("modul_id <=", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdLike(String value) {
+            addCriterion("modul_id like", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotLike(String value) {
+            addCriterion("modul_id not like", value, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdIn(List<String> values) {
+            addCriterion("modul_id in", values, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotIn(List<String> values) {
+            addCriterion("modul_id not in", values, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdBetween(String value1, String value2) {
+            addCriterion("modul_id between", value1, value2, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andModulIdNotBetween(String value1, String value2) {
+            addCriterion("modul_id not between", value1, value2, "modulId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIsNull() {
+            addCriterion("f_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIsNotNull() {
+            addCriterion("f_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameEqualTo(String value) {
+            addCriterion("f_name =", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotEqualTo(String value) {
+            addCriterion("f_name <>", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameGreaterThan(String value) {
+            addCriterion("f_name >", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameGreaterThanOrEqualTo(String value) {
+            addCriterion("f_name >=", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLessThan(String value) {
+            addCriterion("f_name <", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLessThanOrEqualTo(String value) {
+            addCriterion("f_name <=", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameLike(String value) {
+            addCriterion("f_name like", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotLike(String value) {
+            addCriterion("f_name not like", value, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameIn(List<String> values) {
+            addCriterion("f_name in", values, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotIn(List<String> values) {
+            addCriterion("f_name not in", values, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameBetween(String value1, String value2) {
+            addCriterion("f_name between", value1, value2, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFNameNotBetween(String value1, String value2) {
+            addCriterion("f_name not between", value1, value2, "fName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIsNull() {
+            addCriterion("f_key is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIsNotNull() {
+            addCriterion("f_key is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyEqualTo(String value) {
+            addCriterion("f_key =", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotEqualTo(String value) {
+            addCriterion("f_key <>", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyGreaterThan(String value) {
+            addCriterion("f_key >", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyGreaterThanOrEqualTo(String value) {
+            addCriterion("f_key >=", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLessThan(String value) {
+            addCriterion("f_key <", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLessThanOrEqualTo(String value) {
+            addCriterion("f_key <=", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyLike(String value) {
+            addCriterion("f_key like", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotLike(String value) {
+            addCriterion("f_key not like", value, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyIn(List<String> values) {
+            addCriterion("f_key in", values, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotIn(List<String> values) {
+            addCriterion("f_key not in", values, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyBetween(String value1, String value2) {
+            addCriterion("f_key between", value1, value2, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFKeyNotBetween(String value1, String value2) {
+            addCriterion("f_key not between", value1, value2, "fKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIsNull() {
+            addCriterion("f_version is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIsNotNull() {
+            addCriterion("f_version is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionEqualTo(Long value) {
+            addCriterion("f_version =", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotEqualTo(Long value) {
+            addCriterion("f_version <>", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionGreaterThan(Long value) {
+            addCriterion("f_version >", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionGreaterThanOrEqualTo(Long value) {
+            addCriterion("f_version >=", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionLessThan(Long value) {
+            addCriterion("f_version <", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionLessThanOrEqualTo(Long value) {
+            addCriterion("f_version <=", value, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionIn(List<Long> values) {
+            addCriterion("f_version in", values, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotIn(List<Long> values) {
+            addCriterion("f_version not in", values, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionBetween(Long value1, Long value2) {
+            addCriterion("f_version between", value1, value2, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andFVersionNotBetween(Long value1, Long value2) {
+            addCriterion("f_version not between", value1, value2, "fVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIsNull() {
+            addCriterion("json_data is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIsNotNull() {
+            addCriterion("json_data is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataEqualTo(String value) {
+            addCriterion("json_data =", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotEqualTo(String value) {
+            addCriterion("json_data <>", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataGreaterThan(String value) {
+            addCriterion("json_data >", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataGreaterThanOrEqualTo(String value) {
+            addCriterion("json_data >=", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLessThan(String value) {
+            addCriterion("json_data <", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLessThanOrEqualTo(String value) {
+            addCriterion("json_data <=", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataLike(String value) {
+            addCriterion("json_data like", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotLike(String value) {
+            addCriterion("json_data not like", value, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataIn(List<String> values) {
+            addCriterion("json_data in", values, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotIn(List<String> values) {
+            addCriterion("json_data not in", values, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataBetween(String value1, String value2) {
+            addCriterion("json_data between", value1, value2, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andJsonDataNotBetween(String value1, String value2) {
+            addCriterion("json_data not between", value1, value2, "jsonData");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("status =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("status <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("status >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("status >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("status <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("status <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("status in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("status not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("status between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("status not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIsNull() {
+            addCriterion("create_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIsNotNull() {
+            addCriterion("create_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByEqualTo(String value) {
+            addCriterion("create_by =", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotEqualTo(String value) {
+            addCriterion("create_by <>", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByGreaterThan(String value) {
+            addCriterion("create_by >", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByGreaterThanOrEqualTo(String value) {
+            addCriterion("create_by >=", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLessThan(String value) {
+            addCriterion("create_by <", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLessThanOrEqualTo(String value) {
+            addCriterion("create_by <=", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByLike(String value) {
+            addCriterion("create_by like", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotLike(String value) {
+            addCriterion("create_by not like", value, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByIn(List<String> values) {
+            addCriterion("create_by in", values, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotIn(List<String> values) {
+            addCriterion("create_by not in", values, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByBetween(String value1, String value2) {
+            addCriterion("create_by between", value1, value2, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateByNotBetween(String value1, String value2) {
+            addCriterion("create_by not between", value1, value2, "createBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIsNull() {
+            addCriterion("update_by is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIsNotNull() {
+            addCriterion("update_by is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByEqualTo(String value) {
+            addCriterion("update_by =", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotEqualTo(String value) {
+            addCriterion("update_by <>", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByGreaterThan(String value) {
+            addCriterion("update_by >", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
+            addCriterion("update_by >=", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLessThan(String value) {
+            addCriterion("update_by <", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLessThanOrEqualTo(String value) {
+            addCriterion("update_by <=", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByLike(String value) {
+            addCriterion("update_by like", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotLike(String value) {
+            addCriterion("update_by not like", value, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByIn(List<String> values) {
+            addCriterion("update_by in", values, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotIn(List<String> values) {
+            addCriterion("update_by not in", values, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByBetween(String value1, String value2) {
+            addCriterion("update_by between", value1, value2, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateByNotBetween(String value1, String value2) {
+            addCriterion("update_by not between", value1, value2, "updateBy");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 149 - 0
src/main/java/com/activiti6/entity/MyFormDataZip.java

@@ -0,0 +1,149 @@
+package com.activiti6.entity;
+
+import java.util.Date;
+
+public class MyFormDataZip {
+
+    /** 主键*/
+    private Long fId;
+
+    /** 模型key*/
+    private String modelKey;
+
+    /** 模型版本*/
+    private Integer modelVersion;
+
+    /** 模块id*/
+    private String modulId;
+
+    /** 名称*/
+    private String fName;
+
+    /** key*/
+    private String fKey;
+
+    /** 版本*/
+    private Long fVersion;
+
+    /** json数据*/
+    private Object jsonData;
+
+    /** 是否可用 0 不可用 1 可用*/
+    private Integer status;
+
+    /** 创建人*/
+    private String createBy;
+
+    /** 创建时间*/
+    private Date createTime;
+
+    /** 更新用户*/
+    private String updateBy;
+
+    /** 更新时间*/
+    private Date updateTime;
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public String getModelKey() {
+        return modelKey;
+    }
+
+    public void setModelKey(String modelKey) {
+        this.modelKey = modelKey;
+    }
+
+    public Integer getModelVersion() {
+        return modelVersion;
+    }
+
+    public void setModelVersion(Integer modelVersion) {
+        this.modelVersion = modelVersion;
+    }
+
+    public String getModulId() {
+        return modulId;
+    }
+
+    public void setModulId(String modulId) {
+        this.modulId = modulId;
+    }
+
+    public String getfName() {
+        return fName;
+    }
+
+    public void setfName(String fName) {
+        this.fName = fName;
+    }
+
+    public String getfKey() {
+        return fKey;
+    }
+
+    public void setfKey(String fKey) {
+        this.fKey = fKey;
+    }
+
+    public Long getfVersion() {
+        return fVersion;
+    }
+
+    public void setfVersion(Long fVersion) {
+        this.fVersion = fVersion;
+    }
+
+    public Object getJsonData() {
+        return jsonData;
+    }
+
+    public void setJsonData(Object jsonData) {
+        this.jsonData = jsonData;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 22 - 0
src/main/java/com/activiti6/entity/SelectVo.java

@@ -0,0 +1,22 @@
+package com.activiti6.entity;
+
+public class SelectVo {
+    private String text;
+    private String value;
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 148 - 0
src/main/java/com/activiti6/entity/editor/AbstractModel.java

@@ -0,0 +1,148 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.activiti6.entity.editor;
+
+import java.util.Date;
+
+public class AbstractModel {
+
+  public static final int MODEL_TYPE_BPMN = 0;
+  public static final int MODEL_TYPE_FORM = 2;
+  public static final int MODEL_TYPE_APP = 3;
+  public static final int MODEL_TYPE_DECISION_TABLE = 4;
+
+
+  protected String id;
+
+  protected String name;
+  
+  protected String key;
+
+  protected String description;
+
+  protected Date created;
+
+  protected Date lastUpdated;
+
+  private String createdBy;
+
+  private String lastUpdatedBy;
+
+  protected int version;
+
+  protected String modelEditorJson;
+
+  protected String comment;
+
+  protected Integer modelType;
+
+  public AbstractModel() {
+    this.created = new Date();
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  public void setId(String id) {
+    this.id = id;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  public void setKey(String key) {
+    this.key = key;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  public void setDescription(String description) {
+    this.description = description;
+  }
+
+  public Date getCreated() {
+    return created;
+  }
+
+  public void setCreated(Date created) {
+    this.created = created;
+  }
+
+  public Date getLastUpdated() {
+    return lastUpdated;
+  }
+
+  public void setLastUpdated(Date lastUpdated) {
+    this.lastUpdated = lastUpdated;
+  }
+
+  public String getCreatedBy() {
+    return createdBy;
+  }
+
+  public void setCreatedBy(String createdBy) {
+    this.createdBy = createdBy;
+  }
+
+  public String getLastUpdatedBy() {
+    return lastUpdatedBy;
+  }
+
+  public void setLastUpdatedBy(String lastUpdatedBy) {
+    this.lastUpdatedBy = lastUpdatedBy;
+  }
+
+  public int getVersion() {
+    return version;
+  }
+
+  public void setVersion(int version) {
+    this.version = version;
+  }
+
+  public String getModelEditorJson() {
+    return modelEditorJson;
+  }
+
+  public void setModelEditorJson(String modelEditorJson) {
+    this.modelEditorJson = modelEditorJson;
+  }
+
+  public void setComment(String comment) {
+    this.comment = comment;
+  }
+
+  public String getComment() {
+    return comment;
+  }
+
+  public Integer getModelType() {
+    return modelType;
+  }
+
+  public void setModelType(Integer modelType) {
+    this.modelType = modelType;
+  }
+}

+ 31 - 0
src/main/java/com/activiti6/entity/editor/SaveModel.java

@@ -0,0 +1,31 @@
+/* Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.activiti6.entity.editor;
+
+public class SaveModel extends AbstractModel {
+
+	private byte[] thumbnail;
+
+	public SaveModel() {
+		super();
+	}
+	
+	public byte[] getThumbnail() {
+		return thumbnail;
+	}
+
+	public void setThumbnail(byte[] thumbnail) {
+		this.thumbnail = thumbnail;
+	}
+	
+}

+ 64 - 0
src/main/java/com/activiti6/mapper/DbTableHisMapper.java

@@ -0,0 +1,64 @@
+package com.activiti6.mapper;
+
+import com.activiti6.domain.DbTableHis;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 流程历史单Mapper接口
+ *
+ * @author xtd
+ * @date 2020-04-14
+ */
+@Mapper
+public interface DbTableHisMapper
+{
+    /**
+     * 查询流程历史单
+     *
+     * @param instanceId 流程历史单ID
+     * @return 流程历史单
+     */
+    public DbTableHis selectDbTableHisById(String instanceId);
+
+    /**
+     * 查询流程历史单列表
+     *
+     * @param dbTableHis 流程历史单
+     * @return 流程历史单集合
+     */
+    public List<DbTableHis> selectDbTableHisList(DbTableHis dbTableHis);
+
+    /**
+     * 新增流程历史单
+     *
+     * @param dbTableHis 流程历史单
+     * @return 结果
+     */
+    public int insertDbTableHis(DbTableHis dbTableHis);
+
+    /**
+     * 修改流程历史单
+     *
+     * @param dbTableHis 流程历史单
+     * @return 结果
+     */
+    public int updateDbTableHis(DbTableHis dbTableHis);
+
+    /**
+     * 删除流程历史单
+     *
+     * @param instanceId 流程历史单ID
+     * @return 结果
+     */
+    public int deleteDbTableHisById(String instanceId);
+
+    /**
+     * 批量删除流程历史单
+     *
+     * @param instanceIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteDbTableHisByIds(String[] instanceIds);
+}

+ 9 - 0
src/main/java/com/activiti6/mapper/MyActivitiMapper.java

@@ -0,0 +1,9 @@
+package com.activiti6.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface MyActivitiMapper {
+    int deleteGroupByUserId(@Param("userId") String userId);
+}

+ 36 - 0
src/main/java/com/activiti6/mapper/MyFormDataActivitiMapper.java

@@ -0,0 +1,36 @@
+package com.activiti6.mapper;
+
+
+import com.activiti6.domain.MyFormDataActiviti;
+import com.activiti6.domain.MyFormDataActivitiExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface MyFormDataActivitiMapper {
+    int countByExample(MyFormDataActivitiExample example);
+
+    int deleteByExample(MyFormDataActivitiExample example);
+
+    int deleteByPrimaryKey(Long fId);
+
+    int insert(MyFormDataActiviti record);
+
+    int insertSelective(MyFormDataActiviti record);
+
+    List<MyFormDataActiviti> selectByExample(MyFormDataActivitiExample example);
+
+    MyFormDataActiviti selectByPrimaryKey(Long fId);
+
+    int updateByExampleSelective(@Param("record") MyFormDataActiviti record, @Param("example") MyFormDataActivitiExample example);
+
+    int updateByExample(@Param("record") MyFormDataActiviti record, @Param("example") MyFormDataActivitiExample example);
+
+    int updateByPrimaryKeySelective(MyFormDataActiviti record);
+
+    int updateByPrimaryKey(MyFormDataActiviti record);
+
+    List<MyFormDataActiviti> taskDoneList(@Param("myFormDataActiviti") MyFormDataActiviti myFormDataActiviti);
+}

+ 33 - 0
src/main/java/com/activiti6/mapper/MyFormDataMapper.java

@@ -0,0 +1,33 @@
+package com.activiti6.mapper;
+
+import com.activiti6.entity.MyFormData;
+import com.activiti6.entity.MyFormDataExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface MyFormDataMapper {
+    int countByExample(MyFormDataExample example);
+
+    int deleteByExample(MyFormDataExample example);
+
+    int deleteByPrimaryKey(Long fId);
+
+    int insert(MyFormData record);
+
+    int insertSelective(MyFormData record);
+
+    List<MyFormData> selectByExample(MyFormDataExample example);
+
+    MyFormData selectByPrimaryKey(Long fId);
+
+    int updateByExampleSelective(@Param("record") MyFormData record, @Param("example") MyFormDataExample example);
+
+    int updateByExample(@Param("record") MyFormData record, @Param("example") MyFormDataExample example);
+
+    int updateByPrimaryKeySelective(MyFormData record);
+
+    int updateByPrimaryKey(MyFormData record);
+
+    void insertList(List<MyFormData> list);
+}

+ 33 - 0
src/main/java/com/activiti6/mapper/activiti/NewMyFormDataMapper.java

@@ -0,0 +1,33 @@
+package com.activiti6.mapper.activiti;
+
+
+
+import com.activiti6.domain.MyFormData;
+import com.activiti6.domain.MyFormDataExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface NewMyFormDataMapper {
+    int countByExample(MyFormDataExample example);
+
+    int deleteByExample(MyFormDataExample example);
+
+    int deleteByPrimaryKey(Long fId);
+
+    int insert(MyFormData record);
+
+    int insertSelective(MyFormData record);
+
+    List<MyFormData> selectByExample(MyFormDataExample example);
+
+    MyFormData selectByPrimaryKey(Long fId);
+
+    int updateByExampleSelective(@Param("record") MyFormData record, @Param("example") MyFormDataExample example);
+
+    int updateByExample(@Param("record") MyFormData record, @Param("example") MyFormDataExample example);
+
+    int updateByPrimaryKeySelective(MyFormData record);
+
+    int updateByPrimaryKey(MyFormData record);
+}

+ 5 - 0
src/main/java/com/activiti6/service/ModelService.java

@@ -0,0 +1,5 @@
+package com.activiti6.service;
+
+public interface ModelService {
+    void deleteProcessInstance(String modelId);
+}

+ 71 - 0
src/main/java/com/activiti6/service/activiti/IDbTableHisService.java

@@ -0,0 +1,71 @@
+package com.activiti6.service.activiti;
+
+import com.activiti6.domain.DbTableHis;
+
+import java.util.List;
+
+/**
+ * 流程历史单Service接口
+ *
+ * @author xtd
+ * @date 2020-04-14
+ */
+public interface IDbTableHisService {
+    /**
+     * 查询流程历史单
+     *
+     * @param instanceId 流程历史单ID
+     * @return 流程历史单
+     */
+    public DbTableHis selectDbTableHisById(String instanceId);
+
+    /**
+     * 查询流程历史单列表
+     *
+     * @param dbTableHis 流程历史单
+     * @return 流程历史单集合
+     */
+    public List<DbTableHis> selectDbTableHisList(DbTableHis dbTableHis);
+
+    /**
+     * 新增流程历史单
+     *
+     * @param dbTableHis 流程历史单
+     * @return 结果
+     */
+    public int insertDbTableHis(DbTableHis dbTableHis);
+
+    /**
+     * 修改流程历史单
+     *
+     * @param dbTableHis 流程历史单
+     * @return 结果
+     */
+    public int updateDbTableHis(DbTableHis dbTableHis);
+
+    /**
+     * 批量删除流程历史单
+     *
+     * @param instanceIds 需要删除的流程历史单ID
+     * @return 结果
+     */
+    public int deleteDbTableHisByIds(String[] instanceIds);
+
+    /**
+     * 删除流程历史单信息
+     *
+     * @param instanceId 流程历史单ID
+     * @return 结果
+     */
+    public int deleteDbTableHisById(String instanceId);
+
+    /**
+     * 新增流程历史单
+     *
+     * @param processInstanceId 流程id
+     * @param tableId           表id
+     * @param tableName         表名称
+     * @return 结果
+     */
+    public int insertDbTableHis(String processInstanceId, Long tableId, String tableName);
+}

+ 35 - 0
src/main/java/com/activiti6/service/activiti/LeaveNewService.java

@@ -0,0 +1,35 @@
+package com.activiti6.service.activiti;
+
+import com.activiti6.domain.*;
+
+import java.util.List;
+
+public interface LeaveNewService {
+    int add(MyFormDataActiviti myFormDataActiviti, Long userId);
+
+    List<MyFormDataActiviti> select(Long userId);
+
+    MyFormDataActiviti get(Long id);
+
+    int update(MyFormDataActiviti myFormData, Long userId);
+
+    int remove(List<Long> ids);
+
+    Object getFormData(String processKey, Long userId);
+
+    void submitApply(Long id, Long userId);
+
+    TableDataInfo findTodoTasks(MyTaskVo myTaskVoForm,String userId) throws InterruptedException;
+
+    MyFormData taskFormData(MyTaskVo myTaskVo);
+
+    void taskCommit(TaskCommitForm taskCommitForm,SysUser user);
+
+    List<FormsVo> showForms(String instanceId);
+
+    List<MyFormDataActiviti> taskDoneList(MyFormDataActiviti myFormDataActiviti,String user);
+
+    List<MyTaskVo> taskList(String id);
+
+    String taskUserMsg(String userId);
+}

+ 18 - 0
src/main/java/com/activiti6/service/activiti/MyFormDataService.java

@@ -0,0 +1,18 @@
+package com.activiti6.service.activiti;
+
+
+import com.activiti6.domain.MyFormData;
+
+import java.util.List;
+
+public interface MyFormDataService {
+    void add(MyFormData myFormData,Long userId);
+
+    List<MyFormData> list(MyFormData myFormData);
+
+    void update(MyFormData myFormData);
+
+    MyFormData get(Long id);
+
+    void delete(List<Long> ids);
+}

+ 34 - 0
src/main/java/com/activiti6/service/activiti/ProcessInstanceService.java

@@ -0,0 +1,34 @@
+package com.activiti6.service.activiti;
+
+
+import com.activiti6.domain.ProcessInstanceCheckFrom;
+import com.activiti6.domain.ProcessInstanceCommitFrom;
+import com.activiti6.domain.TableDataInfo;
+import com.activiti6.domain.TreeVo;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ProcessInstanceService {
+    TableDataInfo list();
+
+    void suspendProcess(String processInstanceId, Integer status);
+
+    void deleteProcess(String processInstanceId);
+
+    void transToOffice(String taskId, String userId);
+
+    void entrust(String taskId, String userId);
+
+    List<TreeVo> listTask(String processInstanceId);
+
+    List<TreeVo> listUser();
+
+    void deleteProcess(List<String> list);
+
+    String commit(ProcessInstanceCommitFrom processInstanceCommitFrom);
+
+    Map<String,String> check(ProcessInstanceCheckFrom processInstanceCommitFrom);
+
+    String recommit(ProcessInstanceCommitFrom processInstanceCommitFrom);
+}

+ 101 - 0
src/main/java/com/activiti6/service/activiti/impl/DbTableHisServiceImpl.java

@@ -0,0 +1,101 @@
+package com.activiti6.service.activiti.impl;
+
+import com.activiti6.common.utils.DateUtils;
+import com.activiti6.domain.DbTableHis;
+import com.activiti6.mapper.DbTableHisMapper;
+import com.activiti6.service.activiti.IDbTableHisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 流程历史单Service业务层处理
+ *
+ * @author xtd
+ * @date 2020-04-14
+ */
+@Service
+public class DbTableHisServiceImpl implements IDbTableHisService {
+    @Autowired
+    private DbTableHisMapper dbTableHisMapper;
+
+    /**
+     * 查询流程历史单
+     *
+     * @param instanceId 流程历史单ID
+     * @return 流程历史单
+     */
+    @Override
+    public DbTableHis selectDbTableHisById(String instanceId) {
+        return dbTableHisMapper.selectDbTableHisById(instanceId);
+    }
+
+    /**
+     * 查询流程历史单列表
+     *
+     * @param dbTableHis 流程历史单
+     * @return 流程历史单
+     */
+    @Override
+    public List<DbTableHis> selectDbTableHisList(DbTableHis dbTableHis) {
+        return dbTableHisMapper.selectDbTableHisList(dbTableHis);
+    }
+
+    /**
+     * 新增流程历史单
+     *
+     * @param dbTableHis 流程历史单
+     * @return 结果
+     */
+    @Override
+    public int insertDbTableHis(DbTableHis dbTableHis) {
+        dbTableHis.setCreateTime(DateUtils.getNowDate());
+        return dbTableHisMapper.insertDbTableHis(dbTableHis);
+    }
+
+    /**
+     * 修改流程历史单
+     *
+     * @param dbTableHis 流程历史单
+     * @return 结果
+     */
+    @Override
+    public int updateDbTableHis(DbTableHis dbTableHis) {
+        dbTableHis.setUpdateTime(DateUtils.getNowDate());
+        return dbTableHisMapper.updateDbTableHis(dbTableHis);
+    }
+
+    /**
+     * 批量删除流程历史单
+     *
+     * @param instanceIds 需要删除的流程历史单ID
+     * @return 结果
+     */
+    @Override
+    public int deleteDbTableHisByIds(String[] instanceIds) {
+        return dbTableHisMapper.deleteDbTableHisByIds(instanceIds);
+    }
+
+    /**
+     * 删除流程历史单信息
+     *
+     * @param instanceId 流程历史单ID
+     * @return 结果
+     */
+    @Override
+    public int deleteDbTableHisById(String instanceId) {
+        return dbTableHisMapper.deleteDbTableHisById(instanceId);
+    }
+
+    @Override
+    public int insertDbTableHis(String processInstanceId, Long tableId, String tableName) {
+        DbTableHis dbTableHis = new DbTableHis();
+        dbTableHis.setInstanceId(processInstanceId);
+        dbTableHis.setTableId(tableId);
+        dbTableHis.setTableName(tableName);
+        dbTableHis.setCreateTime(new Date());
+        return dbTableHisMapper.insertDbTableHis(dbTableHis);
+    }
+}

+ 53 - 0
src/main/java/com/activiti6/service/activiti/impl/FormDataServiceImp.java

@@ -0,0 +1,53 @@
+package com.activiti6.service.activiti.impl;
+
+
+
+import com.activiti6.domain.MyFormData;
+import com.activiti6.domain.MyFormDataExample;
+import com.activiti6.mapper.activiti.NewMyFormDataMapper;
+import com.activiti6.service.activiti.MyFormDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+@Service
+public class FormDataServiceImp implements MyFormDataService {
+
+    @Autowired
+    private NewMyFormDataMapper newMyFormDataMapper;
+
+    @Override
+    public void add(MyFormData myFormData,Long userId) {
+        myFormData.setCreateBy(userId.toString());
+        myFormData.setCreateTime(new Date());
+        newMyFormDataMapper.insertSelective(myFormData);
+    }
+
+    @Override
+    public List<MyFormData> list(MyFormData myFormData) {
+        MyFormDataExample example = new MyFormDataExample();
+        MyFormDataExample.Criteria criteria = example.createCriteria();
+        List<MyFormData> list = newMyFormDataMapper.selectByExample(example);
+        return list;
+    }
+
+    @Override
+    public void update(MyFormData myFormData) {
+        newMyFormDataMapper.updateByPrimaryKeySelective(myFormData);
+    }
+
+    @Override
+    public MyFormData get(Long id) {
+        return newMyFormDataMapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public void delete(List<Long> ids) {
+        MyFormDataExample myFormDataExample=new MyFormDataExample();
+        MyFormDataExample.Criteria criteria = myFormDataExample.createCriteria();
+        criteria.andFIdIn(ids);
+        newMyFormDataMapper.deleteByExample(myFormDataExample);
+    }
+}

+ 442 - 0
src/main/java/com/activiti6/service/activiti/impl/LeaveNewServiceImpl.java

@@ -0,0 +1,442 @@
+package com.activiti6.service.activiti.impl;
+
+
+import com.activiti6.common.exception.CustomException;
+import com.activiti6.common.utils.DateUtils;
+import com.activiti6.common.utils.StringUtils;
+import com.activiti6.common.utils.TableSupport;
+import com.activiti6.domain.*;
+import com.activiti6.mapper.MyFormDataActivitiMapper;
+import com.activiti6.mapper.activiti.NewMyFormDataMapper;
+import com.activiti6.service.activiti.LeaveNewService;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import org.activiti.engine.*;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.activiti.engine.repository.ProcessDefinitionQuery;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.DelegationState;
+import org.activiti.engine.task.Task;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class LeaveNewServiceImpl implements LeaveNewService {
+    protected final Logger logger = LoggerFactory.getLogger(LeaveNewServiceImpl.class);
+
+    @Autowired
+    private NewMyFormDataMapper newMyFormDataMapper;
+    @Autowired
+    private MyFormDataActivitiMapper myFormDataActivitiMapper;
+    @Autowired
+    private RepositoryService repositoryService;
+    @Autowired
+    private FormService formService;
+
+    @Override
+    @Transactional
+    public Object getFormData(String processKey,Long userId) {
+        ProcessDefinitionQuery pdq = repositoryService.createProcessDefinitionQuery();
+
+//        ProcessDefinition processDefinition = pdq.processDefinitionKey(processKey).processDefinitionVersion(version).singleResult();
+        ProcessDefinition processDefinition = pdq.processDefinitionId(processKey).singleResult();
+        String id = processDefinition.getId();
+        String startFormKey = formService.getStartFormKey(id);
+        MyFormData myFormData = null;
+        if (!StringUtils.isNull(startFormKey)) {
+            myFormData = getMyFormDataBean(processKey, startFormKey);
+            return myFormData;
+        } else {
+            //流程发起人
+            identityService.setAuthenticatedUserId(userId.toString());
+            // 启动流程时设置业务 key
+            Map<String, Object> map = new HashMap<>();
+            String appUserId = userId.toString();
+            map.put("appUserId", appUserId);
+            ProcessInstance processInstance = runtimeService
+                    .startProcessInstanceById(processKey, map);
+            String processInstanceId = processInstance.getId();
+            Task task = taskService.createTaskQuery().taskAssignee(appUserId).processInstanceId(processInstanceId).singleResult();
+            String formKey = task.getFormKey();
+            //获取选人表单数据
+            myFormData = getMyFormDataBean(processKey, formKey);
+            //填充表单渲染数据
+            MyFormDataActiviti myFormDataActiviti = new MyFormDataActiviti();
+            myFormDataActiviti.setInstanceId(processInstanceId);
+            myFormDataActiviti.setTaskId(task.getId());
+            BeanUtils.copyProperties(myFormData, myFormDataActiviti);
+            return myFormDataActiviti;
+        }
+
+    }
+
+    private MyFormData getMyFormDataBean(String processKey, String startFormKey) {
+
+        MyFormDataExample example = new MyFormDataExample();
+        MyFormDataExample.Criteria criteria = example.createCriteria();
+        criteria.andFKeyEqualTo(startFormKey);
+        String[] split = processKey.split(":");
+        processKey = split[0];
+        Integer version = Integer.valueOf(split[1]);
+        criteria.andModelKeyEqualTo(processKey);
+        criteria.andModelVersionEqualTo(version);
+        List<MyFormData> myFormDataList = newMyFormDataMapper.selectByExample(example);
+        if (myFormDataList.size() == 0) {
+            throw new CustomException("没找到对应的外置表单!");
+        }
+        myFormDataList = myFormDataList.stream().sorted(Comparator.comparing(MyFormData::getfVersion, Comparator.reverseOrder())).collect(Collectors.toList());
+        MyFormData myFormData = myFormDataList.get(0);
+        return myFormData;
+    }
+
+    @Override
+    @Transactional
+    public int add(MyFormDataActiviti myFormDataActiviti,Long userId) {
+        //获取登录信息
+        myFormDataActiviti.setCreateUser(userId.toString());
+        myFormDataActiviti.setCreateTime(new Date());
+        int i = myFormDataActivitiMapper.insertSelective(myFormDataActiviti);
+        //如果没有任务id就是普通新增
+        String taskId = myFormDataActiviti.getTaskId();
+        if (!StringUtils.isNull(taskId)) {
+            String jsonData = myFormDataActiviti.getJsonData();
+            JSONObject jsonObject = JSON.parseObject(jsonData);
+            JSONObject formData = jsonObject.getJSONObject("formData");
+            Map<String, Object> map = JSONObject.toJavaObject(formData, Map.class);
+            map.put("myFormDataActiviti", myFormDataActiviti);
+            //设置签收
+            taskService.claim(taskId, userId.toString());
+            //完成task
+            taskService.complete(taskId, map);
+        }
+        return i;
+    }
+
+    @Override
+    public List<MyFormDataActiviti> select(Long userId) {
+        MyFormDataActivitiExample example = new MyFormDataActivitiExample();
+        MyFormDataActivitiExample.Criteria criteria = example.createCriteria();
+        String appUser = userId.toString();
+        criteria.andCreateByEqualTo(appUser);
+        criteria.andApplyUserEqualTo(appUser);
+        example.setOrderByClause("create_time desc");
+        List<MyFormDataActiviti> myFormDataActivitis = myFormDataActivitiMapper.selectByExample(example);
+        return myFormDataActivitis;
+    }
+
+    @Override
+    public MyFormDataActiviti get(Long id) {
+        MyFormDataActiviti myFormDataActiviti = myFormDataActivitiMapper.selectByPrimaryKey(id);
+        return myFormDataActiviti;
+    }
+
+    @Override
+    public int update(MyFormDataActiviti myFormData,Long userId) {
+        myFormData.setUpdateBy(userId.toString());
+        myFormData.setUpdateTime(new Date());
+        return myFormDataActivitiMapper.updateByPrimaryKeySelective(myFormData);
+    }
+
+    @Override
+    public int remove(List<Long> ids) {
+        MyFormDataActivitiExample example = new MyFormDataActivitiExample();
+        MyFormDataActivitiExample.Criteria criteria = example.createCriteria();
+        criteria.andFIdIn(ids);
+        int i = myFormDataActivitiMapper.deleteByExample(example);
+        return i;
+    }
+
+
+    @Autowired
+    private IdentityService identityService;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    /**
+     * 启功流程
+     *
+     * @param id
+     */
+    @Override
+    public void submitApply(Long id,Long userId) {
+        MyFormDataActiviti myFormDataActiviti = myFormDataActivitiMapper.selectByPrimaryKey(id);
+        // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
+        String applyUser = myFormDataActiviti.getApplyUser();
+        identityService.setAuthenticatedUserId(applyUser);
+        String modelKey = myFormDataActiviti.getModelKey();
+        Long aLong = myFormDataActiviti.getfId();
+        //启动流程
+        ProcessInstance processInstance = runtimeService // 启动流程时设置业务 key
+                .startProcessInstanceByKey(modelKey, aLong.toString());
+        String processInstanceId = processInstance.getId();
+        myFormDataActiviti.setInstanceId(processInstanceId);
+        //更新标记
+        myFormDataActiviti.setUpdateBy(userId.toString());
+        myFormDataActiviti.setUpdateTime(new Date());
+        myFormDataActivitiMapper.updateByPrimaryKey(myFormDataActiviti);
+    }
+
+    @Autowired
+    private TaskService taskService;
+
+    @Override
+
+    public String taskUserMsg(String userId) {
+        List<Task> list = new ArrayList<>();
+        List<Task> list1 = taskService.createTaskQuery().taskAssignee(userId).list();
+        list.addAll(list1);
+        List<Task> list2 = taskService.createTaskQuery().taskCandidateUser(userId).list();
+        list.addAll(list2);
+        //去重
+        list = list.stream().distinct().collect(Collectors.toList());
+        String msg = null;
+        //分组
+        if (list.size() > 0) {
+            msg = "你有" + list.size() + "条工单未审核!";
+        }
+        return msg;
+    }
+
+    @Override
+    public TableDataInfo findTodoTasks(MyTaskVo myTaskVoForm,String userId) throws InterruptedException {
+        //Thread.sleep(100 * 3);
+        TableDataInfo tableDataInfo = new TableDataInfo();
+        //用户id
+
+        List<Task> list = new ArrayList<>();
+        //分页处理
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+        pageNum = (pageNum - 1) * pageSize;
+        String processDefinitionName1 = myTaskVoForm.getProcessDefinitionName();
+        if (!org.springframework.util.StringUtils.isEmpty(processDefinitionName1)) {
+            String pdName = "%" + processDefinitionName1 + "%";
+            List<Task> list1 = taskService.createTaskQuery().taskAssignee(userId).processDefinitionNameLike(pdName).list();
+            list.addAll(list1);
+            List<Task> list2 = taskService.createTaskQuery().taskCandidateUser(userId).processDefinitionNameLike(pdName).list();
+            list.addAll(list2);
+        } else {
+            List<Task> list1 = taskService.createTaskQuery().taskAssignee(userId).list();
+            list.addAll(list1);
+            List<Task> list2 = taskService.createTaskQuery().taskCandidateUser(userId).list();
+            list.addAll(list2);
+        }
+        int size = list.size();
+        //去重
+        if (list.size() > 1) {
+            Set<Task> set = new HashSet();
+            List<Task> listnew = new ArrayList<>();
+            set.addAll(list);
+            listnew.addAll(set);
+            list = listnew;
+        }
+        List<MyTaskVo> myTaskVoList = new ArrayList<>();
+        for (Task task : list) {
+
+            //流程被暂停跳过
+            boolean suspended = task.isSuspended();
+            String formKey = task.getFormKey();
+            if (suspended) {
+                continue;
+            }
+            if (StringUtils.isNull(formKey)) {
+                continue;
+            }
+            MyTaskVo myTaskVo = new MyTaskVo();
+            String id = task.getId();
+            String name = task.getName();
+            String processInstanceId = task.getProcessInstanceId();
+            String processDefinitionId = task.getProcessDefinitionId();
+            ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(processDefinitionId).singleResult();
+            ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
+            String[] split = processDefinitionId.split(":");
+            String processDefinitionName = processDefinition.getName();
+            String businessKey = split[0];
+            Integer version = Integer.valueOf(split[1]);
+            myTaskVo.setTaskId(id);
+            myTaskVo.setProcessDefinitionName(processDefinitionName);
+            Object workNum = taskService.getVariable(id, "workNum");
+            if (StringUtils.isNotNull(workNum)) {
+                myTaskVo.setWorkNum(workNum.toString());
+            }
+            Object title = taskService.getVariable(id, "title");
+            if (StringUtils.isNotNull(title)) {
+                myTaskVo.setTitle(title.toString());
+            }
+            Object creatUserName = taskService.getVariable(id, "creatUserName");
+            if (StringUtils.isNotNull(creatUserName)) {
+                myTaskVo.setCreatUserName(creatUserName.toString());
+            }
+            Object creatDeptName = taskService.getVariable(id, "creatDeptName");
+            if (StringUtils.isNotNull(creatDeptName)) {
+                myTaskVo.setCreatDeptName(creatDeptName.toString());
+            }
+            Object creatTime = taskService.getVariable(id, "creatTime");
+            if (StringUtils.isNotNull(creatTime)) {
+                Date creatTimeRe = DateUtils.parseDate(creatTime);
+                myTaskVo.setCreatFormTime(creatTimeRe);
+            }
+            myTaskVo.setTaskName(name);
+            myTaskVo.setFormKey(formKey);
+            myTaskVo.setInstanceId(processInstanceId);
+            myTaskVo.setModelKey(businessKey);
+            myTaskVo.setModelVersion(version);
+            myTaskVoList.add(myTaskVo);
+        }
+        //以属性一降序
+        List<MyTaskVo> collect = myTaskVoList.stream().sorted(
+                Comparator.comparing(MyTaskVo::getCreatFormTime, Comparator.reverseOrder())
+        ).collect(Collectors.toList());
+        //数据
+        tableDataInfo.setRows(collect);
+        //条数
+        tableDataInfo.setTotal(size);
+        tableDataInfo.setCode(200);
+        tableDataInfo.setMsg("success");
+        return tableDataInfo;
+    }
+
+    @Override
+    public MyFormData taskFormData(MyTaskVo myTaskVo) {
+        MyFormDataExample example = new MyFormDataExample();
+        MyFormDataExample.Criteria criteria = example.createCriteria();
+        String modelKey = myTaskVo.getModelKey();
+        String formKey = myTaskVo.getFormKey();
+        Integer modelVersion = myTaskVo.getModelVersion();
+        criteria.andFKeyEqualTo(formKey);
+        criteria.andModelKeyEqualTo(modelKey);
+//        criteria.andModelVersionEqualTo(modelVersion);
+        List<MyFormData> myFormDataList = newMyFormDataMapper.selectByExample(example);
+        if (myFormDataList.size() == 0) {
+            throw new CustomException("没找到对应的外置表单!");
+        }
+        myFormDataList = myFormDataList.stream().sorted(Comparator.comparing(MyFormData::getfVersion, Comparator.reverseOrder())).collect(Collectors.toList());
+        MyFormData myFormData = myFormDataList.get(0);
+        return myFormData;
+    }
+
+    @Override
+    @Transactional
+    public void taskCommit(TaskCommitForm taskCommitForm,SysUser user) {
+        //新增提交历史数据道数据库
+        Long userId = user.getUserId();
+        String userIdStr = userId.toString();
+        //acitviti提交
+        MyFormDataActiviti myFormDataActiviti = commit(taskCommitForm, userIdStr);
+        //本地表单提交
+        insertMyFormDataActiviti(user, userIdStr, myFormDataActiviti);
+    }
+
+    private void insertMyFormDataActiviti(SysUser user, String userIdStr, MyFormDataActiviti myFormDataActiviti) {
+        String deptName = user.getDept().getDeptName();
+        //提交人
+        myFormDataActiviti.setCreateUser(user.getUserName());
+        //提交部门
+        myFormDataActiviti.setCreateDept(deptName);
+        myFormDataActiviti.setCreateBy(userIdStr);
+        myFormDataActiviti.setCreateTime(new Date());
+        myFormDataActivitiMapper.insertSelective(myFormDataActiviti);
+    }
+
+    private MyFormDataActiviti commit(TaskCommitForm taskCommitForm, String userIdStr) {
+        MyFormDataActiviti myFormDataActiviti = taskCommitForm.getMyFormDataActiviti();
+        String taskId = taskCommitForm.getTaskId();
+        String jsonData = myFormDataActiviti.getJsonData();
+        JSONObject jsonObject = JSON.parseObject(jsonData);
+        JSONObject formData = jsonObject.getJSONObject("formData");
+        if (formData.size() == 0) {
+            throw new CustomException("请提交审核数据!");
+        }
+        Map map = JSONObject.toJavaObject(formData, Map.class);
+        //完成task
+        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
+        String processDefinitionId = task.getProcessDefinitionId();
+        String[] split = processDefinitionId.split(":");
+        String businessKey = split[0];
+        Integer version = Integer.valueOf(split[1]);
+        myFormDataActiviti.setModelVersion(version);
+        DelegationState delegationState = task.getDelegationState();
+        if (!StringUtils.isNull(delegationState)) {
+            if (delegationState.toString().equals("RESOLVED")) {
+                taskService.complete(taskId, map);
+            } else if (delegationState.toString().equals("PENDING")) {
+                //如果是委托任务需要做处理
+                taskService.resolveTask(taskId, map);
+                taskService.complete(taskId, map);
+            } else {
+                System.out.println("此任务不是委托任务");
+            }
+        } else {
+            //非委托任务需要签收
+            taskService.claim(taskId, userIdStr);
+            taskService.complete(taskId, map);
+        }
+        return myFormDataActiviti;
+    }
+
+    @Override
+    public List<FormsVo> showForms(String instanceId) {
+        MyFormDataActivitiExample example = new MyFormDataActivitiExample();
+        MyFormDataActivitiExample.Criteria criteria = example.createCriteria();
+        criteria.andInstanceIdEqualTo(instanceId);
+        List<MyFormDataActiviti> list = myFormDataActivitiMapper.selectByExample(example);
+        List<FormsVo> collect = list.stream().map(x -> {
+            FormsVo formsVo = new FormsVo();
+            String s = x.getfName();
+            Date createTime = x.getCreateTime();
+            //设置任务名称
+            formsVo.setTaskName(s);
+            String jsonData = x.getJsonData();
+//            JSONObject jsonObject = JSON.parseObject(jsonData);
+//            Map map = jsonObject.toJavaObject(Map.class);
+            formsVo.setCreateUser(x.getCreateUser());
+            formsVo.setCreateDept(x.getCreateDept());
+            //数据回显
+            formsVo.setFormObj(jsonData);
+            formsVo.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, createTime));
+            return formsVo;
+        }).collect(Collectors.toList());
+        return collect;
+    }
+
+    @Override
+    public List<MyFormDataActiviti> taskDoneList(MyFormDataActiviti myFormDataActiviti,String userIdStr) {
+        myFormDataActiviti.setCreateBy(userIdStr);
+        List<MyFormDataActiviti> list = myFormDataActivitiMapper.taskDoneList(myFormDataActiviti);
+        return list;
+    }
+
+    @Override
+    public List<MyTaskVo> taskList(String proId) {
+        List<Task> list = taskService.createTaskQuery().processDefinitionId(proId).list();
+        List<MyTaskVo> myTaskVoList = new ArrayList<>();
+        for (Task task : list) {
+            MyTaskVo myTaskVo = new MyTaskVo();
+            String id = task.getId();
+            String formKey = task.getFormKey();
+            String name = task.getName();
+            String processInstanceId = task.getProcessInstanceId();
+            String processDefinitionId = task.getProcessDefinitionId();
+            String[] split = processDefinitionId.split(":");
+            String businessKey = split[0];
+            Integer version = Integer.valueOf(split[1]);
+            myTaskVo.setTaskId(id);
+            myTaskVo.setTaskName(name);
+            myTaskVo.setFormKey(formKey);
+            myTaskVo.setInstanceId(processInstanceId);
+            myTaskVo.setModelKey(businessKey);
+            myTaskVo.setModelVersion(version);
+            myTaskVoList.add(myTaskVo);
+        }
+        return myTaskVoList;
+    }
+}

+ 287 - 0
src/main/java/com/activiti6/service/activiti/impl/ProcessDefinitionServiceImpl.java

@@ -0,0 +1,287 @@
+package com.activiti6.service.activiti.impl;
+
+
+import com.activiti6.common.exception.CustomException;
+import com.activiti6.common.utils.StringUtils;
+import com.activiti6.domain.HttpStatus;
+import com.activiti6.domain.MyProcessDefinition;
+import com.activiti6.domain.TableDataInfo;
+import com.activiti6.mapper.MyFormDataActivitiMapper;
+import org.activiti.bpmn.model.BpmnModel;
+import org.activiti.engine.*;
+import org.activiti.engine.form.FormProperty;
+import org.activiti.engine.form.TaskFormData;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.identity.Group;
+import org.activiti.engine.identity.User;
+import org.activiti.engine.repository.DeploymentBuilder;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.activiti.engine.repository.ProcessDefinitionQuery;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Scanner;
+import java.util.stream.Collectors;
+import java.util.zip.ZipInputStream;
+
+@Service
+public class ProcessDefinitionServiceImpl {
+    private static final Logger LOGGER = LoggerFactory.getLogger(ProcessDefinitionServiceImpl.class);
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private TaskService taskService;
+
+    @Autowired
+    private FormService formService;
+
+    @Autowired
+    private RepositoryService repositoryService;
+
+    @Autowired
+    private IdentityService identityService;
+
+    @Autowired
+    HistoryService historyService;
+
+    @Transactional
+    public void startProcess(String assignee) {
+        runtimeService.startProcessInstanceByKey("oneTaskProcess");
+    }
+
+    public List<Task> getTasks(String assignee) {
+        return taskService.createTaskQuery().taskAssignee(assignee).list();
+    }
+
+    /**
+     * 分页查询流程定义文件
+     *
+     * @return
+     */
+    public List<ProcessDefinition> listProcessDefinition() {
+
+        ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery();
+        List<ProcessDefinition> processDefinitions = processDefinitionQuery.listPage(0, 100);
+        return processDefinitions;
+    }
+
+    @Transactional
+    public void deployProcessDefinition(String filePath) throws FileNotFoundException {
+        if (StringUtils.isNotBlank(filePath)) {
+            if (filePath.endsWith(".zip")) {
+                ZipInputStream inputStream = new ZipInputStream(new FileInputStream(filePath));
+                repositoryService.createDeployment()
+                        .addZipInputStream(inputStream)
+                        .deploy();
+            } else if (filePath.endsWith(".bpmn") || filePath.endsWith(".bpmn20.xml")) {
+                repositoryService.createDeployment()
+                        .addInputStream(filePath, new FileInputStream(filePath))
+                        .deploy();
+            }
+        }
+    }
+
+    /**
+     * 部署流程文件
+     *
+     * @param file
+     * @throws IOException
+     */
+    @Transactional
+    public void deployProcessDefinition(MultipartFile file) throws IOException {
+        InputStream inputStream = file.getInputStream();
+        String originalFilename = file.getOriginalFilename();
+        DeploymentBuilder deployment = repositoryService.createDeployment();
+        deployment.addInputStream(originalFilename, inputStream).deploy();
+    }
+
+    @Autowired
+    private MyFormDataActivitiMapper myFormDataActivitiMapper;
+
+    @Transactional
+    public int deleteProcessDeploymentByIds(List<String> deploymentIds) {
+        int counter = 0;
+        for (String deploymentId : deploymentIds) {
+            List<ProcessInstance> instanceList = runtimeService.createProcessInstanceQuery()
+                    .deploymentId(deploymentId)
+                    .list();
+            if (!CollectionUtils.isEmpty(instanceList)) {
+                // 跳过存在流程实例的流程定义
+                throw new CustomException("该流程已被使用无法删除!");
+            }
+            List<HistoricProcessInstance> list = historyService.createHistoricProcessInstanceQuery().deploymentId(deploymentId).list();
+            if (!CollectionUtils.isEmpty(list)) {
+                // 跳过存在流程实例的流程定义
+                throw new CustomException("该流程存在历史数据无法删除!");
+            }
+            // true 表示级联删除引用,比如 act_ru_execution 数据
+            repositoryService.deleteDeployment(deploymentId, true);
+            counter++;
+        }
+        return counter;
+    }
+    public TableDataInfo list(String title, Integer pageNum, Integer pageSize) {
+        try{
+            Thread.sleep(100*3);
+        }catch (Exception e){
+         throw new RuntimeException("延时异常!");
+        }
+        int size = 0;
+        List<ProcessDefinition> list = null;
+        if (StringUtils.isNotEmpty(title)) {
+            title = "%" + title + "%";
+            size = repositoryService
+                    .createProcessDefinitionQuery()
+                    .processDefinitionNameLike(title).list().size();
+            list = repositoryService
+                    .createProcessDefinitionQuery()
+                    .processDefinitionNameLike(title)
+                    .orderByProcessDefinitionName().asc()
+                    .orderByProcessDefinitionVersion().desc()
+                    .listPage((pageNum - 1) * pageSize, pageSize);
+        } else {
+            size = repositoryService
+                    .createProcessDefinitionQuery().list().size();
+            list = repositoryService
+                    .createProcessDefinitionQuery()
+                    .orderByProcessDefinitionName().asc()
+                    .orderByProcessDefinitionVersion().desc()
+                    .listPage((pageNum - 1) * pageSize, pageSize);
+        }
+        List<MyProcessDefinition> collect = list.stream().map(x -> {
+            MyProcessDefinition myProcessDefinition = new MyProcessDefinition();
+            myProcessDefinition.setId(x.getId());
+            myProcessDefinition.setDeploymentId(x.getDeploymentId());
+            myProcessDefinition.setKey(x.getKey());
+            myProcessDefinition.setName(x.getName());
+            myProcessDefinition.setVersion(x.getVersion());
+            myProcessDefinition.setDescription(x.getDescription());
+            return myProcessDefinition;
+        }).collect(Collectors.toList());
+        TableDataInfo rspData = new TableDataInfo();
+        rspData.setCode(HttpStatus.SUCCESS);
+        rspData.setRows(collect);
+        rspData.setTotal(size);
+        return rspData;
+    }
+
+    public void start() {
+        startModel();
+
+        // testUserAndGroup();
+    }
+
+    private void testUserAndGroup() {
+        User user1 = identityService.newUser("user1");   //初始化用户user1
+        user1.setEmail("user1@111.com");
+        User user2 = identityService.newUser("user2");
+        user2.setEmail("user2@111.com");
+        identityService.saveUser(user1);    //将用户保存
+        identityService.saveUser(user2);
+
+        Group group1 = identityService.newGroup("group1");   //初始化用户组group1
+        identityService.saveGroup(group1);
+        Group group2 = identityService.newGroup("group2");
+        identityService.saveGroup(group2);
+
+        identityService.createMembership("user1", "group1");    //构建用户与用户组的关系
+        identityService.createMembership("user2", "group1");
+        identityService.createMembership("user1", "group2");
+
+        User user1_2 = identityService.createUserQuery().userId("user1").singleResult();   //将用户名修改,版本号改为2
+        user1_2.setLastName("user1_2");
+        identityService.saveUser(user1_2);
+
+        List<User> userList = identityService.createUserQuery().memberOfGroup("group1").listPage(0, 100);//查询用户列表
+//        for (User user : userList) {    //查询group1组中的所有用户
+//            LOGGER.info("group1的user : [{}]", ToStringBuilder.reflectionToString(user, ToStringStyle.JSON_STYLE));   //按照json格式输出
+//        }
+//
+//        List<Group> groupList = identityService.createGroupQuery().groupMember("user1").listPage(0, 100);
+//        for (Group group : groupList) {    //查询user1用户所属的组
+//            LOGGER.info("user1的group : [{}]", ToStringBuilder.reflectionToString(group, ToStringStyle.JSON_STYLE));
+//        }
+    }
+
+    private void startModel() {
+        //获取流程定义对象
+        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
+        //启动运行流程
+        ProcessInstance taskService = getTaskService(processDefinition);
+        //处理流程
+        runProcess(taskService);
+    }
+
+    private ProcessInstance getTaskService(ProcessDefinition processDefinition) {
+        ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinition.getId());
+        LOGGER.info("流程启动 {}", processInstance);
+        return processInstance;
+    }
+
+
+    private void runProcess(ProcessInstance processInstance) {
+        //部署结束继续输入
+        while (processInstance != null && !processInstance.isEnded()) {
+            Scanner scanner = new Scanner(System.in);
+            List<Task> list = taskService.createTaskQuery().list();
+            for (Task task : list) {
+                LOGGER.info("待处理任务[{}]", task.getName());
+                //获取表单数据
+                TaskFormData taskFormData = formService.getTaskFormData(task.getId());
+                List<FormProperty> formProperties = taskFormData.getFormProperties();
+                Map<String, Object> inparms = new HashMap<String, Object>();
+                String s = null;
+                for (FormProperty formProperty : formProperties) {
+                    String name = formProperty.getName();
+                    LOGGER.info("请输入[{}]", name);
+                    s = scanner.nextLine();
+                    inparms.put(formProperty.getId(), s);
+                    LOGGER.info("你输入的是[{}]", s);
+                }
+                //将参数提交到userTask的表单中
+                taskService.complete(task.getId(), inparms);
+                //同步流程状态
+                processInstance = runtimeService
+                        .createProcessInstanceQuery()
+                        .processInstanceId(processInstance.getId())
+                        .singleResult();
+            }
+            LOGGER.info("待处理任务数[{}]", list.size());
+
+        }
+
+    }
+
+    public BpmnModel get(String id) {
+        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionKey(id).singleResult();
+        BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinition.getId());
+        return bpmnModel;
+    }
+
+    public MyProcessDefinition processDefinitionKey(String processDefinitionKey) {
+        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionKey(processDefinitionKey).latestVersion().singleResult();
+        if (StringUtils.isNull(processDefinition)) {
+            throw new CustomException("流程文件不存在请先上传流程");
+        }
+        MyProcessDefinition myProcessDefinition = new MyProcessDefinition();
+        BeanUtils.copyProperties(processDefinition, myProcessDefinition);
+        return myProcessDefinition;
+    }
+}

+ 223 - 0
src/main/java/com/activiti6/service/activiti/impl/ProcessInstanceServiceImpl.java

@@ -0,0 +1,223 @@
+package com.activiti6.service.activiti.impl;
+
+
+import com.activiti6.common.utils.TableSupport;
+import com.activiti6.domain.*;
+
+import com.activiti6.mapper.DbTableHisMapper;
+import com.activiti6.mapper.MyFormDataActivitiMapper;
+import com.activiti6.service.activiti.IDbTableHisService;
+import com.activiti6.service.activiti.ProcessInstanceService;
+import org.activiti.engine.IdentityService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.engine.identity.User;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Service
+public class ProcessInstanceServiceImpl implements ProcessInstanceService {
+    @Autowired
+    private RuntimeService runtimeService;
+    @Autowired
+    private TaskService taskService;
+    @Autowired
+    private MyFormDataActivitiMapper myFormDataActivitiMapper;
+
+    @Autowired
+    private IdentityService identityService;
+
+    @Override
+    public TableDataInfo list() {
+        TableDataInfo tableDataInfo = getTableDataInfo();
+        return tableDataInfo;
+    }
+
+    private TableDataInfo getTableDataInfo() {
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+        TableDataInfo tableDataInfo = new TableDataInfo();
+        tableDataInfo.setCode(200);
+        int size = runtimeService.createProcessInstanceQuery().list().size();
+        tableDataInfo.setTotal(size);
+        pageNum = (pageNum - 1) * pageSize;
+        List<ProcessInstance> list = runtimeService.createProcessInstanceQuery().listPage(pageNum, pageSize);
+        List<MyProcessInstance> collect = list.stream().map(x -> {
+            MyProcessInstance myProcessInstance = new MyProcessInstance();
+            List<Task> listTask = taskService.createTaskQuery().processInstanceId(x.getId()).list();
+            String taskName = "";
+            for (Task task : listTask) {
+                taskName += task.getName() + "/";
+
+            }
+            if (!StringUtils.isEmpty(taskName)) {
+                taskName = taskName.substring(0, taskName.length() - 1);
+                myProcessInstance.setNextTask(taskName);
+            }
+            BeanUtils.copyProperties(x, myProcessInstance);
+            return myProcessInstance;
+        }).collect(Collectors.toList());
+        tableDataInfo.setRows(collect);
+        return tableDataInfo;
+    }
+
+    private List<TreeVo> getTreeVos() {
+        List<User> users = identityService.createUserQuery().list();
+        //用户树信息
+        return users.stream().map(x -> {
+            TreeVo childrenTreeVo = new TreeVo();
+            childrenTreeVo.setValue(x.getId());
+            childrenTreeVo.setLabel(x.getFirstName());
+            return childrenTreeVo;
+        }).collect(Collectors.toList());
+    }
+
+
+    @Override
+    public void suspendProcess(String processInstanceId, Integer status) {
+        ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().
+                processInstanceId(processInstanceId).singleResult();
+        if (null == processInstance) {
+            throw new RuntimeException("不存在正在执行的流程实例:[ " + processInstanceId + " ]");
+        }
+        //挂起流程
+        if (1 == status) {
+            runtimeService.suspendProcessInstanceById(processInstanceId);
+        }
+        //激活流程
+        else {
+            runtimeService.activateProcessInstanceById(processInstanceId);
+        }
+
+    }
+
+
+    @Override
+    public void deleteProcess(String processInstanceId) {
+        runtimeService.deleteProcessInstance(processInstanceId, "cascade");
+        MyFormDataActivitiExample example = new MyFormDataActivitiExample();
+        MyFormDataActivitiExample.Criteria criteria = example.createCriteria();
+        criteria.andInstanceIdEqualTo(processInstanceId);
+        myFormDataActivitiMapper.deleteByExample(example);
+    }
+
+    @Autowired
+    private DbTableHisMapper dbTableHisMapper;
+
+    @Override
+    public void deleteProcess(List<String> list) {
+        for (String processInstanceId : list) {
+            runtimeService.deleteProcessInstance(processInstanceId, "cascade");
+            MyFormDataActivitiExample example = new MyFormDataActivitiExample();
+            MyFormDataActivitiExample.Criteria criteria = example.createCriteria();
+            criteria.andInstanceIdEqualTo(processInstanceId);
+            myFormDataActivitiMapper.deleteByExample(example);
+        }
+
+    }
+
+
+    @Override
+    public void transToOffice(String taskId, String userId) {
+        taskService.setAssignee(taskId, userId);
+        taskService.setOwner(taskId, userId);
+    }
+
+    @Override
+    public void entrust(String taskId, String userId) {
+        taskService.delegateTask(taskId, userId);
+    }
+
+    @Override
+    public List<TreeVo> listTask(String processInstanceId) {
+        List<Task> listTask = taskService.createTaskQuery().processInstanceId(processInstanceId).list();
+        List<TreeVo> collect = listTask.stream().map(x -> {
+            TreeVo treeVo = new TreeVo();
+            treeVo.setLabel(x.getName());
+            treeVo.setValue(x.getId());
+            return treeVo;
+        }).collect(Collectors.toList());
+        return collect;
+    }
+
+    @Override
+    public List<TreeVo> listUser() {
+        List<User> users = identityService.createUserQuery().list();
+        //用户树信息
+        return users.stream().map(x -> {
+            TreeVo childrenTreeVo = new TreeVo();
+            childrenTreeVo.setValue(x.getId());
+            childrenTreeVo.setLabel(x.getFirstName());
+            return childrenTreeVo;
+        }).collect(Collectors.toList());
+    }
+
+    @Autowired
+    private IDbTableHisService iDbTableHisService;
+
+    @Override
+    @Transactional
+    public String commit(ProcessInstanceCommitFrom processInstanceCommitFrom) {
+        String processId = processInstanceCommitFrom.getProcessId();
+        Long fromId = processInstanceCommitFrom.getFormId();
+        String fromKey = processInstanceCommitFrom.getFormKey();
+        Map<String, Object> dataMap = processInstanceCommitFrom.getDataMap();
+        String appUserId = processInstanceCommitFrom.getUserId();
+        // 启动流程时设置业务 key
+        dataMap.put("appUserId", appUserId);
+        dataMap.put("formId", fromId);
+        dataMap.put("formKey", fromKey);
+        ProcessInstance processInstance = runtimeService
+                .startProcessInstanceById(processId, dataMap);
+        String processInstanceId = processInstance.getId();
+        Task task = taskService.createTaskQuery().taskAssignee(appUserId).processInstanceId(processInstanceId).singleResult();
+        String taskId = task.getId();
+        //设置签收
+        taskService.claim(taskId, appUserId);
+        //完成task
+        taskService.complete(taskId, dataMap);
+        //插入历史
+        iDbTableHisService.insertDbTableHis(processInstanceId,fromId, fromKey);
+        return processInstanceId;
+    }
+
+    @Override
+    @Transactional
+    public String recommit(ProcessInstanceCommitFrom processInstanceCommitFrom) {
+        String taskId = processInstanceCommitFrom.getTaskId();
+        Map<String, Object> dataMap = processInstanceCommitFrom.getDataMap();
+        String appUserId = processInstanceCommitFrom.getUserId().toString();
+        //设置签收
+        taskService.claim(taskId, appUserId);
+        //完成task
+        taskService.complete(taskId, dataMap);
+        return taskId;
+    }
+
+    @Override
+    public Map<String, String> check(ProcessInstanceCheckFrom processInstanceCommitFrom) {
+        Map<String, String> map = new HashMap<>();
+        List<String> instanceIdS = processInstanceCommitFrom.getInstanceIdS();
+        String appUserId = processInstanceCommitFrom.getSysUser().getUserId().toString();
+        List<Task> list = taskService.createTaskQuery().taskAssignee(appUserId).processInstanceIdIn(instanceIdS).list();
+        for (Task task : list) {
+            String id = task.getId();
+            String processInstanceId = task.getProcessInstanceId();
+            map.put(processInstanceId, task.getId());
+        }
+        return map;
+    }
+
+
+}

+ 62 - 0
src/main/java/com/activiti6/service/impl/ModelServiceImpl.java

@@ -0,0 +1,62 @@
+package com.activiti6.service.impl;
+
+import com.activiti6.controller.ModelerController;
+import com.activiti6.entity.MyFormDataExample;
+import com.activiti6.mapper.MyFormDataMapper;
+import com.activiti6.service.ModelService;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.RepositoryService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.repository.Model;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ModelServiceImpl implements ModelService {
+    private static final Logger logger = LoggerFactory.getLogger(ModelerController.class);
+
+    @Autowired
+    private RepositoryService repositoryService;
+    @Autowired
+    private ObjectMapper objectMapper;
+    @Autowired
+    private HistoryService historyService;
+    @Autowired
+    private RuntimeService runtimeService;
+    @Autowired
+    private MyFormDataMapper myFormDataMapper;
+
+    @Override
+    public void deleteProcessInstance(String modelId) {
+        logger.info("删除流程实例入参modelId:{}", modelId);
+        Model modelData = repositoryService.getModel(modelId);
+        //deleForm(modelData);
+        if (null != modelData) {
+            try {
+                ProcessInstance pi = runtimeService.createProcessInstanceQuery().processDefinitionKey(modelData.getKey()).singleResult();
+                if (null != pi) {
+                    runtimeService.deleteProcessInstance(pi.getId(), "");
+                    historyService.deleteHistoricProcessInstance(pi.getId());
+                }
+                repositoryService.deleteModel(modelId);
+            } catch (Exception e) {
+                logger.error("删除流程实例服务异常:{}", e);
+                throw new RuntimeException(e.getMessage());
+            }
+        }
+    }
+
+    private void deleForm(Model modelData) {
+        String key = modelData.getKey();
+        Integer version = modelData.getVersion();
+        MyFormDataExample myFormDataExample = new MyFormDataExample();
+        MyFormDataExample.Criteria criteria = myFormDataExample.createCriteria();
+        criteria.andModelKeyEqualTo(key);
+        criteria.andModelVersionEqualTo(version);
+        myFormDataMapper.deleteByExample(myFormDataExample);
+    }
+}

+ 47 - 0
src/main/resources/application.yml

@@ -0,0 +1,47 @@
+server:
+  session:
+    timeout: 3600
+  port: 18088
+  servlet:
+    context-path: /modeler
+#环境
+spring:
+
+  #数据源配置
+  datasource:
+    url: jdbc:mysql://49.235.127.212:3306/activiti?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
+    username: root
+    password: 123456
+    type: com.alibaba.druid.pool.DruidDataSource
+    #freemarker模板配置
+    freemarker:
+      suffix: .ftl
+      cache: false
+      charset: UTF-8
+      contentType: text/html
+      requestContextAttribute: ctx
+      templateEncoding: UTF-8
+      templateLoaderPath: classpath:/templates/
+      settings:
+        defaultEncoding: UTF-8
+        url_escaping_charset: UTF-8
+        locale: zh_CN
+    http:
+      multipart:
+        max-file-size: -1
+        max-request-size: -1
+      activiti:
+        check-process-definitions: false
+  activiti:
+    check-process-definitions: false
+    # 检测身份信息表是否存在
+    db-identity-used: false
+    #false:       默认值。activiti在启动时,会对比数据库表中保存的版本,如果没有表或者版本不匹配,将抛出异常。(生产环境用)
+    #true:        activiti会对数据库中所有表进行更新操作。如果表不存在,则自动创建。(开发时常用)
+    #create_drop: 在activiti启动时创建表,在关闭时删除表(必须手动关闭引擎,才能删除表)。(单元测试常用)
+    #drop-create: 在activiti启动时删除原来的旧表,然后在创建新表(不需要手动关闭引擎)
+    #none不作操作
+    database-schema-update: none
+mybatis:
+  mapper-locations: classpath:mapper/**/*.xml
+  type-aliases-package: com.activiti6.**.entity

BIN
src/main/resources/jar/activiti-image-generator-6.0.0.jar


+ 83 - 0
src/main/resources/mapper/DbTableHisMapper.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.activiti6.mapper.DbTableHisMapper">
+
+    <resultMap type="com.activiti6.domain.DbTableHis" id="DbTableHisResult">
+        <result property="instanceId"    column="instance_id"    />
+        <result property="tableId"    column="table_id"    />
+        <result property="tableName"    column="table_name"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectDbTableHisVo">
+        select instance_id, table_id, table_name, create_by, create_time, update_by, update_time from t_table_his
+    </sql>
+
+    <select id="selectDbTableHisList" parameterType="com.activiti6.domain.DbTableHis" resultMap="DbTableHisResult">
+        <include refid="selectDbTableHisVo"/>
+        <where>
+            <if test="instanceId != null  and instanceId != ''"> and instance_id = #{instanceId}</if>
+            <if test="tableId != null  and tableId != ''"> and table_id = #{tableId}</if>
+            <if test="tableName != null  and tableName != ''"> and table_name like concat('%', #{tableName}, '%')</if>
+        </where>
+    </select>
+
+    <select id="selectDbTableHisById" parameterType="String" resultMap="DbTableHisResult">
+        <include refid="selectDbTableHisVo"/>
+        where instance_id = #{instanceId}
+        ORDER BY
+        create_time DESC LIMIT 1
+    </select>
+
+    <insert id="insertDbTableHis" parameterType="com.activiti6.domain.DbTableHis">
+        insert into t_table_his
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="instanceId != null  and instanceId != ''">instance_id,</if>
+            <if test="tableId != null  and tableId != ''">table_id,</if>
+            <if test="tableName != null  and tableName != ''">table_name,</if>
+            <if test="createBy != null  and createBy != ''">create_by,</if>
+            <if test="createTime != null ">create_time,</if>
+            <if test="updateBy != null  and updateBy != ''">update_by,</if>
+            <if test="updateTime != null ">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="instanceId != null  and instanceId != ''">#{instanceId},</if>
+            <if test="tableId != null  and tableId != ''">#{tableId},</if>
+            <if test="tableName != null  and tableName != ''">#{tableName},</if>
+            <if test="createBy != null  and createBy != ''">#{createBy},</if>
+            <if test="createTime != null ">#{createTime},</if>
+            <if test="updateBy != null  and updateBy != ''">#{updateBy},</if>
+            <if test="updateTime != null ">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDbTableHis" parameterType="com.activiti6.domain.DbTableHis">
+        update t_table_his
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="tableId != null  and tableId != ''">table_id = #{tableId},</if>
+            <if test="tableName != null  and tableName != ''">table_name = #{tableName},</if>
+            <if test="createBy != null  and createBy != ''">create_by = #{createBy},</if>
+            <if test="createTime != null ">create_time = #{createTime},</if>
+            <if test="updateBy != null  and updateBy != ''">update_by = #{updateBy},</if>
+            <if test="updateTime != null ">update_time = #{updateTime},</if>
+        </trim>
+        where instance_id = #{instanceId}
+    </update>
+
+    <delete id="deleteDbTableHisById" parameterType="String">
+        delete from t_table_his where instance_id = #{instanceId}
+    </delete>
+
+    <delete id="deleteDbTableHisByIds" parameterType="String">
+        delete from t_table_his where instance_id in
+        <foreach item="instanceId" collection="array" open="(" separator="," close=")">
+            #{instanceId}
+        </foreach>
+    </delete>
+
+</mapper>

+ 11 - 0
src/main/resources/mapper/MyActivitiMapper.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.activiti6.mapper.MyActivitiMapper">
+
+
+    <delete id="deleteGroupByUserId">
+        delete from ACT_ID_MEMBERSHIP  where USER_ID_ = #{userId}
+    </delete>
+</mapper>

+ 379 - 0
src/main/resources/mapper/MyFormDataMapper.xml

@@ -0,0 +1,379 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.activiti6.mapper.MyFormDataMapper">
+    <resultMap id="BaseResultMap" type="com.activiti6.entity.MyFormData">
+        <id column="f_id" property="fId" jdbcType="BIGINT"/>
+        <result column="model_key" property="modelKey" jdbcType="VARCHAR"/>
+        <result column="model_version" property="modelVersion" jdbcType="INTEGER"/>
+        <result column="modul_id" property="modulId" jdbcType="VARCHAR"/>
+        <result column="f_name" property="fName" jdbcType="VARCHAR"/>
+        <result column="f_key" property="fKey" jdbcType="VARCHAR"/>
+        <result column="f_version" property="fVersion" jdbcType="BIGINT"/>
+        <result column="json_data" property="jsonData" jdbcType="VARCHAR"/>
+        <result column="status" property="status" jdbcType="INTEGER"/>
+        <result column="create_by" property="createBy" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+    </resultMap>
+    <sql id="Example_Where_Clause">
+        <where>
+            <foreach collection="oredCriteria" item="criteria" separator="or">
+                <if test="criteria.valid">
+                    <trim prefix="(" suffix=")" prefixOverrides="and">
+                        <foreach collection="criteria.criteria" item="criterion">
+                            <choose>
+                                <when test="criterion.noValue">
+                                    and ${criterion.condition}
+                                </when>
+                                <when test="criterion.singleValue">
+                                    and ${criterion.condition} #{criterion.value}
+                                </when>
+                                <when test="criterion.betweenValue">
+                                    and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                                </when>
+                                <when test="criterion.listValue">
+                                    and ${criterion.condition}
+                                    <foreach collection="criterion.value" item="listItem" open="(" close=")"
+                                             separator=",">
+                                        #{listItem}
+                                    </foreach>
+                                </when>
+                            </choose>
+                        </foreach>
+                    </trim>
+                </if>
+            </foreach>
+        </where>
+    </sql>
+    <sql id="Update_By_Example_Where_Clause">
+        <where>
+            <foreach collection="example.oredCriteria" item="criteria" separator="or">
+                <if test="criteria.valid">
+                    <trim prefix="(" suffix=")" prefixOverrides="and">
+                        <foreach collection="criteria.criteria" item="criterion">
+                            <choose>
+                                <when test="criterion.noValue">
+                                    and ${criterion.condition}
+                                </when>
+                                <when test="criterion.singleValue">
+                                    and ${criterion.condition} #{criterion.value}
+                                </when>
+                                <when test="criterion.betweenValue">
+                                    and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                                </when>
+                                <when test="criterion.listValue">
+                                    and ${criterion.condition}
+                                    <foreach collection="criterion.value" item="listItem" open="(" close=")"
+                                             separator=",">
+                                        #{listItem}
+                                    </foreach>
+                                </when>
+                            </choose>
+                        </foreach>
+                    </trim>
+                </if>
+            </foreach>
+        </where>
+    </sql>
+    <sql id="Base_Column_List">
+    f_id, model_key, model_version, modul_id, f_name, f_key, f_version, json_data, status, 
+    create_by, create_time, update_by, update_time
+  </sql>
+    <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.activiti6.entity.MyFormDataExample">
+        select
+        <if test="distinct">
+            distinct
+        </if>
+        <include refid="Base_Column_List"/>
+        from form_data
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause"/>
+        </if>
+        <if test="orderByClause != null">
+            order by ${orderByClause}
+        </if>
+    </select>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
+        select
+        <include refid="Base_Column_List"/>
+        from form_data
+        where f_id = #{fId,jdbcType=BIGINT}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from form_data
+    where f_id = #{fId,jdbcType=BIGINT}
+  </delete>
+    <delete id="deleteByExample" parameterType="com.activiti6.entity.MyFormDataExample">
+        delete from form_data
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause"/>
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.activiti6.entity.MyFormData">
+    insert into form_data (f_id, model_key, model_version, 
+      modul_id, f_name, f_key, 
+      f_version, json_data, status, 
+      create_by, create_time, update_by, 
+      update_time)
+    values (#{fId,jdbcType=BIGINT}, #{modelKey,jdbcType=VARCHAR}, #{modelVersion,jdbcType=INTEGER}, 
+      #{modulId,jdbcType=VARCHAR}, #{fName,jdbcType=VARCHAR}, #{fKey,jdbcType=VARCHAR}, 
+      #{fVersion,jdbcType=BIGINT}, #{jsonData,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
+      #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+    <insert id="insertSelective" parameterType="com.activiti6.entity.MyFormData">
+        insert into form_data
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fId != null">
+                f_id,
+            </if>
+            <if test="modelKey != null">
+                model_key,
+            </if>
+            <if test="modelVersion != null">
+                model_version,
+            </if>
+            <if test="modulId != null">
+                modul_id,
+            </if>
+            <if test="fName != null">
+                f_name,
+            </if>
+            <if test="fKey != null">
+                f_key,
+            </if>
+            <if test="fVersion != null">
+                f_version,
+            </if>
+            <if test="jsonData != null">
+                json_data,
+            </if>
+            <if test="status != null">
+                status,
+            </if>
+            <if test="createBy != null">
+                create_by,
+            </if>
+            <if test="createTime != null">
+                create_time,
+            </if>
+            <if test="updateBy != null">
+                update_by,
+            </if>
+            <if test="updateTime != null">
+                update_time,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fId != null">
+                #{fId,jdbcType=BIGINT},
+            </if>
+            <if test="modelKey != null">
+                #{modelKey,jdbcType=VARCHAR},
+            </if>
+            <if test="modelVersion != null">
+                #{modelVersion,jdbcType=INTEGER},
+            </if>
+            <if test="modulId != null">
+                #{modulId,jdbcType=VARCHAR},
+            </if>
+            <if test="fName != null">
+                #{fName,jdbcType=VARCHAR},
+            </if>
+            <if test="fKey != null">
+                #{fKey,jdbcType=VARCHAR},
+            </if>
+            <if test="fVersion != null">
+                #{fVersion,jdbcType=BIGINT},
+            </if>
+            <if test="jsonData != null">
+                #{jsonData,jdbcType=VARCHAR},
+            </if>
+            <if test="status != null">
+                #{status,jdbcType=INTEGER},
+            </if>
+            <if test="createBy != null">
+                #{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateBy != null">
+                #{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+        </trim>
+    </insert>
+
+    <select id="countByExample" parameterType="com.activiti6.entity.MyFormDataExample" resultType="java.lang.Integer">
+        select count(*) from form_data
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause"/>
+        </if>
+    </select>
+    <update id="updateByExampleSelective" parameterType="map">
+        update form_data
+        <set>
+            <if test="record.fId != null">
+                f_id = #{record.fId,jdbcType=BIGINT},
+            </if>
+            <if test="record.modelKey != null">
+                model_key = #{record.modelKey,jdbcType=VARCHAR},
+            </if>
+            <if test="record.modelVersion != null">
+                model_version = #{record.modelVersion,jdbcType=INTEGER},
+            </if>
+            <if test="record.modulId != null">
+                modul_id = #{record.modulId,jdbcType=VARCHAR},
+            </if>
+            <if test="record.fName != null">
+                f_name = #{record.fName,jdbcType=VARCHAR},
+            </if>
+            <if test="record.fKey != null">
+                f_key = #{record.fKey,jdbcType=VARCHAR},
+            </if>
+            <if test="record.fVersion != null">
+                f_version = #{record.fVersion,jdbcType=BIGINT},
+            </if>
+            <if test="record.jsonData != null">
+                json_data = #{record.jsonData,jdbcType=VARCHAR},
+            </if>
+            <if test="record.status != null">
+                status = #{record.status,jdbcType=INTEGER},
+            </if>
+            <if test="record.createBy != null">
+                create_by = #{record.createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="record.createTime != null">
+                create_time = #{record.createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="record.updateBy != null">
+                update_by = #{record.updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="record.updateTime != null">
+                update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+            </if>
+        </set>
+        <if test="_parameter != null">
+            <include refid="Update_By_Example_Where_Clause"/>
+        </if>
+    </update>
+    <update id="updateByExample" parameterType="map">
+        update form_data
+        set f_id = #{record.fId,jdbcType=BIGINT},
+        model_key = #{record.modelKey,jdbcType=VARCHAR},
+        model_version = #{record.modelVersion,jdbcType=INTEGER},
+        modul_id = #{record.modulId,jdbcType=VARCHAR},
+        f_name = #{record.fName,jdbcType=VARCHAR},
+        f_key = #{record.fKey,jdbcType=VARCHAR},
+        f_version = #{record.fVersion,jdbcType=BIGINT},
+        json_data = #{record.jsonData,jdbcType=VARCHAR},
+        status = #{record.status,jdbcType=INTEGER},
+        create_by = #{record.createBy,jdbcType=VARCHAR},
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+        update_by = #{record.updateBy,jdbcType=VARCHAR},
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+        <if test="_parameter != null">
+            <include refid="Update_By_Example_Where_Clause"/>
+        </if>
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.activiti6.entity.MyFormData">
+        update form_data
+        <set>
+            <if test="modelKey != null">
+                model_key = #{modelKey,jdbcType=VARCHAR},
+            </if>
+            <if test="modelVersion != null">
+                model_version = #{modelVersion,jdbcType=INTEGER},
+            </if>
+            <if test="modulId != null">
+                modul_id = #{modulId,jdbcType=VARCHAR},
+            </if>
+            <if test="fName != null">
+                f_name = #{fName,jdbcType=VARCHAR},
+            </if>
+            <if test="fKey != null">
+                f_key = #{fKey,jdbcType=VARCHAR},
+            </if>
+            <if test="fVersion != null">
+                f_version = #{fVersion,jdbcType=BIGINT},
+            </if>
+            <if test="jsonData != null">
+                json_data = #{jsonData,jdbcType=VARCHAR},
+            </if>
+            <if test="status != null">
+                status = #{status,jdbcType=INTEGER},
+            </if>
+            <if test="createBy != null">
+                create_by = #{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateBy != null">
+                update_by = #{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+        </set>
+        where f_id = #{fId,jdbcType=BIGINT}
+    </update>
+    <update id="updateByPrimaryKey" parameterType="com.activiti6.entity.MyFormData">
+    update form_data
+    set model_key = #{modelKey,jdbcType=VARCHAR},
+      model_version = #{modelVersion,jdbcType=INTEGER},
+      modul_id = #{modulId,jdbcType=VARCHAR},
+      f_name = #{fName,jdbcType=VARCHAR},
+      f_key = #{fKey,jdbcType=VARCHAR},
+      f_version = #{fVersion,jdbcType=BIGINT},
+      json_data = #{jsonData,jdbcType=VARCHAR},
+      status = #{status,jdbcType=INTEGER},
+      create_by = #{createBy,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_by = #{updateBy,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where f_id = #{fId,jdbcType=BIGINT}
+  </update>
+    <insert id="insertList" parameterType="list">
+       insert into form_data
+       (
+        f_id,
+        model_key,
+        model_version,
+        modul_id,
+        f_name,
+        f_key,
+        f_version,
+        json_data,
+        status,
+        create_by,
+        create_time,
+        update_by,
+        update_time
+      )
+        values
+            <foreach collection="list" item="item"  separator=",">
+                (
+                #{item.fId,jdbcType=BIGINT},
+                #{item.modelKey,jdbcType=VARCHAR},
+                #{item.modelVersion,jdbcType=INTEGER},
+                #{item.modulId,jdbcType=VARCHAR},
+                #{item.fName,jdbcType=VARCHAR},
+                #{item.fKey,jdbcType=VARCHAR},
+                #{item.fVersion,jdbcType=BIGINT},
+                #{item.jsonData,jdbcType=VARCHAR},
+                #{item.status,jdbcType=INTEGER},
+                #{item.createBy,jdbcType=VARCHAR},
+                #{item.createTime,jdbcType=TIMESTAMP},
+                #{item.updateBy,jdbcType=VARCHAR},
+                #{item.updateTime,jdbcType=TIMESTAMP}
+                )
+            </foreach>
+
+    </insert>
+
+</mapper>

+ 569 - 0
src/main/resources/mapper/MyformDataActivitiMapper.xml

@@ -0,0 +1,569 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.activiti6.mapper.MyFormDataActivitiMapper" >
+  <resultMap id="BaseResultMap" type="com.activiti6.domain.MyFormDataActiviti" >
+    <id column="f_id" property="fId" jdbcType="BIGINT" />
+    <result column="model_key" property="modelKey" jdbcType="VARCHAR" />
+    <result column="model_version" property="modelVersion" jdbcType="INTEGER" />
+    <result column="modul_id" property="modulId" jdbcType="VARCHAR" />
+    <result column="f_name" property="fName" jdbcType="VARCHAR" />
+    <result column="work_num" property="workNum" jdbcType="VARCHAR" />
+    <result column="title" property="title" jdbcType="VARCHAR" />
+    <result column="instance_id" property="instanceId" jdbcType="VARCHAR" />
+    <result column="process_definition_name" property="processDefinitionName" jdbcType="VARCHAR" />
+    <result column="task_name" property="taskName" jdbcType="VARCHAR" />
+    <result column="creat_user_name" property="creatUserName" jdbcType="VARCHAR" />
+    <result column="creat_dept_name" property="creatDeptName" jdbcType="VARCHAR" />
+    <result column="creat_form_time" property="creatFormTime" jdbcType="TIMESTAMP" />
+    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
+    <result column="f_key" property="fKey" jdbcType="VARCHAR" />
+    <result column="f_version" property="fVersion" jdbcType="BIGINT" />
+    <result column="apply_user" property="applyUser" jdbcType="VARCHAR" />
+    <result column="json_data" property="jsonData" jdbcType="VARCHAR" />
+    <result column="status" property="status" jdbcType="INTEGER" />
+    <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+    <result column="create_dept" property="createDept" jdbcType="VARCHAR" />
+    <result column="create_by" property="createBy" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="update_by" property="updateBy" jdbcType="VARCHAR" />
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Example_Where_Clause" >
+    <where >
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
+        <if test="criteria.valid" >
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
+            <foreach collection="criteria.criteria" item="criterion" >
+              <choose >
+                <when test="criterion.noValue" >
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue" >
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue" >
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue" >
+                  and ${criterion.condition}
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause" >
+    <where >
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+        <if test="criteria.valid" >
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
+            <foreach collection="criteria.criteria" item="criterion" >
+              <choose >
+                <when test="criterion.noValue" >
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue" >
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue" >
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue" >
+                  and ${criterion.condition}
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List" >
+    f_id, model_key, model_version, modul_id, f_name, work_num, title, instance_id, process_definition_name,
+    task_name, creat_user_name, creat_dept_name, creat_form_time, task_id, f_key, f_version,
+    apply_user, json_data, status, create_user, create_dept, create_by, create_time,
+    update_by, update_time
+  </sql>
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.activiti6.domain.MyFormDataActivitiExample" >
+    select
+    <if test="distinct" >
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from form_data_activiti
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null" >
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select
+    <include refid="Base_Column_List" />
+    from form_data_activiti
+    where f_id = #{fId,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from form_data_activiti
+    where f_id = #{fId,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.activiti6.domain.MyFormDataActivitiExample" >
+    delete from form_data_activiti
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.activiti6.domain.MyFormDataActiviti" >
+    insert into form_data_activiti (f_id, model_key, model_version,
+      modul_id, f_name, work_num,
+      title, instance_id, process_definition_name,
+      task_name, creat_user_name, creat_dept_name,
+      creat_form_time, task_id, f_key,
+      f_version, apply_user, json_data,
+      status, create_user, create_dept,
+      create_by, create_time, update_by,
+      update_time)
+    values (#{fId,jdbcType=BIGINT}, #{modelKey,jdbcType=VARCHAR}, #{modelVersion,jdbcType=INTEGER},
+      #{modulId,jdbcType=VARCHAR}, #{fName,jdbcType=VARCHAR}, #{workNum,jdbcType=VARCHAR},
+      #{title,jdbcType=VARCHAR}, #{instanceId,jdbcType=VARCHAR}, #{processDefinitionName,jdbcType=VARCHAR},
+      #{taskName,jdbcType=VARCHAR}, #{creatUserName,jdbcType=VARCHAR}, #{creatDeptName,jdbcType=VARCHAR},
+      #{creatFormTime,jdbcType=TIMESTAMP}, #{taskId,jdbcType=VARCHAR}, #{fKey,jdbcType=VARCHAR},
+      #{fVersion,jdbcType=BIGINT}, #{applyUser,jdbcType=VARCHAR}, #{jsonData,jdbcType=VARCHAR},
+      #{status,jdbcType=INTEGER}, #{createUser,jdbcType=VARCHAR}, #{createDept,jdbcType=VARCHAR},
+      #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.activiti6.domain.MyFormDataActiviti" >
+    insert into form_data_activiti
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="fId != null" >
+        f_id,
+      </if>
+      <if test="modelKey != null" >
+        model_key,
+      </if>
+      <if test="modelVersion != null" >
+        model_version,
+      </if>
+      <if test="modulId != null" >
+        modul_id,
+      </if>
+      <if test="fName != null" >
+        f_name,
+      </if>
+      <if test="workNum != null" >
+        work_num,
+      </if>
+      <if test="title != null" >
+        title,
+      </if>
+      <if test="instanceId != null" >
+        instance_id,
+      </if>
+      <if test="processDefinitionName != null" >
+        process_definition_name,
+      </if>
+      <if test="taskName != null" >
+        task_name,
+      </if>
+      <if test="creatUserName != null" >
+        creat_user_name,
+      </if>
+      <if test="creatDeptName != null" >
+        creat_dept_name,
+      </if>
+      <if test="creatFormTime != null" >
+        creat_form_time,
+      </if>
+      <if test="taskId != null" >
+        task_id,
+      </if>
+      <if test="fKey != null" >
+        f_key,
+      </if>
+      <if test="fVersion != null" >
+        f_version,
+      </if>
+      <if test="applyUser != null" >
+        apply_user,
+      </if>
+      <if test="jsonData != null" >
+        json_data,
+      </if>
+      <if test="status != null" >
+        status,
+      </if>
+      <if test="createUser != null" >
+        create_user,
+      </if>
+      <if test="createDept != null" >
+        create_dept,
+      </if>
+      <if test="createBy != null" >
+        create_by,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="updateBy != null" >
+        update_by,
+      </if>
+      <if test="updateTime != null" >
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="fId != null" >
+        #{fId,jdbcType=BIGINT},
+      </if>
+      <if test="modelKey != null" >
+        #{modelKey,jdbcType=VARCHAR},
+      </if>
+      <if test="modelVersion != null" >
+        #{modelVersion,jdbcType=INTEGER},
+      </if>
+      <if test="modulId != null" >
+        #{modulId,jdbcType=VARCHAR},
+      </if>
+      <if test="fName != null" >
+        #{fName,jdbcType=VARCHAR},
+      </if>
+      <if test="workNum != null" >
+        #{workNum,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null" >
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="instanceId != null" >
+        #{instanceId,jdbcType=VARCHAR},
+      </if>
+      <if test="processDefinitionName != null" >
+        #{processDefinitionName,jdbcType=VARCHAR},
+      </if>
+      <if test="taskName != null" >
+        #{taskName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatUserName != null" >
+        #{creatUserName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatDeptName != null" >
+        #{creatDeptName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatFormTime != null" >
+        #{creatFormTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="taskId != null" >
+        #{taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="fKey != null" >
+        #{fKey,jdbcType=VARCHAR},
+      </if>
+      <if test="fVersion != null" >
+        #{fVersion,jdbcType=BIGINT},
+      </if>
+      <if test="applyUser != null" >
+        #{applyUser,jdbcType=VARCHAR},
+      </if>
+      <if test="jsonData != null" >
+        #{jsonData,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null" >
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createUser != null" >
+        #{createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="createDept != null" >
+        #{createDept,jdbcType=VARCHAR},
+      </if>
+      <if test="createBy != null" >
+        #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateBy != null" >
+        #{updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.activiti6.domain.MyFormDataActivitiExample" resultType="java.lang.Integer" >
+    select count(*) from form_data_activiti
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map" >
+    update form_data_activiti
+    <set >
+      <if test="record.fId != null" >
+        f_id = #{record.fId,jdbcType=BIGINT},
+      </if>
+      <if test="record.modelKey != null" >
+        model_key = #{record.modelKey,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modelVersion != null" >
+        model_version = #{record.modelVersion,jdbcType=INTEGER},
+      </if>
+      <if test="record.modulId != null" >
+        modul_id = #{record.modulId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fName != null" >
+        f_name = #{record.fName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.workNum != null" >
+        work_num = #{record.workNum,jdbcType=VARCHAR},
+      </if>
+      <if test="record.title != null" >
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.instanceId != null" >
+        instance_id = #{record.instanceId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.processDefinitionName != null" >
+        process_definition_name = #{record.processDefinitionName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskName != null" >
+        task_name = #{record.taskName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.creatUserName != null" >
+        creat_user_name = #{record.creatUserName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.creatDeptName != null" >
+        creat_dept_name = #{record.creatDeptName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.creatFormTime != null" >
+        creat_form_time = #{record.creatFormTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.taskId != null" >
+        task_id = #{record.taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fKey != null" >
+        f_key = #{record.fKey,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fVersion != null" >
+        f_version = #{record.fVersion,jdbcType=BIGINT},
+      </if>
+      <if test="record.applyUser != null" >
+        apply_user = #{record.applyUser,jdbcType=VARCHAR},
+      </if>
+      <if test="record.jsonData != null" >
+        json_data = #{record.jsonData,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null" >
+        status = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.createUser != null" >
+        create_user = #{record.createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createDept != null" >
+        create_dept = #{record.createDept,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createBy != null" >
+        create_by = #{record.createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null" >
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateBy != null" >
+        update_by = #{record.updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.updateTime != null" >
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null" >
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map" >
+    update form_data_activiti
+    set f_id = #{record.fId,jdbcType=BIGINT},
+    model_key = #{record.modelKey,jdbcType=VARCHAR},
+    model_version = #{record.modelVersion,jdbcType=INTEGER},
+    modul_id = #{record.modulId,jdbcType=VARCHAR},
+    f_name = #{record.fName,jdbcType=VARCHAR},
+    work_num = #{record.workNum,jdbcType=VARCHAR},
+    title = #{record.title,jdbcType=VARCHAR},
+    instance_id = #{record.instanceId,jdbcType=VARCHAR},
+    process_definition_name = #{record.processDefinitionName,jdbcType=VARCHAR},
+    task_name = #{record.taskName,jdbcType=VARCHAR},
+    creat_user_name = #{record.creatUserName,jdbcType=VARCHAR},
+    creat_dept_name = #{record.creatDeptName,jdbcType=VARCHAR},
+    creat_form_time = #{record.creatFormTime,jdbcType=TIMESTAMP},
+    task_id = #{record.taskId,jdbcType=VARCHAR},
+    f_key = #{record.fKey,jdbcType=VARCHAR},
+    f_version = #{record.fVersion,jdbcType=BIGINT},
+    apply_user = #{record.applyUser,jdbcType=VARCHAR},
+    json_data = #{record.jsonData,jdbcType=VARCHAR},
+    status = #{record.status,jdbcType=INTEGER},
+    create_user = #{record.createUser,jdbcType=VARCHAR},
+    create_dept = #{record.createDept,jdbcType=VARCHAR},
+    create_by = #{record.createBy,jdbcType=VARCHAR},
+    create_time = #{record.createTime,jdbcType=TIMESTAMP},
+    update_by = #{record.updateBy,jdbcType=VARCHAR},
+    update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null" >
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.activiti6.domain.MyFormDataActiviti" >
+    update form_data_activiti
+    <set >
+      <if test="modelKey != null" >
+        model_key = #{modelKey,jdbcType=VARCHAR},
+      </if>
+      <if test="modelVersion != null" >
+        model_version = #{modelVersion,jdbcType=INTEGER},
+      </if>
+      <if test="modulId != null" >
+        modul_id = #{modulId,jdbcType=VARCHAR},
+      </if>
+      <if test="fName != null" >
+        f_name = #{fName,jdbcType=VARCHAR},
+      </if>
+      <if test="workNum != null" >
+        work_num = #{workNum,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null" >
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="instanceId != null" >
+        instance_id = #{instanceId,jdbcType=VARCHAR},
+      </if>
+      <if test="processDefinitionName != null" >
+        process_definition_name = #{processDefinitionName,jdbcType=VARCHAR},
+      </if>
+      <if test="taskName != null" >
+        task_name = #{taskName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatUserName != null" >
+        creat_user_name = #{creatUserName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatDeptName != null" >
+        creat_dept_name = #{creatDeptName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatFormTime != null" >
+        creat_form_time = #{creatFormTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="taskId != null" >
+        task_id = #{taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="fKey != null" >
+        f_key = #{fKey,jdbcType=VARCHAR},
+      </if>
+      <if test="fVersion != null" >
+        f_version = #{fVersion,jdbcType=BIGINT},
+      </if>
+      <if test="applyUser != null" >
+        apply_user = #{applyUser,jdbcType=VARCHAR},
+      </if>
+      <if test="jsonData != null" >
+        json_data = #{jsonData,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null" >
+        status = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createUser != null" >
+        create_user = #{createUser,jdbcType=VARCHAR},
+      </if>
+      <if test="createDept != null" >
+        create_dept = #{createDept,jdbcType=VARCHAR},
+      </if>
+      <if test="createBy != null" >
+        create_by = #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateBy != null" >
+        update_by = #{updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null" >
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where f_id = #{fId,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.activiti6.domain.MyFormDataActiviti" >
+    update form_data_activiti
+    set model_key = #{modelKey,jdbcType=VARCHAR},
+      model_version = #{modelVersion,jdbcType=INTEGER},
+      modul_id = #{modulId,jdbcType=VARCHAR},
+      f_name = #{fName,jdbcType=VARCHAR},
+      work_num = #{workNum,jdbcType=VARCHAR},
+      title = #{title,jdbcType=VARCHAR},
+      instance_id = #{instanceId,jdbcType=VARCHAR},
+      process_definition_name = #{processDefinitionName,jdbcType=VARCHAR},
+      task_name = #{taskName,jdbcType=VARCHAR},
+      creat_user_name = #{creatUserName,jdbcType=VARCHAR},
+      creat_dept_name = #{creatDeptName,jdbcType=VARCHAR},
+      creat_form_time = #{creatFormTime,jdbcType=TIMESTAMP},
+      task_id = #{taskId,jdbcType=VARCHAR},
+      f_key = #{fKey,jdbcType=VARCHAR},
+      f_version = #{fVersion,jdbcType=BIGINT},
+      apply_user = #{applyUser,jdbcType=VARCHAR},
+      json_data = #{jsonData,jdbcType=VARCHAR},
+      status = #{status,jdbcType=INTEGER},
+      create_user = #{createUser,jdbcType=VARCHAR},
+      create_dept = #{createDept,jdbcType=VARCHAR},
+      create_by = #{createBy,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_by = #{updateBy,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where f_id = #{fId,jdbcType=BIGINT}
+  </update>
+  <select id="taskDoneList" resultType="com.activiti6.domain.MyFormDataActiviti">
+    SELECT
+    f_id AS fId,
+    model_key AS modelKey,
+    model_version AS modelVersion,
+    modul_id AS modulId,
+    f_name AS fName,
+    work_num AS workNum,
+    title AS  title,
+    instance_id AS instanceId,
+    process_definition_name AS processDefinitionName,
+    task_name AS taskName,
+    creat_user_name AS creatUserName,
+    creat_dept_name AS creatDeptName,
+    creat_form_time AS creatFormTime,
+    task_id AS taskId,
+    f_key AS fKey,
+    f_version AS fVersion,
+    apply_user AS applyUser,
+    STATUS AS 'status',
+    create_user AS createUser,
+    create_dept AS createDept,
+    create_by AS createBy,
+    create_time AS createTime,
+    update_by AS updateBy,
+    update_time AS updateTime
+    FROM
+    form_data_activiti
+    WHERE
+    1=1
+    <if test="myFormDataActiviti.createBy !=null and myFormDataActiviti.createBy !=''">
+      AND create_by = #{myFormDataActiviti.createBy}
+    </if>
+    <if test="myFormDataActiviti.processDefinitionName !=null and myFormDataActiviti.processDefinitionName !=''">
+      AND title like concat('%', #{myFormDataActiviti.processDefinitionName}, '%')
+    </if>
+    GROUP BY
+    instance_id
+    ORDER BY
+    create_time DESC
+  </select>
+</mapper>

+ 338 - 0
src/main/resources/mapper/activiti/NewMyFormDataMapper.xml

@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.activiti6.mapper.activiti.NewMyFormDataMapper" >
+  <resultMap id="BaseResultMap" type="com.activiti6.domain.MyFormData" >
+    <id column="f_id" property="fId" jdbcType="BIGINT" />
+    <result column="model_key" property="modelKey" jdbcType="VARCHAR" />
+    <result column="model_version" property="modelVersion" jdbcType="INTEGER" />
+    <result column="modul_id" property="modulId" jdbcType="VARCHAR" />
+    <result column="f_name" property="fName" jdbcType="VARCHAR" />
+    <result column="f_key" property="fKey" jdbcType="VARCHAR" />
+    <result column="f_version" property="fVersion" jdbcType="BIGINT" />
+    <result column="json_data" property="jsonData" jdbcType="VARCHAR" />
+    <result column="status" property="status" jdbcType="INTEGER" />
+    <result column="create_by" property="createBy" jdbcType="VARCHAR" />
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="update_by" property="updateBy" jdbcType="VARCHAR" />
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <sql id="Example_Where_Clause" >
+    <where >
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
+        <if test="criteria.valid" >
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
+            <foreach collection="criteria.criteria" item="criterion" >
+              <choose >
+                <when test="criterion.noValue" >
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue" >
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue" >
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue" >
+                  and ${criterion.condition}
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause" >
+    <where >
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
+        <if test="criteria.valid" >
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
+            <foreach collection="criteria.criteria" item="criterion" >
+              <choose >
+                <when test="criterion.noValue" >
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue" >
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue" >
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue" >
+                  and ${criterion.condition}
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List" >
+    f_id, model_key, model_version, modul_id, f_name, f_key, f_version, json_data, status,
+    create_by, create_time, update_by, update_time
+  </sql>
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.activiti6.domain.MyFormDataExample" >
+    select
+    <if test="distinct" >
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from form_data
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null" >
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select
+    <include refid="Base_Column_List" />
+    from form_data
+    where f_id = #{fId,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from form_data
+    where f_id = #{fId,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.activiti6.domain.MyFormDataExample" >
+    delete from form_data
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.activiti6.domain.MyFormData" >
+    insert into form_data (f_id, model_key, model_version,
+      modul_id, f_name, f_key,
+      f_version, json_data, status,
+      create_by, create_time, update_by,
+      update_time)
+    values (#{fId,jdbcType=BIGINT}, #{modelKey,jdbcType=VARCHAR}, #{modelVersion,jdbcType=INTEGER},
+      #{modulId,jdbcType=VARCHAR}, #{fName,jdbcType=VARCHAR}, #{fKey,jdbcType=VARCHAR},
+      #{fVersion,jdbcType=BIGINT}, #{jsonData,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
+      #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.activiti6.domain.MyFormData" >
+    insert into form_data
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="fId != null" >
+        f_id,
+      </if>
+      <if test="modelKey != null" >
+        model_key,
+      </if>
+      <if test="modelVersion != null" >
+        model_version,
+      </if>
+      <if test="modulId != null" >
+        modul_id,
+      </if>
+      <if test="fName != null" >
+        f_name,
+      </if>
+      <if test="fKey != null" >
+        f_key,
+      </if>
+      <if test="fVersion != null" >
+        f_version,
+      </if>
+      <if test="jsonData != null" >
+        json_data,
+      </if>
+      <if test="status != null" >
+        status,
+      </if>
+      <if test="createBy != null" >
+        create_by,
+      </if>
+      <if test="createTime != null" >
+        create_time,
+      </if>
+      <if test="updateBy != null" >
+        update_by,
+      </if>
+      <if test="updateTime != null" >
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="fId != null" >
+        #{fId,jdbcType=BIGINT},
+      </if>
+      <if test="modelKey != null" >
+        #{modelKey,jdbcType=VARCHAR},
+      </if>
+      <if test="modelVersion != null" >
+        #{modelVersion,jdbcType=INTEGER},
+      </if>
+      <if test="modulId != null" >
+        #{modulId,jdbcType=VARCHAR},
+      </if>
+      <if test="fName != null" >
+        #{fName,jdbcType=VARCHAR},
+      </if>
+      <if test="fKey != null" >
+        #{fKey,jdbcType=VARCHAR},
+      </if>
+      <if test="fVersion != null" >
+        #{fVersion,jdbcType=BIGINT},
+      </if>
+      <if test="jsonData != null" >
+        #{jsonData,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null" >
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createBy != null" >
+        #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateBy != null" >
+        #{updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.activiti6.domain.MyFormDataExample" resultType="java.lang.Integer" >
+    select count(*) from form_data
+    <if test="_parameter != null" >
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map" >
+    update form_data
+    <set >
+      <if test="record.fId != null" >
+        f_id = #{record.fId,jdbcType=BIGINT},
+      </if>
+      <if test="record.modelKey != null" >
+        model_key = #{record.modelKey,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modelVersion != null" >
+        model_version = #{record.modelVersion,jdbcType=INTEGER},
+      </if>
+      <if test="record.modulId != null" >
+        modul_id = #{record.modulId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fName != null" >
+        f_name = #{record.fName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fKey != null" >
+        f_key = #{record.fKey,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fVersion != null" >
+        f_version = #{record.fVersion,jdbcType=BIGINT},
+      </if>
+      <if test="record.jsonData != null" >
+        json_data = #{record.jsonData,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null" >
+        status = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.createBy != null" >
+        create_by = #{record.createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null" >
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateBy != null" >
+        update_by = #{record.updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.updateTime != null" >
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null" >
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map" >
+    update form_data
+    set f_id = #{record.fId,jdbcType=BIGINT},
+      model_key = #{record.modelKey,jdbcType=VARCHAR},
+      model_version = #{record.modelVersion,jdbcType=INTEGER},
+      modul_id = #{record.modulId,jdbcType=VARCHAR},
+      f_name = #{record.fName,jdbcType=VARCHAR},
+      f_key = #{record.fKey,jdbcType=VARCHAR},
+      f_version = #{record.fVersion,jdbcType=BIGINT},
+      json_data = #{record.jsonData,jdbcType=VARCHAR},
+      status = #{record.status,jdbcType=INTEGER},
+      create_by = #{record.createBy,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_by = #{record.updateBy,jdbcType=VARCHAR},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null" >
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.activiti6.domain.MyFormData" >
+    update form_data
+    <set >
+      <if test="modelKey != null" >
+        model_key = #{modelKey,jdbcType=VARCHAR},
+      </if>
+      <if test="modelVersion != null" >
+        model_version = #{modelVersion,jdbcType=INTEGER},
+      </if>
+      <if test="modulId != null" >
+        modul_id = #{modulId,jdbcType=VARCHAR},
+      </if>
+      <if test="fName != null" >
+        f_name = #{fName,jdbcType=VARCHAR},
+      </if>
+      <if test="fKey != null" >
+        f_key = #{fKey,jdbcType=VARCHAR},
+      </if>
+      <if test="fVersion != null" >
+        f_version = #{fVersion,jdbcType=BIGINT},
+      </if>
+      <if test="jsonData != null" >
+        json_data = #{jsonData,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null" >
+        status = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createBy != null" >
+        create_by = #{createBy,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateBy != null" >
+        update_by = #{updateBy,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null" >
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where f_id = #{fId,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.activiti6.domain.MyFormData" >
+    update form_data
+    set model_key = #{modelKey,jdbcType=VARCHAR},
+      model_version = #{modelVersion,jdbcType=INTEGER},
+      modul_id = #{modulId,jdbcType=VARCHAR},
+      f_name = #{fName,jdbcType=VARCHAR},
+      f_key = #{fKey,jdbcType=VARCHAR},
+      f_version = #{fVersion,jdbcType=BIGINT},
+      json_data = #{jsonData,jdbcType=VARCHAR},
+      status = #{status,jdbcType=INTEGER},
+      create_by = #{createBy,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_by = #{updateBy,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where f_id = #{fId,jdbcType=BIGINT}
+  </update>
+</mapper>

Some files were not shown because too many files changed in this diff