包名从activiti 改成 bpm

pull/2/head
jason 2021-11-06 10:22:45 +08:00
parent 30732428f1
commit f0b7583404
33 changed files with 87 additions and 94 deletions

View File

@ -1,9 +1,9 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.*;
import cn.iocoder.yudao.adminserver.modules.activiti.convert.oa.OALeaveConvert;
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.activiti.service.oa.OALeaveService;
import cn.iocoder.yudao.adminserver.modules.bpm.convert.oa.OALeaveConvert;
import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.bpm.service.oa.OALeaveService;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.*;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo;
import lombok.*;
import java.util.*;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo;
import lombok.*;
import io.swagger.annotations.*;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo;
import lombok.*;
import java.util.*;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo;
import lombok.*;
import java.util.*;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo;
import lombok.*;
import java.util.*;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo;
import lombok.*;
import io.swagger.annotations.*;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import org.activiti.api.process.runtime.ProcessRuntime;

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo.*;
import cn.iocoder.yudao.adminserver.modules.activiti.service.workflow.TaskService;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.*;
import cn.iocoder.yudao.adminserver.modules.bpm.service.workflow.TaskService;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import io.swagger.annotations.Api;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo;
import lombok.Data;
import lombok.ToString;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo;
import lombok.Data;
import lombok.ToString;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo;
import lombok.Data;
import lombok.ToString;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo;
import lombok.Data;
import lombok.ToString;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo;
package cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@ -13,6 +13,9 @@ public class TodoTaskRespVO {
private String id;
private String processInstanceId;
/**
* 1:
* 2:

View File

@ -1,13 +1,16 @@
package cn.iocoder.yudao.adminserver.modules.activiti.convert.oa;
package cn.iocoder.yudao.adminserver.modules.bpm.convert.oa;
import java.util.*;
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveCreateReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveExcelVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveRespVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveUpdateReqVO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.*;
/**
* Convert

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.adminserver.modules.activiti.convert.workflow;
package cn.iocoder.yudao.adminserver.modules.bpm.convert.workflow;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo.TaskStepVO;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo.TodoTaskRespVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.TaskStepVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.TodoTaskRespVO;
import org.activiti.api.task.model.Task;
import org.activiti.engine.history.HistoricActivityInstance;
import org.activiti.engine.repository.ProcessDefinition;
@ -20,7 +20,8 @@ public interface TaskConvert {
@Mapping(source = "task.businessKey", target = "businessKey"),
@Mapping(source = "task.assignee", target = "status",qualifiedByName = "convertAssigneeToStatus"),
@Mapping(source = "definition.name", target = "processName"),
@Mapping(source = "definition.key", target = "processKey")
@Mapping(source = "definition.key", target = "processKey"),
@Mapping(source = "definition.id", target = "processInstanceId")
})
TodoTaskRespVO convert(Task task, ProcessDefinition definition);

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa;
package cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave;
import lombok.*;
import java.util.*;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.process;
package cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.process;
/**
* activiti ProcessDefinition

View File

@ -1,13 +1,14 @@
package cn.iocoder.yudao.adminserver.modules.activiti.dal.mysql.oa;
package cn.iocoder.yudao.adminserver.modules.bpm.dal.mysql.oa;
import java.util.*;
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveExportReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeavePageReqVO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.*;
/**
* Mapper

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.enums;
package cn.iocoder.yudao.adminserver.modules.bpm.enums.oa;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
/**

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.config;
package cn.iocoder.yudao.adminserver.modules.bpm.service.config;
import cn.iocoder.yudao.adminserver.modules.system.service.dept.SysPostService;

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.config;
package cn.iocoder.yudao.adminserver.modules.bpm.service.config;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import org.activiti.api.runtime.shared.security.PrincipalGroupsProvider;

View File

@ -1,11 +1,11 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.oa;
package cn.iocoder.yudao.adminserver.modules.bpm.service.oa;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OALeaveCreateReqVO;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OALeaveUpdateReqVO;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OALeaveExportReqVO;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OALeavePageReqVO;
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveCreateReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveUpdateReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveExportReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeavePageReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import javax.validation.Valid;

View File

@ -1,7 +1,7 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.oa;
package cn.iocoder.yudao.adminserver.modules.bpm.service.oa;
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.activiti.dal.mysql.oa.OALeaveMapper;
import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.bpm.dal.mysql.oa.OALeaveMapper;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

View File

@ -1,13 +1,13 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.oa.impl;
package cn.iocoder.yudao.adminserver.modules.bpm.service.oa.impl;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OALeaveCreateReqVO;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OALeaveUpdateReqVO;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OALeaveExportReqVO;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.oa.vo.OALeavePageReqVO;
import cn.iocoder.yudao.adminserver.modules.activiti.convert.oa.OALeaveConvert;
import cn.iocoder.yudao.adminserver.modules.activiti.dal.dataobject.oa.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.activiti.dal.mysql.oa.OALeaveMapper;
import cn.iocoder.yudao.adminserver.modules.activiti.service.oa.OALeaveService;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveCreateReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveUpdateReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeaveExportReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.oa.vo.OALeavePageReqVO;
import cn.iocoder.yudao.adminserver.modules.bpm.convert.oa.OALeaveConvert;
import cn.iocoder.yudao.adminserver.modules.bpm.dal.dataobject.leave.OALeaveDO;
import cn.iocoder.yudao.adminserver.modules.bpm.dal.mysql.oa.OALeaveMapper;
import cn.iocoder.yudao.adminserver.modules.bpm.service.oa.OALeaveService;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import org.activiti.api.task.model.Task;
@ -22,7 +22,7 @@ import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.util.*;
import static cn.iocoder.yudao.adminserver.modules.activiti.enums.OAErrorCodeConstants.LEAVE_NOT_EXISTS;
import static cn.iocoder.yudao.adminserver.modules.bpm.enums.oa.OAErrorCodeConstants.LEAVE_NOT_EXISTS;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
/**

View File

@ -1,4 +1,4 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.process;
package cn.iocoder.yudao.adminserver.modules.bpm.service.process;
import org.springframework.web.multipart.MultipartFile;

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.process.impl;
package cn.iocoder.yudao.adminserver.modules.bpm.service.process.impl;
import cn.iocoder.yudao.adminserver.modules.activiti.service.process.ProcessService;
import cn.iocoder.yudao.adminserver.modules.bpm.service.process.ProcessService;
import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.Deployment;

View File

@ -1,6 +1,6 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.workflow;
package cn.iocoder.yudao.adminserver.modules.bpm.service.workflow;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo.*;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import javax.servlet.http.HttpServletResponse;

View File

@ -1,13 +1,11 @@
package cn.iocoder.yudao.adminserver.modules.activiti.service.workflow.impl;
package cn.iocoder.yudao.adminserver.modules.bpm.service.workflow.impl;
import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.adminserver.modules.activiti.controller.workflow.vo.*;
import cn.iocoder.yudao.adminserver.modules.activiti.convert.workflow.TaskConvert;
import cn.iocoder.yudao.adminserver.modules.activiti.service.workflow.TaskService;
import cn.iocoder.yudao.adminserver.modules.bpm.controller.workflow.vo.*;
import cn.iocoder.yudao.adminserver.modules.bpm.convert.workflow.TaskConvert;
import cn.iocoder.yudao.adminserver.modules.bpm.service.workflow.TaskService;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import com.google.common.collect.ImmutableMap;
import lombok.extern.slf4j.Slf4j;
import org.activiti.api.runtime.shared.query.Page;
import org.activiti.api.runtime.shared.query.Pageable;
@ -23,7 +21,6 @@ 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.history.HistoricTaskInstance;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Comment;
@ -35,9 +32,7 @@ import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
@ -75,6 +70,7 @@ public class TaskServiceImpl implements TaskService {
List<Task> tasks = pageTasks.getContent();
final List<TodoTaskRespVO> respVOList = tasks.stream().map(task -> {
ProcessDefinition definition = repositoryService.getProcessDefinition(task.getProcessDefinitionId());
definition.getId();
return TaskConvert.INSTANCE.convert(task, definition);
}).collect(Collectors.toList());
return new PageResult<>(respVOList, (long)totalItems);
@ -188,6 +184,7 @@ public class TaskServiceImpl implements TaskService {
respVO.setFormKey(task.getFormKey());
respVO.setBusinessKey(task.getBusinessKey());
respVO.setId(task.getId());
respVO.setProcessInstanceId(task.getProcessInstanceId());
return respVO;
}
@ -277,8 +274,8 @@ public class TaskServiceImpl implements TaskService {
response.flushBuffer();
}
/**
* 线
* @see https://blog.csdn.net/qiuxinfa123/article/details/119579863
* 线 https://blog.csdn.net/qiuxinfa123/article/details/119579863
* @see
* @param bpmnModel model
* @param historicActivityInstances 线
* @return

View File

@ -53,7 +53,10 @@
<el-step :title="stepTitle(item)" :description="stepDes(item)" v-for="(item) in handleTask.historyTask" ></el-step>
</el-steps>
</el-tab-pane>
<el-tab-pane label="流程图">流程图-TODO</el-tab-pane>
<el-tab-pane label="流程图">
<!-- TODO 云扬四海 svg 要如何展示 -->
流程图-TODO
</el-tab-pane>
</el-tabs>
</div>
@ -61,7 +64,7 @@
<script>
import { getLeave } from "@/api/oa/leave"
import { completeTask,taskSteps } from "@/api/oa/todo";
import { completeTask,taskSteps, getHighlightImg } from "@/api/oa/todo";
import { getDictDataLabel, getDictDatas, DICT_TYPE } from '@/utils/dict'
export default {
name: "HrApproveLeave",
@ -82,6 +85,7 @@ export default {
approved : 1,
variables: {},
taskId: "",
processInstanceId: "",
comment: "同意"
},
approvedData: [
@ -139,6 +143,7 @@ export default {
const businessKey = this.$route.query.businessKey;
const taskId = this.$route.query.taskId;
this.leaveApprove.taskId = taskId;
this.leaveApprove.processInstanceId = this.$route.query.processInstanceId;
this.getForm(businessKey);
},
methods: {
@ -174,8 +179,8 @@ export default {
}
taskSteps(data).then(response => {
this.handleTask = response.data;
});
getHighlightImg(this.leaveApprove.processInstanceId);
},
approveChange(){
if (this.leaveApprove.approved === 1) {

View File

@ -26,24 +26,6 @@
<el-table-column label="任务Id" align="center" prop="id" />
<el-table-column label="流程名称" align="center" prop="processName" />
<el-table-column label="任务状态" align="center" :formatter="statusFormat" prop="status" />
<!-- <el-table-column label="申请人id" align="center" prop="userId" />-->
<!-- <el-table-column label="开始时间" align="center" prop="startTime" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.startTime) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="结束时间" align="center" prop="endTime" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.endTime) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="请假类型" align="center" prop="leaveType" />-->
<!-- <el-table-column label="原因" align="center" prop="reason" />-->
<!-- <el-table-column label="申请时间" align="center" prop="applyTime" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.applyTime) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 1" @click="handleClaim(scope.row)"></el-button>
@ -234,7 +216,8 @@ export default {
path: path,
query: {
businessKey: businessKey,
taskId:taskId
taskId:taskId,
processInstanceId : resp.processInstanceId
}
}
this.$router.replace(route);