工作流相关代码。
This commit is contained in:
+78
@@ -0,0 +1,78 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.wkflow.feginClient.impl.ActivitiModelFeignClientImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags="工作流模型")
|
||||
@RestController
|
||||
@RequestMapping("/model")
|
||||
public class ActivitiModelController {
|
||||
|
||||
@Autowired
|
||||
private ActivitiModelFeignClientImpl activitiModelFeignClient;
|
||||
|
||||
@AutoLog(value = "创建流程模型")
|
||||
@ApiOperation(value="创建流程模型", notes="创建流程模型")
|
||||
@GetMapping("/createModel")
|
||||
public Result<String> createModel(@RequestParam("name")String name,
|
||||
@RequestParam("desc") String desc,
|
||||
@RequestParam("category") String category){
|
||||
return activitiModelFeignClient.createModel(name, desc, category);
|
||||
}
|
||||
|
||||
@AutoLog(value = "保存model信息")
|
||||
@ApiOperation(value="保存model信息", notes="保存model信息")
|
||||
@GetMapping("/saveModel")
|
||||
public Result<String> saveModel(@RequestParam("modelId")String modelId,
|
||||
@RequestParam("name")String name,
|
||||
@RequestParam("description") String description,
|
||||
@RequestParam("jsonXml") String jsonXml,
|
||||
@RequestParam("svgXml") String svgXml){
|
||||
return activitiModelFeignClient.saveModel(modelId, name, description, jsonXml,svgXml);
|
||||
}
|
||||
|
||||
@AutoLog(value = "删除模板")
|
||||
@ApiOperation(value="删除模板", notes="删除模板")
|
||||
@GetMapping("/deleteModel")
|
||||
public Result<String> deleteModel(@RequestParam(value="modelId") String modelId){
|
||||
return activitiModelFeignClient.deleteModel(modelId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "修改流程所属分类")
|
||||
@ApiOperation(value="修改流程所属分类", notes="修改流程所属分类")
|
||||
@GetMapping("/updatModel")
|
||||
public Result<String> updatModel(@RequestParam("modelId")String modelId,@RequestParam("categoryId")String categoryId){
|
||||
return activitiModelFeignClient.updatModel(modelId,categoryId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "复制流程")
|
||||
@ApiOperation(value="复制流程", notes="复制流程")
|
||||
@GetMapping("/copyModel")
|
||||
public Result<String> copyModel(@RequestParam(value="modelId") String modelId){
|
||||
return activitiModelFeignClient.copyModel(modelId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "部署流程")
|
||||
@ApiOperation(value="部署流程", notes="部署流程")
|
||||
@GetMapping("/deploy")
|
||||
public Result<String> deploy(@RequestParam(value="modelId") String modelId){
|
||||
return activitiModelFeignClient.deploy(modelId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "根据modelId获取model")
|
||||
@ApiOperation(value="根据modelId获取model", notes="根据modelId获取model")
|
||||
@GetMapping("/model/json")
|
||||
public Object getEditorJson(@RequestParam("modelId")String modelId){
|
||||
return activitiModelFeignClient.getEditorJson(modelId);
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.wkflow.entity.Category;
|
||||
import com.jero.modules.wkflow.feginClient.impl.CategoryFeignClientImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags="流程分类")
|
||||
@RestController
|
||||
@RequestMapping("/category")
|
||||
public class CategoryController {
|
||||
|
||||
@Autowired
|
||||
private CategoryFeignClientImpl categoryFeignClient;
|
||||
|
||||
@AutoLog(value = "流程分类列表")
|
||||
@ApiOperation(value="流程分类列表", notes="流程分类列表")
|
||||
@GetMapping("/categoryList")
|
||||
public Result<List<Category>> categoryList(){
|
||||
return categoryFeignClient.categoryList();
|
||||
}
|
||||
|
||||
@AutoLog(value = "添加流程分类")
|
||||
@ApiOperation(value="添加流程分类", notes="添加流程分类")
|
||||
@PostMapping("/addCategory")
|
||||
public Result<String> addCategory(@RequestBody Category category){
|
||||
return categoryFeignClient.addCategory(category);
|
||||
}
|
||||
|
||||
@AutoLog(value = "删除流程分类")
|
||||
@ApiOperation(value="删除流程分类", notes="删除流程分类")
|
||||
@GetMapping("/deleteCategory")
|
||||
public Result<String> deleteCategory(@RequestParam("objectId") String objectId){
|
||||
return categoryFeignClient.deleteCategory(objectId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "编辑流程分类")
|
||||
@ApiOperation(value="编辑流程分类", notes="编辑流程分类")
|
||||
@PostMapping("/editCategory")
|
||||
public Result<String> editCategory(@RequestBody Category category){
|
||||
return categoryFeignClient.editCategory(category);
|
||||
}
|
||||
}
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.entity.BusProcessName;
|
||||
import com.jero.modules.wkflow.entity.BusProcessNew;
|
||||
import com.jero.modules.wkflow.entity.TaskCommonQuery;
|
||||
import com.jero.modules.wkflow.feginClient.impl.TaskFeignClientImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags="待办任务")
|
||||
@RestController
|
||||
@RequestMapping("/task")
|
||||
public class TaskController {
|
||||
|
||||
@Autowired
|
||||
private TaskFeignClientImpl taskFeignClient;
|
||||
|
||||
/**
|
||||
* 通用接口
|
||||
* @param taskIds
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "查询待办任务数据")
|
||||
@ApiOperation(value="查询待办任务数据", notes="查询待办任务数据")
|
||||
@GetMapping("/queryTaskByTaskIds")
|
||||
public BusProcessNew queryTaskByTaskIds(@RequestParam("taskIds") String taskIds){
|
||||
return taskFeignClient.queryTaskByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
@AutoLog(value = "根据待办id,查询任务明细数据")
|
||||
@ApiOperation(value="根据待办id,查询任务明细数据", notes="根据待办id,查询任务明细数据")
|
||||
@GetMapping("/queryTaskDetailByTaskIds")
|
||||
public String queryTaskDetailByTaskIds(@RequestParam("taskIds") String taskIds) {
|
||||
return taskFeignClient.queryTaskDetailByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
@AutoLog(value = "保存任务")
|
||||
@ApiOperation(value="保存任务", notes="保存任务")
|
||||
@PostMapping("/saveTask")
|
||||
public Result<String> saveTask(@RequestBody BusMes busMes){
|
||||
return taskFeignClient.saveTask(busMes);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的已办任务列表")
|
||||
@ApiOperation(value="我的已办任务列表", notes="我的已办任务列表")
|
||||
@PostMapping("/hastodoTasksList")
|
||||
public Result<Map<String, Object>> HastodoTasksListByUserId(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
return taskFeignClient.HastodoTasksListByUserId(taskCommonQuery);
|
||||
}
|
||||
|
||||
@AutoLog(value = "我的待办任务列表")
|
||||
@ApiOperation(value="我的待办任务列表", notes="我的待办任务列表")
|
||||
@PostMapping("/todoTaskList")
|
||||
public IPage<BusProcessName> todoTaskListByUserId(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
List<BusProcessName> busProcessNames = taskFeignClient.todoTaskListByUserId(taskCommonQuery);
|
||||
List list1 = this.startPage(busProcessNames, taskCommonQuery.getCurrent(), taskCommonQuery.getSize());
|
||||
IPage pageInfo = new Page();
|
||||
if(busProcessNames!=null){
|
||||
pageInfo.setRecords(list1);
|
||||
pageInfo.setCurrent(taskCommonQuery.getCurrent());
|
||||
pageInfo.setTotal(Long.valueOf(busProcessNames.size()));
|
||||
pageInfo.setSize(taskCommonQuery.getSize());
|
||||
}else{
|
||||
List<BusProcessName> list = new ArrayList<>();
|
||||
pageInfo.setRecords(list);
|
||||
pageInfo.setCurrent(taskCommonQuery.getCurrent());
|
||||
pageInfo.setTotal(Long.valueOf(0));
|
||||
pageInfo.setSize(taskCommonQuery.getSize());
|
||||
}
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@AutoLog(value = "查询草稿")
|
||||
@ApiOperation(value="查询草稿", notes="查询草稿")
|
||||
@PostMapping("/queryTaskDraft")
|
||||
public IPage<BusProcessName> queryTaskDraft(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
List<BusProcessName> busProcessNames = taskFeignClient.queryTaskDraft(taskCommonQuery);
|
||||
List list1 = this.startPage(busProcessNames, taskCommonQuery.getCurrent(), taskCommonQuery.getSize());
|
||||
IPage pageInfo = new Page();
|
||||
if(busProcessNames!=null){
|
||||
pageInfo.setRecords(list1);
|
||||
pageInfo.setCurrent(taskCommonQuery.getCurrent());
|
||||
pageInfo.setTotal(Long.valueOf(busProcessNames.size()));
|
||||
pageInfo.setSize(taskCommonQuery.getSize());
|
||||
}else{
|
||||
List<BusProcessName> list = new ArrayList<BusProcessName>();
|
||||
pageInfo.setRecords(list);
|
||||
pageInfo.setCurrent(taskCommonQuery.getCurrent());
|
||||
pageInfo.setTotal(Long.valueOf(0));
|
||||
pageInfo.setSize(taskCommonQuery.getSize());
|
||||
}
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@AutoLog(value = "已办流程")
|
||||
@ApiOperation(value="已办流程", notes="已办流程")
|
||||
@PostMapping("/doneProcess")
|
||||
public IPage<BusProcessName> doneProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
IPage page = taskFeignClient.doneProcess(taskCommonQuery);
|
||||
return page;
|
||||
}
|
||||
|
||||
@AutoLog(value = "已发流程")
|
||||
@ApiOperation(value="已发流程", notes="已发流程")
|
||||
@PostMapping("/IssuedProcess")
|
||||
public IPage<BusProcessName> IssuedProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
IPage page = taskFeignClient.issuedProcess(taskCommonQuery);
|
||||
return page;
|
||||
}
|
||||
|
||||
@AutoLog(value = "监控流程列表")
|
||||
@ApiOperation(value="监控流程列表", notes="监控流程列表")
|
||||
@PostMapping("/allProcess")
|
||||
public IPage<BusProcessName> allProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
IPage page= taskFeignClient.allProcess(taskCommonQuery);
|
||||
return page;
|
||||
}
|
||||
|
||||
@AutoLog(value = "已办流程-根据taskId查询已办明细")
|
||||
@ApiOperation(value="已办流程-根据taskId查询已办明细", notes="已办流程-根据taskId查询已办明细")
|
||||
@GetMapping("/haveFinishedFlowDetail")
|
||||
public String haveFinishedFlowDetail(@RequestParam Map<String,Object> params){
|
||||
/**
|
||||
* params
|
||||
* taskId: 待办id 不能为null
|
||||
*/
|
||||
if(StringUtils.isEmpty((String) params.get("taskId"))){
|
||||
throw new RuntimeException("待办id不能为空。");
|
||||
}
|
||||
return taskFeignClient.haveFinishedFlowDetail(params);
|
||||
}
|
||||
|
||||
@AutoLog(value = "删除草稿")
|
||||
@ApiOperation(value="删除草稿", notes="删除草稿")
|
||||
@GetMapping("/deleteDraft")
|
||||
public Result<String> deleteDraft(@RequestParam("id")String id){
|
||||
return taskFeignClient.deleteDraft(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始分页
|
||||
* @param list
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 每页多少条数据
|
||||
* @return
|
||||
*/
|
||||
public static List startPage(List list, Integer pageNum,
|
||||
Integer pageSize) {
|
||||
if (list == null) {
|
||||
return null;
|
||||
}
|
||||
if (list.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Integer count = list.size(); // 记录总数
|
||||
Integer pageCount = 0; // 页数
|
||||
if (count % pageSize == 0) {
|
||||
pageCount = count / pageSize;
|
||||
} else {
|
||||
pageCount = count / pageSize + 1;
|
||||
}
|
||||
|
||||
int fromIndex = 0; // 开始索引
|
||||
int toIndex = 0; // 结束索引
|
||||
|
||||
if (pageNum != pageCount) {
|
||||
fromIndex = (pageNum - 1) * pageSize;
|
||||
toIndex = fromIndex + pageSize;
|
||||
} else {
|
||||
fromIndex = (pageNum - 1) * pageSize;
|
||||
toIndex = count;
|
||||
}
|
||||
|
||||
List pageList = list.subList(fromIndex, toIndex);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.jero.modules.wkflow.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONObject;
|
||||
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.OutputStream;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags="工作流管理")
|
||||
@RestController
|
||||
@RequestMapping("/workFlow")
|
||||
public class workFlowController {
|
||||
|
||||
@Autowired
|
||||
private WorkFlowFeignClientImpl workFlowFeignClient;
|
||||
|
||||
public Result activiti_define_start(@RequestBody JSONObject jsonObject){
|
||||
return workFlowFeignClient.activiti_define_start(jsonObject);
|
||||
}
|
||||
|
||||
@AutoLog(value = "启动流程-以流程定义id")
|
||||
@ApiOperation(value="启动流程-以流程定义id", notes="启动流程-以流程定义id")
|
||||
@PostMapping("/startProcess")
|
||||
public Result startProcess(@RequestBody JSONObject jsonObject){
|
||||
String type = jsonObject.getString("type");
|
||||
if(type.equals("1")){
|
||||
jsonObject.put("id","flowId");
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@AutoLog(value = "完成任务")
|
||||
@ApiOperation(value="完成任务", notes="完成任务")
|
||||
@PostMapping("/completeTask")
|
||||
public Result<String> completeTaskByUserId(BusMes busMes){
|
||||
Result<String> str = workFlowFeignClient.completeTaskByUserId(busMes);
|
||||
if(str.getCode() == 500){
|
||||
str.setSuccess(false);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
@AutoLog(value = "通过流程实例id查询当前待办的流程实例是否结束")
|
||||
@ApiOperation(value="通过流程实例id查询当前待办的流程实例是否结束", notes="通过流程实例id查询当前待办的流程实例是否结束")
|
||||
@GetMapping("/queryTaskWhetherToEnd")
|
||||
public String queryTaskWhetherToEnd(@RequestParam("prcId") String prcId) {
|
||||
return workFlowFeignClient.queryTaskWhetherToEnd(prcId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "改派")
|
||||
@ApiOperation(value="改派", notes="改派")
|
||||
@GetMapping("/changeAssigneeNew")
|
||||
public Result<String> run(@RequestParam("taskId")String taskId,@RequestParam("assignee") String assignee,
|
||||
@RequestParam("userId")String userId,@RequestParam("pId") String pId) {
|
||||
return workFlowFeignClient.run(taskId,assignee,userId,pId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "保存任务第一步")
|
||||
@ApiOperation(value="保存任务第一步", notes="保存任务第一步")
|
||||
@PostMapping("/saveTaskFirst")
|
||||
public Result<String> saveTaskFirst(BusMes busMes){
|
||||
return workFlowFeignClient.saveTaskFirst(busMes);
|
||||
}
|
||||
|
||||
@AutoLog(value = "查询流程是否结束")
|
||||
@ApiOperation(value="查询流程是否结束", notes="查询流程是否结束")
|
||||
@GetMapping("/isEnd")
|
||||
public String isEnd(@RequestParam("pId")String pId){
|
||||
return workFlowFeignClient.isEnd(pId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "删除流程")
|
||||
@ApiOperation(value="删除流程", notes="删除流程")
|
||||
@GetMapping("/deleteProcessInstance")
|
||||
public Result<String> deleteProcessInstance(@RequestParam("pId")String pId){
|
||||
return workFlowFeignClient.deleteProcessInstance(pId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "流程实例明细列表")
|
||||
@ApiOperation(value="流程实例明细列表", notes="流程实例明细列表")
|
||||
@GetMapping("/get_list_by_instance")
|
||||
public List<Map<String, Object>> get_list_by_instance(@RequestParam("prcNum") String prcNum,@RequestParam(value="sortWord",required = false)String sortWord,@RequestParam(value="shunxu",required = false) String shunxu){
|
||||
return workFlowFeignClient.get_list_by_instance(prcNum,sortWord,shunxu);
|
||||
}
|
||||
|
||||
@AutoLog(value = "获取图片")
|
||||
@ApiOperation(value="获取图片", notes="获取图片")
|
||||
@GetMapping("/getImg")
|
||||
public void getImg(@RequestParam("prcNum")String prcNum,HttpServletResponse response) throws IOException {
|
||||
OutputStream os = null;
|
||||
response.setContentType("image/jpg");
|
||||
response.flushBuffer();
|
||||
os = response.getOutputStream();
|
||||
os.write(workFlowFeignClient.getImg(prcNum));
|
||||
os.flush();
|
||||
os.close();
|
||||
}
|
||||
|
||||
@AutoLog(value = "强制撤回")
|
||||
@ApiOperation(value="强制撤回", notes="强制撤回")
|
||||
@GetMapping("/forceRecall")
|
||||
public Result<String> forceRecall(@RequestParam("prcId") String prcId){
|
||||
return workFlowFeignClient.forceRecall(prcId);
|
||||
}
|
||||
|
||||
@AutoLog(value = "查询流程")
|
||||
@ApiOperation(value="查询流程", notes="查询流程")
|
||||
@GetMapping("/modelListPage")
|
||||
public Result<Map<String, Object>> modelListPage(@RequestParam(value="name",required = false)String name, @RequestParam(value="category_id ",required = false)String category_id,
|
||||
@RequestParam("current")int current, @RequestParam("size")int size){
|
||||
return workFlowFeignClient.modelListPage(name,category_id,current,size);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.jero.modules.wkflow.entity;
|
||||
|
||||
public class BusMes {
|
||||
|
||||
private String userId;
|
||||
|
||||
private String taskId;
|
||||
|
||||
private String json;
|
||||
|
||||
private String taskIds;
|
||||
|
||||
private String pId;
|
||||
|
||||
private String prcType;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private String createUserName;
|
||||
|
||||
private String userName;
|
||||
|
||||
private int size;
|
||||
|
||||
private int current;
|
||||
|
||||
private String id;
|
||||
|
||||
private String nowStateType;
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getJson() {
|
||||
return json;
|
||||
}
|
||||
|
||||
public void setJson(String json) {
|
||||
this.json = json;
|
||||
}
|
||||
|
||||
public String getTaskIds() {
|
||||
return taskIds;
|
||||
}
|
||||
|
||||
public void setTaskIds(String taskIds) {
|
||||
this.taskIds = taskIds;
|
||||
}
|
||||
|
||||
public String getpId() {
|
||||
return pId;
|
||||
}
|
||||
|
||||
public void setpId(String pId) {
|
||||
this.pId = pId;
|
||||
}
|
||||
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public String getPrcType() {
|
||||
return prcType;
|
||||
}
|
||||
|
||||
public void setPrcType(String prcType) {
|
||||
this.prcType = prcType;
|
||||
}
|
||||
|
||||
public String getCreateUserName() {
|
||||
return createUserName;
|
||||
}
|
||||
|
||||
public void setCreateUserName(String createUserName) {
|
||||
this.createUserName = createUserName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(int size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public int getCurrent() {
|
||||
return current;
|
||||
}
|
||||
|
||||
public void setCurrent(int current) {
|
||||
this.current = current;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNowStateType() { return nowStateType; }
|
||||
|
||||
public void setNowStateType(String nowStateType) { this.nowStateType = nowStateType; }
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.jero.modules.wkflow.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="BusProcessName对象", description="")
|
||||
public class BusProcessName implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
private String id;
|
||||
|
||||
private String prcName;
|
||||
|
||||
private String prcId;
|
||||
|
||||
private String prcMes;
|
||||
|
||||
private String overTime;
|
||||
|
||||
private String prcNum;
|
||||
|
||||
private String creatTime;
|
||||
|
||||
private String creatUser;
|
||||
|
||||
private String prcType;
|
||||
|
||||
private String taskIds;
|
||||
|
||||
private String taskInfo;
|
||||
|
||||
private String creatUserName;
|
||||
|
||||
private String mes;
|
||||
|
||||
private String endTime;
|
||||
|
||||
private String taskAssignee;
|
||||
|
||||
private String isEnd;
|
||||
|
||||
private String taskBackAssignee;
|
||||
|
||||
//流程节点(任务)定义key
|
||||
private String taskDefinitionKey;
|
||||
|
||||
// @TableField(exist = false)
|
||||
// private String taskId;
|
||||
// //审批时间
|
||||
// @TableField(exist = false)
|
||||
// private String approvalTime;
|
||||
// //状态 1通过 2驳回
|
||||
// @TableField(exist = false)
|
||||
// private String status;
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.jero.modules.wkflow.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="BusProcessNew对象", description="")
|
||||
public class BusProcessNew {
|
||||
|
||||
private String id;
|
||||
|
||||
private String msgType;
|
||||
|
||||
private String standId;
|
||||
|
||||
private String clauseId;
|
||||
|
||||
private String userId;
|
||||
|
||||
private String username;
|
||||
|
||||
private String mesg;
|
||||
|
||||
private String taskInfo;
|
||||
|
||||
private String parentId;
|
||||
|
||||
private String taskId;
|
||||
|
||||
private String pId;
|
||||
|
||||
private String finishFlag;
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package com.jero.modules.wkflow.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Category {
|
||||
|
||||
private String objectId;
|
||||
|
||||
private int isDeleted;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String code;
|
||||
|
||||
private String type;
|
||||
|
||||
public String getObjectId() {
|
||||
return objectId;
|
||||
}
|
||||
|
||||
public void setObjectId(String objectId) {
|
||||
this.objectId = objectId;
|
||||
}
|
||||
|
||||
public int getIsDeleted() {
|
||||
return isDeleted;
|
||||
}
|
||||
|
||||
public void setIsDeleted(int isDeleted) {
|
||||
this.isDeleted = isDeleted;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.jero.modules.wkflow.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class TaskCommonQuery {
|
||||
|
||||
@ApiModelProperty(value = "当前页")
|
||||
private int current;
|
||||
|
||||
@ApiModelProperty(value = "数量")
|
||||
private int size;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "开始时间从")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "到")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间从")
|
||||
private String finishStartTime;
|
||||
|
||||
@ApiModelProperty(value = "到")
|
||||
private String finishEndTime;
|
||||
|
||||
@ApiModelProperty(value = "流程分类")
|
||||
private String category_id;
|
||||
|
||||
@ApiModelProperty(value = "用户Id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String prcName;
|
||||
|
||||
@ApiModelProperty(value = "流程编号")
|
||||
private String prcNum;
|
||||
|
||||
@ApiModelProperty(value = "流程类型")
|
||||
private String prcType;
|
||||
|
||||
@ApiModelProperty(value = "高级搜索字符串")
|
||||
private String advanceSearchVOStr;
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package com.jero.modules.wkflow.feginClient;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = "weilai-wkflow")
|
||||
public interface ActivitiModelFeignClient {
|
||||
|
||||
/**
|
||||
* 创建流程模型
|
||||
* @param name
|
||||
* @param desc
|
||||
* @param category
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/createModel",method = RequestMethod.GET)
|
||||
Result<String> createModel(@RequestParam("name")String name,
|
||||
@RequestParam("desc") String desc,
|
||||
@RequestParam("category") String category);
|
||||
|
||||
/**
|
||||
* 根据modelId获取model
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/model/json",method = RequestMethod.GET)
|
||||
Object getEditorJson(@RequestParam("modelId")String modelId);
|
||||
|
||||
/**
|
||||
* 保存model信息
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/model/save",method = RequestMethod.GET)
|
||||
Result<String> saveModel(@RequestParam("modelId")String modelId,
|
||||
@RequestParam("name")String name,
|
||||
@RequestParam("description") String description,
|
||||
@RequestParam("jsonXml") String jsonXml,
|
||||
@RequestParam("svgXml") String svgXml);
|
||||
|
||||
/**
|
||||
* 复制流程
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/copyModel",method = RequestMethod.GET)
|
||||
Result<String> copyModel(@RequestParam("modelId")String modelId);
|
||||
|
||||
/**
|
||||
* 删除模板
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/deleteModel",method = RequestMethod.GET)
|
||||
Result<String> deleteModel(@RequestParam("modelId")String modelId);
|
||||
|
||||
/**
|
||||
* 部署流程
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/deploy",method = RequestMethod.GET)
|
||||
Result<String> deploy(@RequestParam("modelId")String modelId);
|
||||
|
||||
/**
|
||||
* 修改流程所属分类
|
||||
* @param modelId
|
||||
* @param categoryId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/updatModel",method = RequestMethod.GET)
|
||||
Result<String> updatModel(@RequestParam("modelId")String modelId,@RequestParam("categoryId")String categoryId);
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.jero.modules.wkflow.feginClient;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.wkflow.entity.Category;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@FeignClient(value = "weilai-wkflow")
|
||||
public interface CategoryFeignClient {
|
||||
|
||||
/**
|
||||
* 流程分类列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/category/category/list",method = RequestMethod.GET)
|
||||
Result<List<Category>> categoryList();
|
||||
|
||||
/**
|
||||
* 添加流程分类
|
||||
* @param category
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/category/category/add",method = RequestMethod.POST)
|
||||
Result<String> addCategory(@RequestBody Category category);
|
||||
|
||||
/**
|
||||
* 删除流程分类
|
||||
* @param objectId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/category/category/delete",method = RequestMethod.GET)
|
||||
Result<String> deleteCategory(@RequestParam("objectId") String objectId);
|
||||
|
||||
/**
|
||||
* 编辑流程分类
|
||||
* @param category
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/category/category/edit",method = RequestMethod.POST)
|
||||
Result<String> editCategory(@RequestBody Category category);
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
package com.jero.modules.wkflow.feginClient;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.entity.BusProcessName;
|
||||
import com.jero.modules.wkflow.entity.BusProcessNew;
|
||||
import com.jero.modules.wkflow.entity.TaskCommonQuery;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(value = "weilai-wkflow")
|
||||
public interface TaskFeignClient {
|
||||
/**
|
||||
* 查询待办任务数据
|
||||
* @param taskIds
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/queryDetail",method = RequestMethod.GET)
|
||||
BusProcessNew queryTaskByTaskIds(@RequestParam("taskIds") String taskIds);
|
||||
|
||||
/**
|
||||
* 根据待办id,查询任务明细数据
|
||||
* @param taskIds
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/zcfgrklcDetail",method = RequestMethod.GET)
|
||||
String queryTaskDetailByTaskIds(@RequestParam("taskIds") String taskIds);
|
||||
|
||||
/**
|
||||
* 保存任务
|
||||
* @param busMes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/saveTask",method = RequestMethod.POST)
|
||||
Result<String> saveTask(@RequestBody BusMes busMes);
|
||||
|
||||
/**
|
||||
* 我的已办任务列表
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/hastodoTasksList",method = RequestMethod.POST)
|
||||
Result<Map<String, Object>> HastodoTasksListByUserId(@RequestBody TaskCommonQuery taskCommonQuery);
|
||||
|
||||
/**
|
||||
* 我的待办任务列表
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/todoTaskList",method = RequestMethod.POST)
|
||||
List<BusProcessName> todoTaskListByUserId(@RequestBody TaskCommonQuery taskCommonQuery);
|
||||
|
||||
/**
|
||||
* 查询草稿
|
||||
* @param taskCommonQuery
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/queryTaskDraft",method = RequestMethod.POST)
|
||||
List<BusProcessName> queryTaskDraft(@RequestBody TaskCommonQuery taskCommonQuery);
|
||||
|
||||
/**
|
||||
* 已办流程
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/doneProcess",method = RequestMethod.POST)
|
||||
IPage doneProcess(@RequestBody TaskCommonQuery taskCommonQuery);
|
||||
|
||||
/**
|
||||
* 已发流程
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/issuedProcess",method = RequestMethod.POST)
|
||||
IPage issuedProcess(@RequestBody TaskCommonQuery taskCommonQuery);
|
||||
|
||||
/**
|
||||
* 监控流程列表
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/allProcess",method = RequestMethod.POST)
|
||||
IPage allProcess(@RequestBody TaskCommonQuery taskCommonQuery);
|
||||
|
||||
/**
|
||||
* 已办流程-根据taskId查询已办明细
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/datas/datas/haveFinishedFlowDetail",method = RequestMethod.GET)
|
||||
String haveFinishedFlowDetail(@RequestParam Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 删除草稿
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/deleteDraft",method = RequestMethod.GET)
|
||||
Result<String> deleteDraft(@RequestParam("id") String id);
|
||||
}
|
||||
+104
@@ -1,11 +1,17 @@
|
||||
package com.jero.modules.wkflow.feginClient;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(value = "weilai-wkflow")
|
||||
public interface WorkFlowFeignClient {
|
||||
@RequestMapping(value = "/bat-wkflow/task/testGet",method = RequestMethod.GET)
|
||||
@@ -13,4 +19,102 @@ public interface WorkFlowFeignClient {
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/task/testPost",method = RequestMethod.POST,headers = {"content-type=application/json"})
|
||||
JSONObject testPost(String jsonObject);
|
||||
|
||||
/**
|
||||
* 启动流程-以流程定义id
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/activiti_define_start_user",method = RequestMethod.POST,headers = {"content-type=application/json"})
|
||||
Result<String> activiti_define_start(String jsonObject);
|
||||
|
||||
/**
|
||||
* 完成任务
|
||||
* @param busMes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/completeTask",method = RequestMethod.POST)
|
||||
Result<String> completeTaskByUserId(@RequestBody BusMes busMes);
|
||||
|
||||
/**
|
||||
* 通过流程实例id查询当前待办的流程实例是否结束
|
||||
* @param prcId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/task/queryTaskWhetherToEnd",method = RequestMethod.GET)
|
||||
String queryTaskWhetherToEnd(@RequestParam("prcId") String prcId);
|
||||
|
||||
/**
|
||||
* 改派
|
||||
* @param taskId
|
||||
* @param assignee
|
||||
* @param userId
|
||||
* @param pId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/changeAssigneeNew",method = RequestMethod.GET)
|
||||
Result<String> run(@RequestParam("taskId") String taskId, @RequestParam("assignee") String assignee,
|
||||
@RequestParam("userId") String userId, @RequestParam("pId") String pId);
|
||||
|
||||
/**
|
||||
* 保存任务第一步
|
||||
* @param busMes
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/saveTaskFirst",method = RequestMethod.POST)
|
||||
Result<String> saveTaskFirst(@RequestBody BusMes busMes);
|
||||
|
||||
/**
|
||||
* 查询流程是否结束
|
||||
* @param pId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/isEnd",method = RequestMethod.GET)
|
||||
String isEnd(@RequestParam("pId") String pId);
|
||||
|
||||
/**
|
||||
* 删除流程
|
||||
* @param pId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/deleteProcessInstance",method = RequestMethod.GET)
|
||||
Result<String> deleteProcessInstance(@RequestParam("pId") String pId);
|
||||
|
||||
/**
|
||||
* 流程实例明细列表
|
||||
* @param prcNum
|
||||
* @param sortWord
|
||||
* @param shunxu
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/task/get_list_by_instance",method = RequestMethod.GET)
|
||||
List<Map<String, Object>> get_list_by_instance(@RequestParam("prcNum") String prcNum, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu);
|
||||
|
||||
/**
|
||||
* 获取图片
|
||||
* @param prcNum
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/instance/getImg",method = RequestMethod.GET)
|
||||
byte[] getImg(@RequestParam("prcNum") String prcNum);
|
||||
|
||||
/**
|
||||
* 强制撤回
|
||||
* @param prcId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/forceRecall",method = RequestMethod.GET)
|
||||
Result<String> forceRecall(@RequestParam("prcId") String prcId);
|
||||
|
||||
/**
|
||||
* 查询流程
|
||||
* @param name
|
||||
* @param category_id
|
||||
* @param current
|
||||
* @param size
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/bat-wkflow/modelListPage",method = RequestMethod.GET)
|
||||
Result<Map<String, Object>> modelListPage(@RequestParam("name")String name, @RequestParam("category_id")String category_id,
|
||||
@RequestParam("current")int current, @RequestParam("size")int size);
|
||||
|
||||
}
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package com.jero.modules.wkflow.feginClient.impl;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.wkflow.feginClient.ActivitiModelFeignClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Component
|
||||
public class ActivitiModelFeignClientImpl {
|
||||
|
||||
@Autowired
|
||||
private ActivitiModelFeignClient activitiModelFeignClient;
|
||||
|
||||
/**
|
||||
* 创建流程模型
|
||||
* @param name
|
||||
* @param desc
|
||||
* @param category
|
||||
* @return
|
||||
*/
|
||||
public Result<String> createModel(@RequestParam("name")String name,
|
||||
@RequestParam("desc") String desc,
|
||||
@RequestParam("category") String category){
|
||||
return activitiModelFeignClient.createModel(name, desc, category);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存model信息
|
||||
* @param modelId
|
||||
* @param name
|
||||
* @param description
|
||||
* @param jsonXml
|
||||
* @param svgXml
|
||||
* @return
|
||||
*/
|
||||
public Result<String> saveModel(@RequestParam("modelId")String modelId,
|
||||
@RequestParam("name")String name,
|
||||
@RequestParam("description") String description,
|
||||
@RequestParam("jsonXml") String jsonXml,
|
||||
@RequestParam("svgXml") String svgXml){
|
||||
return activitiModelFeignClient.saveModel(modelId,name,description,jsonXml,svgXml);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除模板
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> deleteModel(@RequestParam("modelId")String modelId){
|
||||
return activitiModelFeignClient.deleteModel(modelId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流程所属分类
|
||||
* @param modelId
|
||||
* @param categoryId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> updatModel(@RequestParam("modelId")String modelId,@RequestParam("categoryId")String categoryId){
|
||||
return activitiModelFeignClient.updatModel(modelId,categoryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制流程
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> copyModel(@RequestParam("modelId")String modelId){
|
||||
return activitiModelFeignClient.copyModel(modelId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 部署流程
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> deploy(@RequestParam("modelId")String modelId){
|
||||
return activitiModelFeignClient.deploy(modelId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据modelId获取model
|
||||
* @param modelId
|
||||
* @return
|
||||
*/
|
||||
public Object getEditorJson(@RequestParam("modelId")String modelId){
|
||||
return activitiModelFeignClient.getEditorJson(modelId);
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package com.jero.modules.wkflow.feginClient.impl;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.wkflow.entity.Category;
|
||||
import com.jero.modules.wkflow.feginClient.CategoryFeignClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class CategoryFeignClientImpl {
|
||||
|
||||
@Autowired
|
||||
private CategoryFeignClient categoryFeignClient;
|
||||
|
||||
/**
|
||||
* 流程分类列表
|
||||
* @return
|
||||
*/
|
||||
public Result<List<Category>> categoryList(){
|
||||
return categoryFeignClient.categoryList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加流程分类
|
||||
* @param category
|
||||
* @return
|
||||
*/
|
||||
public Result<String> addCategory(@RequestBody Category category){
|
||||
return categoryFeignClient.addCategory(category);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程分类
|
||||
* @param objectId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> deleteCategory(@RequestParam("objectId") String objectId){
|
||||
return categoryFeignClient.deleteCategory(objectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑流程分类
|
||||
* @param category
|
||||
* @return
|
||||
*/
|
||||
public Result<String> editCategory(@RequestBody Category category){
|
||||
return categoryFeignClient.editCategory(category);
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package com.jero.modules.wkflow.feginClient.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.entity.BusProcessName;
|
||||
import com.jero.modules.wkflow.entity.BusProcessNew;
|
||||
import com.jero.modules.wkflow.entity.TaskCommonQuery;
|
||||
import com.jero.modules.wkflow.feginClient.TaskFeignClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class TaskFeignClientImpl {
|
||||
|
||||
@Autowired
|
||||
private TaskFeignClient taskFeignClient;
|
||||
|
||||
/**
|
||||
* 查询待办任务数据
|
||||
* @param taskIds
|
||||
* @return
|
||||
*/
|
||||
public BusProcessNew queryTaskByTaskIds(@RequestParam("taskIds") String taskIds){
|
||||
return taskFeignClient.queryTaskByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据待办id,查询任务明细数据
|
||||
* @param taskIds
|
||||
* @return
|
||||
*/
|
||||
public String queryTaskDetailByTaskIds(@RequestParam("taskIds") String taskIds){
|
||||
return taskFeignClient.queryTaskDetailByTaskIds(taskIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存任务
|
||||
* @param busMes
|
||||
* @return
|
||||
*/
|
||||
public Result<String> saveTask(@RequestBody BusMes busMes){
|
||||
Result<String> stringWrapper = taskFeignClient.saveTask(busMes);
|
||||
return stringWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的已办任务列表
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
public Result<Map<String, Object>> HastodoTasksListByUserId(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
Result<Map<String, Object>> mapWrapper = taskFeignClient.HastodoTasksListByUserId(taskCommonQuery);
|
||||
return mapWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的待办任务列表
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
public List<BusProcessName> todoTaskListByUserId(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
List<BusProcessName> mapWrapper = taskFeignClient.todoTaskListByUserId(taskCommonQuery);
|
||||
return mapWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询草稿
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
public List<BusProcessName> queryTaskDraft(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
List<BusProcessName> busProcessNames = taskFeignClient.queryTaskDraft(taskCommonQuery);
|
||||
return busProcessNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* 已办流程
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
public IPage doneProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
IPage busProcessNames = taskFeignClient.doneProcess(taskCommonQuery);
|
||||
return busProcessNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* 已发流程
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
public IPage issuedProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
IPage busProcessNames = taskFeignClient.issuedProcess(taskCommonQuery);
|
||||
return busProcessNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* 监控流程列表
|
||||
* @param taskCommonQuery
|
||||
* @return
|
||||
*/
|
||||
public IPage allProcess(@RequestBody TaskCommonQuery taskCommonQuery){
|
||||
return taskFeignClient.allProcess(taskCommonQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 已办流程-根据taskId查询已办明细
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public String haveFinishedFlowDetail(@RequestParam Map<String, Object> params) {
|
||||
return taskFeignClient.haveFinishedFlowDetail(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除草稿
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public Result<String> deleteDraft(@RequestParam("id")String id){
|
||||
return taskFeignClient.deleteDraft(id);
|
||||
}
|
||||
|
||||
}
|
||||
+119
@@ -1,9 +1,16 @@
|
||||
package com.jero.modules.wkflow.feginClient.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class WorkFlowFeignClientImpl{
|
||||
@@ -18,4 +25,116 @@ public class WorkFlowFeignClientImpl{
|
||||
public JSONObject testPost(JSONObject jsonObject) {
|
||||
return workFlowFeignClient.testPost(jsonObject.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动流程-以流程定义id
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
public Result activiti_define_start(@RequestBody net.sf.json.JSONObject jsonObject){
|
||||
Result<String> stringWrapper = workFlowFeignClient.activiti_define_start(jsonObject.toString());
|
||||
return Result.OK(stringWrapper.getResult());
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成任务
|
||||
* @param busMes
|
||||
* @return
|
||||
*/
|
||||
public Result<String> completeTaskByUserId( BusMes busMes){
|
||||
Result<String> stringWrapper = workFlowFeignClient.completeTaskByUserId(busMes);
|
||||
return stringWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过流程实例id查询当前待办的流程实例是否结束
|
||||
* @param prcId
|
||||
* @return
|
||||
*/
|
||||
public String queryTaskWhetherToEnd(@RequestParam("prcId") String prcId) {
|
||||
return workFlowFeignClient.queryTaskWhetherToEnd(prcId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 改派
|
||||
* @param taskId
|
||||
* @param assignee
|
||||
* @param userId
|
||||
* @param pId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> run(@RequestParam("taskId")String taskId,@RequestParam("assignee") String assignee,
|
||||
@RequestParam("userId")String userId,@RequestParam("pId") String pId){
|
||||
Result<String> run = workFlowFeignClient.run(taskId, assignee,userId,pId);
|
||||
return run;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存任务第一步
|
||||
* @param busMes
|
||||
* @return
|
||||
*/
|
||||
public Result<String> saveTaskFirst(BusMes busMes){
|
||||
return workFlowFeignClient.saveTaskFirst(busMes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流程是否结束
|
||||
* @param pId
|
||||
* @return
|
||||
*/
|
||||
public String isEnd(@RequestParam("pId")String pId){
|
||||
return workFlowFeignClient.isEnd(pId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程
|
||||
* @param pId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> deleteProcessInstance(@RequestParam("pId")String pId){
|
||||
return workFlowFeignClient.deleteProcessInstance(pId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程实例明细列表
|
||||
* @param prcNum
|
||||
* @param sortWord
|
||||
* @param shunxu
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String, Object>> get_list_by_instance(@RequestParam("prcNum") String prcNum, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu){
|
||||
return workFlowFeignClient.get_list_by_instance(prcNum,sortWord,shunxu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取图片
|
||||
* @param prcNum
|
||||
* @return
|
||||
*/
|
||||
public byte[] getImg(@RequestParam("prcNum")String prcNum){
|
||||
return workFlowFeignClient.getImg(prcNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 强制撤回
|
||||
* @param prcId
|
||||
* @return
|
||||
*/
|
||||
public Result<String> forceRecall(@RequestParam("prcId") String prcId){
|
||||
return workFlowFeignClient.forceRecall(prcId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流程
|
||||
* @param name
|
||||
* @param category_id
|
||||
* @param current
|
||||
* @param size
|
||||
* @return
|
||||
*/
|
||||
public Result<Map<String, Object>> modelListPage(@RequestParam("name")String name, @RequestParam("category_id")String category_id,
|
||||
@RequestParam("current")int current, @RequestParam("size")int size){
|
||||
return workFlowFeignClient.modelListPage(name,category_id,current,size);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user