1、前端store的state新增nickName属性
2、请假流程添加功能基本实现 3、解决workflow服务Mybatis日志不打印问题
This commit is contained in:
parent
cd58c9871e
commit
2f12b4535b
|
|
@ -76,7 +76,7 @@ if (!window.FileList || !window.FileReader) {
|
||||||
};
|
};
|
||||||
|
|
||||||
_jquery.default.ajax({
|
_jquery.default.ajax({
|
||||||
url: localStorage.getItem("VUE_APP_BASE_API") + '/activitiHistory/gethighLine',
|
url: localStorage.getItem("VUE_APP_BASE_API") + '/workflow/activitiHistory/gethighLine',
|
||||||
// url: 'http://localhost:8080/activitiHistory/gethighLine',
|
// url: 'http://localhost:8080/activitiHistory/gethighLine',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
data: param1,
|
data: param1,
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ const getters = {
|
||||||
token: state => state.user.token,
|
token: state => state.user.token,
|
||||||
avatar: state => state.user.avatar,
|
avatar: state => state.user.avatar,
|
||||||
name: state => state.user.name,
|
name: state => state.user.name,
|
||||||
|
nickName :state => state.user.nickName,
|
||||||
introduction: state => state.user.introduction,
|
introduction: state => state.user.introduction,
|
||||||
roles: state => state.user.roles,
|
roles: state => state.user.roles,
|
||||||
permissions: state => state.user.permissions,
|
permissions: state => state.user.permissions,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
import { login, logout, getInfo, refreshToken } from '@/api/login'
|
import {login, logout, getInfo, refreshToken} from '@/api/login'
|
||||||
import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth'
|
import {getToken, setToken, setExpiresIn, removeToken} from '@/utils/auth'
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
token: getToken(),
|
token: getToken(),
|
||||||
name: '',
|
name: '',
|
||||||
|
nickName: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
roles: [],
|
roles: [],
|
||||||
permissions: []
|
permissions: []
|
||||||
|
|
@ -20,6 +21,9 @@ const user = {
|
||||||
SET_NAME: (state, name) => {
|
SET_NAME: (state, name) => {
|
||||||
state.name = name
|
state.name = name
|
||||||
},
|
},
|
||||||
|
SET_NICK_NAME: (state, nickName) => {
|
||||||
|
state.nickName = nickName
|
||||||
|
},
|
||||||
SET_AVATAR: (state, avatar) => {
|
SET_AVATAR: (state, avatar) => {
|
||||||
state.avatar = avatar
|
state.avatar = avatar
|
||||||
},
|
},
|
||||||
|
|
@ -28,12 +32,13 @@ const user = {
|
||||||
},
|
},
|
||||||
SET_PERMISSIONS: (state, permissions) => {
|
SET_PERMISSIONS: (state, permissions) => {
|
||||||
state.permissions = permissions
|
state.permissions = permissions
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
// 登录
|
// 登录
|
||||||
Login({ commit }, userInfo) {
|
Login({commit}, userInfo) {
|
||||||
const username = userInfo.username.trim()
|
const username = userInfo.username.trim()
|
||||||
const password = userInfo.password
|
const password = userInfo.password
|
||||||
const code = userInfo.code
|
const code = userInfo.code
|
||||||
|
|
@ -53,7 +58,7 @@ const user = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
GetInfo({ commit, state }) {
|
GetInfo({commit, state}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo().then(res => {
|
getInfo().then(res => {
|
||||||
const user = res.user
|
const user = res.user
|
||||||
|
|
@ -66,6 +71,7 @@ const user = {
|
||||||
}
|
}
|
||||||
commit('SET_NAME', user.userName)
|
commit('SET_NAME', user.userName)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
|
commit('SET_NICK_NAME', user.nickName)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|
@ -87,7 +93,7 @@ const user = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 退出系统
|
// 退出系统
|
||||||
LogOut({ commit, state }) {
|
LogOut({commit, state}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
logout(state.token).then(() => {
|
logout(state.token).then(() => {
|
||||||
commit('SET_TOKEN', '')
|
commit('SET_TOKEN', '')
|
||||||
|
|
@ -102,7 +108,7 @@ const user = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 前端 登出
|
// 前端 登出
|
||||||
FedLogOut({ commit }) {
|
FedLogOut({commit}) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
commit('SET_TOKEN', '')
|
commit('SET_TOKEN', '')
|
||||||
removeToken()
|
removeToken()
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
v-model="queryParams.key"
|
v-model="queryParams.key"
|
||||||
placeholder="请输入流程KEY"
|
placeholder="请输入流程KEY"
|
||||||
clearable
|
clearable
|
||||||
|
maxlength="20"
|
||||||
size="small"
|
size="small"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
|
|
@ -15,6 +16,7 @@
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入名称"
|
||||||
clearable
|
clearable
|
||||||
|
maxlength="50"
|
||||||
size="small"
|
size="small"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
|
|
@ -30,14 +32,14 @@
|
||||||
<at-button type="info" hollow
|
<at-button type="info" hollow
|
||||||
size="smaller"
|
size="smaller"
|
||||||
icon="icon-settings"
|
icon="icon-settings"
|
||||||
v-hasPermi="['activiti:modeler']"
|
v-hasPermi="['activiti:definition']"
|
||||||
@click="OnlineDrawingProcess" >在线绘制流程</at-button>
|
@click="OnlineDrawingProcess" >在线绘制流程</at-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<at-button type="info" hollow
|
<at-button type="info" hollow
|
||||||
size="smaller"
|
size="smaller"
|
||||||
icon="icon-arrow-up"
|
icon="icon-arrow-up"
|
||||||
v-hasPermi="['activiti:modeler']"
|
v-hasPermi="['activiti:definition']"
|
||||||
@click="handleImport" >部署流程</at-button>
|
@click="handleImport" >部署流程</at-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
@ -67,7 +69,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="OnlineModificationProcess(scope.row)"
|
@click="OnlineModificationProcess(scope.row)"
|
||||||
v-hasPermi="['activiti:modeler']"
|
v-hasPermi="['activiti:definition']"
|
||||||
>查看
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -75,7 +77,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="suspendOrActiveApply(scope.row)"
|
@click="suspendOrActiveApply(scope.row)"
|
||||||
v-hasPermi="['activiti:modeler']"
|
v-hasPermi="['activiti:definition']"
|
||||||
>{{scope.row.suspendState===1?'挂起':'激活'}}
|
>{{scope.row.suspendState===1?'挂起':'激活'}}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
|
@ -84,7 +86,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['activiti:modeler']"
|
v-hasPermi="['activiti:definition']"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,13 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="请假类型" prop="type">
|
<el-form-item label="请假类型" prop="type">
|
||||||
<el-select v-model="queryParams.type" placeholder="请选择请假类型" clearable size="small">
|
<el-select style="width: 150px" v-model="queryParams.type" placeholder="请选择请假类型" clearable size="small"
|
||||||
|
@change="handleQuery">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in typeOptions"
|
v-for="dict in dict.type.activiti_leave_type"
|
||||||
:key="dict.dictValue"
|
:key="dict.value"
|
||||||
:label="dict.dictLabel"
|
:label="dict.label"
|
||||||
:value="dict.dictValue"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -22,20 +23,17 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="状态" prop="state">
|
<el-form-item label="状态" prop="state">
|
||||||
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable size="small">
|
<el-select style="width: 150px" v-model="queryParams.state" placeholder="请选择状态" clearable size="small"
|
||||||
|
@change="handleQuery">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in stateOptions"
|
v-for="dict in dict.type.activiti_flow_type"
|
||||||
:key="dict.dictValue"
|
:key="dict.value"
|
||||||
:label="dict.dictLabel"
|
:label="dict.label"
|
||||||
:value="dict.dictValue"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="创建者" prop="createBy">-->
|
|
||||||
<!-- <el-select v-model="queryParams.createBy" placeholder="请选择创建者" clearable size="small">-->
|
|
||||||
<!-- <el-option label="请选择字典生成" value="" />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
|
@ -68,37 +66,35 @@
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="leaveList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="leaveList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
|
<el-table-column label="请假类型" align="center" prop="type" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="请假类型" align="center" prop="type" :formatter="typeFormat"/>
|
|
||||||
<el-table-column label="标题" align="center" prop="title"/>
|
|
||||||
<el-table-column label="原因" align="center" prop="reason"/>
|
|
||||||
<el-table-column label="开始时间" align="center" prop="leaveStartTime" width="180">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.leaveStartTime, '{y}-{m}-{d}') }}</span>
|
<dict-tag :options="dict.type.activiti_leave_type" :value="scope.row.type"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="结束时间" align="center" prop="leaveEndTime" width="180">
|
<el-table-column label="标题" align="center" prop="title" :show-overflow-tooltip="true"/>
|
||||||
<template slot-scope="scope">
|
<el-table-column label="原因" align="center" prop="reason" :show-overflow-tooltip="true"/>
|
||||||
<span>{{ parseTime(scope.row.leaveEndTime, '{y}-{m}-{d}') }}</span>
|
<el-table-column label="流程进度" align="center" prop="taskName" :show-overflow-tooltip="true"/>
|
||||||
</template>
|
|
||||||
|
<el-table-column label="创建者" align="center" prop="createName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="开始时间" align="center" prop="leaveStartTime" width="180" :show-overflow-tooltip="true">
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束时间" align="center" prop="leaveEndTime" width="180" :show-overflow-tooltip="true">
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="状态" align="center" prop="state" :show-overflow-tooltip="true">
|
||||||
|
|
||||||
<!-- <el-table-column label="状态" align="center" prop="state" :formatter="stateFormat">-->
|
|
||||||
<el-table-column label="状态" align="center">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.state!==0">
|
<dict-tag :options="dict.type.activiti_flow_type" :value="scope.row.state"/>
|
||||||
{{ stateFormat(scope.row) }}
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
{{ scope.row.taskName }}
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="创建者" align="center" prop="createName" />-->
|
<el-table-column label="操作" align="center" width="200px" class-name="small-padding fixed-width" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="2===scope.row.state"
|
<el-button v-if="'2'===scope.row.state"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
|
@ -106,14 +102,7 @@
|
||||||
v-hasPermi="['workflow:leave:edit']"
|
v-hasPermi="['workflow:leave:edit']"
|
||||||
>修改
|
>修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button v-if="1==scope.row.state"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- @click="terminateLeave(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['workflow:leave:edit']"-->
|
|
||||||
<!-- >销假-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -123,7 +112,7 @@
|
||||||
>审批详情
|
>审批详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button v-if="0===scope.row.state"
|
<el-button v-if="'0'===scope.row.state"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
|
@ -162,47 +151,43 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 查看详细信息话框 -->
|
<!-- 查看详细信息话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open2" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open2" width="450px" append-to-body>
|
||||||
<leaveHistoryForm :businessKey="businessKey" v-if="open2"/>
|
<leaveHistoryForm :businessKey="businessKey" v-if="open2"/>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="open2=!open2">关闭</el-button>
|
<el-button @click="open2=!open2">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="530px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="请假类型" prop="type">
|
<el-form-item label="请假类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择请假类型" @change="chooseMedicine">
|
<el-select v-model="form.type" placeholder="请选择请假类型" @change="chooseMedicine" style="width: 150px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in typeOptions"
|
v-for="dict in dict.type.activiti_leave_type"
|
||||||
:key="dict.dictValue"
|
:key="dict.value"
|
||||||
:label="dict.dictLabel"
|
:label="dict.label"
|
||||||
:value="dict.dictValue"
|
:value="dict.value"
|
||||||
></el-option>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标题" prop="title">
|
<el-form-item label="标题" prop="title" style="width: 460px">
|
||||||
<el-input v-model="form.title"/>
|
<el-input v-model="form.title"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="原因" prop="reason">
|
<el-form-item label="原因" prop="reason">
|
||||||
<el-input v-model="form.reason" type="textarea" placeholder="请输入内容"/>
|
<el-input v-model="form.reason" type="textarea" style="width: 380px" placeholder="请输入原因"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="开始时间" prop="leaveStartTime">
|
|
||||||
<el-date-picker clearable size="small" style="width: 200px"
|
<el-form-item label="选择时间" prop="betDateTime">
|
||||||
v-model="form.leaveStartTime"
|
<el-date-picker
|
||||||
type="date"
|
style="width: 380px"
|
||||||
value-format="yyyy-MM-dd"
|
v-model="form.betDateTime"
|
||||||
placeholder="选择开始时间">
|
type="datetimerange"
|
||||||
</el-date-picker>
|
start-placeholder="开始日期"
|
||||||
</el-form-item>
|
end-placeholder="结束日期"
|
||||||
<el-form-item label="结束时间" prop="leaveEndTime">
|
:default-time="['12:00:00']">
|
||||||
<el-date-picker clearable size="small" style="width: 200px"
|
|
||||||
v-model="form.leaveEndTime"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择结束时间">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
@ -229,6 +214,7 @@ import {getDefinitionsByInstanceId} from "@/api/business/workflow/activiti/defin
|
||||||
export default {
|
export default {
|
||||||
name: 'Leave',
|
name: 'Leave',
|
||||||
components: {leaveHistoryForm},
|
components: {leaveHistoryForm},
|
||||||
|
dicts: ['activiti_leave_type', 'activiti_flow_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
modelVisible: false,
|
modelVisible: false,
|
||||||
|
|
@ -275,7 +261,10 @@ export default {
|
||||||
createBy: null
|
createBy: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
//时间日期选择器时间区间
|
||||||
|
betDateTime: []
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
type: [
|
type: [
|
||||||
|
|
@ -287,24 +276,16 @@ export default {
|
||||||
reason: [
|
reason: [
|
||||||
{required: true, message: '原因不能为空', trigger: 'blur'}
|
{required: true, message: '原因不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
leaveStartTime: [
|
betDateTime: [
|
||||||
{required: true, message: '开始时间不能为空', trigger: 'blur'}
|
{required: true, message: '时间不能为空', trigger: 'blur'}
|
||||||
],
|
|
||||||
leaveEndTime: [
|
|
||||||
{required: true, message: '结束时间不能为空', trigger: 'blur'}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getDicts('activiti_leave_type').then(response => {
|
|
||||||
this.typeOptions = response.data
|
|
||||||
})
|
|
||||||
this.getDicts('activiti_flow_type').then(response => {
|
|
||||||
this.stateOptions = response.data
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询请假列表 */
|
/** 查询请假列表 */
|
||||||
getList() {
|
getList() {
|
||||||
|
|
@ -315,14 +296,7 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 请假类型字典翻译
|
|
||||||
typeFormat(row, column) {
|
|
||||||
return this.selectDictLabel(this.typeOptions, row.type)
|
|
||||||
},
|
|
||||||
// 状态字典翻译
|
|
||||||
stateFormat(row, column) {
|
|
||||||
return this.selectDictLabel(this.stateOptions, row.state)
|
|
||||||
},
|
|
||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|
@ -365,17 +339,12 @@ export default {
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.createName = this.$store.getters.nickName
|
this.createName = this.$store.getters.nickName
|
||||||
if (this.$store.getters.name !== "admin") {
|
|
||||||
this.reset()
|
this.reset()
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = '添加请假'
|
this.title = '添加请假'
|
||||||
} else {
|
|
||||||
this.$alert('管理员不能创建流程', '管理员不能创建流程', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset()
|
this.reset()
|
||||||
|
|
@ -407,15 +376,19 @@ export default {
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
||||||
|
this.form.leaveStartTime=this.form.betDateTime[0]
|
||||||
|
this.form.leaveEndTime=this.form.betDateTime[1]
|
||||||
|
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateLeave(this.form).then(response => {
|
updateLeave(this.form).then(response => {
|
||||||
this.msgSuccess('修改成功')
|
this.$Message.success('修改成功')
|
||||||
this.open = false
|
this.open = false
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
addLeave(this.form).then(response => {
|
addLeave(this.form).then(response => {
|
||||||
this.msgSuccess('新增成功')
|
this.$Message.success('新增成功')
|
||||||
this.open = false
|
this.open = false
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
|
|
@ -423,20 +396,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids
|
|
||||||
this.$confirm('是否确认删除请假编号为"' + ids + '"的数据项?', '警告', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(function () {
|
|
||||||
return delLeave(ids)
|
|
||||||
}).then(() => {
|
|
||||||
this.getList()
|
|
||||||
this.msgSuccess('删除成功')
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams
|
const queryParams = this.queryParams
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ import leaveHistoryForm from "./leaveHistoryForm";
|
||||||
import {exportLeave, listLeaveAll} from "@/api/business/workflow/workflow/leave";
|
import {exportLeave, listLeaveAll} from "@/api/business/workflow/workflow/leave";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Leave',
|
name: 'LeaveAll',
|
||||||
components: {leaveHistoryForm},
|
components: {leaveHistoryForm},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ $(function () {
|
||||||
instanceId
|
instanceId
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: localStorage.getItem("VUE_APP_BASE_API")+'/activitiHistory/gethighLine',
|
url: localStorage.getItem("VUE_APP_BASE_API")+'/workflow/activitiHistory/gethighLine',
|
||||||
// url: 'http://localhost:8080/activitiHistory/gethighLine',
|
// url: 'http://localhost:8080/activitiHistory/gethighLine',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
data: param1,
|
data: param1,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.xjs.consts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作流常用常量
|
||||||
|
* @author xiejs
|
||||||
|
* @since 2022-04-18
|
||||||
|
*/
|
||||||
|
public class WorkflowConst {
|
||||||
|
|
||||||
|
public enum WorkflowEnum {
|
||||||
|
ING(0,"进行中"),
|
||||||
|
SUCCESS(1,"成功"),
|
||||||
|
ERROR(2,"失败");
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
WorkflowEnum(Integer code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesc(String desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -8,11 +8,14 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.web.page.TableSupport;
|
import com.ruoyi.common.core.web.page.TableSupport;
|
||||||
import com.ruoyi.common.log.annotation.Log;
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
import com.ruoyi.common.log.enums.BusinessType;
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
import com.xjs.activiti.domain.dto.ProcessDefinitionDTO;
|
import com.xjs.activiti.domain.dto.ProcessDefinitionDTO;
|
||||||
import com.xjs.activiti.service.IProcessDefinitionService;
|
import com.xjs.activiti.service.IProcessDefinitionService;
|
||||||
|
import com.xjs.validation.group.SelectGroup;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
|
@ -36,7 +39,8 @@ public class ProcessDefinitionController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
@ApiOperation("获取流程定义集合")
|
@ApiOperation("获取流程定义集合")
|
||||||
public TableDataInfo list(ProcessDefinitionDTO processDefinition) {
|
@RequiresPermissions("activiti:definition")
|
||||||
|
public TableDataInfo list(@Validated(SelectGroup.class) ProcessDefinitionDTO processDefinition) {
|
||||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||||
return getDataTable(processDefinitionService.selectProcessDefinitionList(processDefinition, pageDomain));
|
return getDataTable(processDefinitionService.selectProcessDefinitionList(processDefinition, pageDomain));
|
||||||
|
|
||||||
|
|
@ -45,6 +49,7 @@ public class ProcessDefinitionController extends BaseController {
|
||||||
|
|
||||||
@GetMapping(value = "/getDefinitions/{instanceId}")
|
@GetMapping(value = "/getDefinitions/{instanceId}")
|
||||||
@ApiOperation("按实例 ID 获取定义")
|
@ApiOperation("按实例 ID 获取定义")
|
||||||
|
@RequiresPermissions("activiti:definition")
|
||||||
public AjaxResult getDefinitionsByInstanceId(@PathVariable("instanceId") String instanceId) {
|
public AjaxResult getDefinitionsByInstanceId(@PathVariable("instanceId") String instanceId) {
|
||||||
return AjaxResult.success(processDefinitionService.getDefinitionsByInstanceId(instanceId));
|
return AjaxResult.success(processDefinitionService.getDefinitionsByInstanceId(instanceId));
|
||||||
}
|
}
|
||||||
|
|
@ -58,6 +63,7 @@ public class ProcessDefinitionController extends BaseController {
|
||||||
@Log(title = "流程定义管理", businessType = BusinessType.DELETE)
|
@Log(title = "流程定义管理", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping(value = "/remove/{deploymentId}")
|
@DeleteMapping(value = "/remove/{deploymentId}")
|
||||||
@ApiOperation("删除流程定义")
|
@ApiOperation("删除流程定义")
|
||||||
|
@RequiresPermissions("activiti:definition")
|
||||||
public AjaxResult delDefinition(@PathVariable("deploymentId") String deploymentId) {
|
public AjaxResult delDefinition(@PathVariable("deploymentId") String deploymentId) {
|
||||||
return toAjax(processDefinitionService.deleteProcessDefinitionById(deploymentId));
|
return toAjax(processDefinitionService.deleteProcessDefinitionById(deploymentId));
|
||||||
}
|
}
|
||||||
|
|
@ -72,6 +78,7 @@ public class ProcessDefinitionController extends BaseController {
|
||||||
@Log(title = "流程定义管理", businessType = BusinessType.IMPORT)
|
@Log(title = "流程定义管理", businessType = BusinessType.IMPORT)
|
||||||
@PostMapping(value = "/uploadStreamAndDeployment")
|
@PostMapping(value = "/uploadStreamAndDeployment")
|
||||||
@ApiOperation("上传并部署流程定义")
|
@ApiOperation("上传并部署流程定义")
|
||||||
|
@RequiresPermissions("activiti:definition")
|
||||||
public AjaxResult uploadStreamAndDeployment(@RequestParam("file") MultipartFile file) throws IOException {
|
public AjaxResult uploadStreamAndDeployment(@RequestParam("file") MultipartFile file) throws IOException {
|
||||||
processDefinitionService.uploadStreamAndDeployment(file);
|
processDefinitionService.uploadStreamAndDeployment(file);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
@ -87,6 +94,7 @@ public class ProcessDefinitionController extends BaseController {
|
||||||
@Log(title = "流程定义管理", businessType = BusinessType.UPDATE)
|
@Log(title = "流程定义管理", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping("/suspendOrActiveApply")
|
@PostMapping("/suspendOrActiveApply")
|
||||||
@ApiOperation("启动挂起流程流程定义")
|
@ApiOperation("启动挂起流程流程定义")
|
||||||
|
@RequiresPermissions("activiti:definition")
|
||||||
public AjaxResult suspendOrActiveApply(@RequestBody ProcessDefinitionDTO processDefinition) {
|
public AjaxResult suspendOrActiveApply(@RequestBody ProcessDefinitionDTO processDefinition) {
|
||||||
processDefinitionService.suspendOrActiveApply(processDefinition.getId(), processDefinition.getSuspendState());
|
processDefinitionService.suspendOrActiveApply(processDefinition.getId(), processDefinition.getSuspendState());
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
@ -102,6 +110,7 @@ public class ProcessDefinitionController extends BaseController {
|
||||||
@Log(title = "流程定义管理", businessType = BusinessType.IMPORT)
|
@Log(title = "流程定义管理", businessType = BusinessType.IMPORT)
|
||||||
@PostMapping(value = "/upload")
|
@PostMapping(value = "/upload")
|
||||||
@ApiOperation("上传流程流程定义")
|
@ApiOperation("上传流程流程定义")
|
||||||
|
@RequiresPermissions("activiti:definition")
|
||||||
public AjaxResult upload(@RequestParam("processFile") MultipartFile multipartFile) throws IOException {
|
public AjaxResult upload(@RequestParam("processFile") MultipartFile multipartFile) throws IOException {
|
||||||
|
|
||||||
if (!multipartFile.isEmpty()) {
|
if (!multipartFile.isEmpty()) {
|
||||||
|
|
@ -121,6 +130,7 @@ public class ProcessDefinitionController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/addDeploymentByString")
|
@PostMapping(value = "/addDeploymentByString")
|
||||||
@ApiOperation("通过stringBPMN添加流程定义")
|
@ApiOperation("通过stringBPMN添加流程定义")
|
||||||
|
@RequiresPermissions("activiti:definition")
|
||||||
public AjaxResult addDeploymentByString(@RequestParam("stringBPMN") String stringBPMN) {
|
public AjaxResult addDeploymentByString(@RequestParam("stringBPMN") String stringBPMN) {
|
||||||
processDefinitionService.addDeploymentByString(stringBPMN);
|
processDefinitionService.addDeploymentByString(stringBPMN);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package com.xjs.activiti.domain.dto;
|
package com.xjs.activiti.domain.dto;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
import com.xjs.activiti.domain.vo.ActReDeploymentVO;
|
import com.xjs.activiti.domain.vo.ActReDeploymentVO;
|
||||||
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityImpl;
|
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityImpl;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -19,15 +19,36 @@ public class ProcessDefinitionDTO extends BaseEntity {
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程名称
|
||||||
|
*/
|
||||||
|
@Size(min = 1, max = 50, message = "流程名称不能超过 50 个字符")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程key
|
||||||
|
*/
|
||||||
|
@Size(min = 1, max = 20, message = "流程key不能超过 20 个字符")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程版本号
|
||||||
|
*/
|
||||||
private int version;
|
private int version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部署id
|
||||||
|
*/
|
||||||
private String deploymentId;
|
private String deploymentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源名称
|
||||||
|
*/
|
||||||
private String resourceName;
|
private String resourceName;
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
|
/**
|
||||||
|
* 部署时间
|
||||||
|
*/
|
||||||
private Date deploymentTime;
|
private Date deploymentTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.xjs.workflow.leave.domain;
|
package com.xjs.workflow.leave.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|
@ -43,14 +42,12 @@ public class WorkflowLeave extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 开始时间
|
* 开始时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date leaveStartTime;
|
private Date leaveStartTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 结束时间
|
* 结束时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date leaveEndTime;
|
private Date leaveEndTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public interface WorkflowLeaveMapper {
|
||||||
* @param workflowLeave 请假
|
* @param workflowLeave 请假
|
||||||
* @return 请假集合
|
* @return 请假集合
|
||||||
*/
|
*/
|
||||||
public List<WorkflowLeave> selectWorkflowLeaveList(WorkflowLeave workflowLeave);
|
List<WorkflowLeave> selectWorkflowLeaveList(WorkflowLeave workflowLeave);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -51,7 +51,7 @@ public interface WorkflowLeaveMapper {
|
||||||
* @param workflowLeave 请假
|
* @param workflowLeave 请假
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertWorkflowLeave(WorkflowLeave workflowLeave);
|
int insertWorkflowLeave(WorkflowLeave workflowLeave);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改请假
|
* 修改请假
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.xjs.workflow.leave.service.impl;
|
package com.xjs.workflow.leave.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.ruoyi.common.core.text.UUID;
|
import com.ruoyi.common.core.text.UUID;
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
import com.ruoyi.common.core.utils.DateUtils;
|
||||||
import com.ruoyi.common.core.utils.StringUtils;
|
import com.ruoyi.common.core.utils.StringUtils;
|
||||||
|
|
@ -8,18 +9,22 @@ import com.ruoyi.system.api.RemoteUserService;
|
||||||
import com.xjs.workflow.leave.domain.WorkflowLeave;
|
import com.xjs.workflow.leave.domain.WorkflowLeave;
|
||||||
import com.xjs.workflow.leave.mapper.WorkflowLeaveMapper;
|
import com.xjs.workflow.leave.mapper.WorkflowLeaveMapper;
|
||||||
import com.xjs.workflow.leave.service.IWorkflowLeaveService;
|
import com.xjs.workflow.leave.service.IWorkflowLeaveService;
|
||||||
import org.activiti.api.process.model.ProcessInstance;
|
|
||||||
import org.activiti.api.process.model.builders.ProcessPayloadBuilder;
|
|
||||||
import org.activiti.api.process.runtime.ProcessRuntime;
|
import org.activiti.api.process.runtime.ProcessRuntime;
|
||||||
|
import org.activiti.engine.RuntimeService;
|
||||||
import org.activiti.engine.TaskService;
|
import org.activiti.engine.TaskService;
|
||||||
|
import org.activiti.engine.runtime.ProcessInstance;
|
||||||
import org.activiti.engine.task.Task;
|
import org.activiti.engine.task.Task;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.xjs.consts.WorkflowConst.WorkflowEnum.ING;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请假Service业务层处理
|
* 请假Service业务层处理
|
||||||
*
|
*
|
||||||
|
|
@ -31,8 +36,11 @@ public class WorkflowLeaveServiceImpl implements IWorkflowLeaveService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private WorkflowLeaveMapper workflowLeaveMapper;
|
private WorkflowLeaveMapper workflowLeaveMapper;
|
||||||
|
//7.0的需要整合springSercuity
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProcessRuntime processRuntime;
|
private ProcessRuntime processRuntime;
|
||||||
|
@Autowired
|
||||||
|
private RuntimeService runtimeService;
|
||||||
@Resource
|
@Resource
|
||||||
private RemoteUserService remoteUserService;
|
private RemoteUserService remoteUserService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -71,7 +79,7 @@ public class WorkflowLeaveServiceImpl implements IWorkflowLeaveService {
|
||||||
public List<WorkflowLeave> selectWorkflowLeaveAndTaskNameList(WorkflowLeave workflowLeave) {
|
public List<WorkflowLeave> selectWorkflowLeaveAndTaskNameList(WorkflowLeave workflowLeave) {
|
||||||
List<WorkflowLeave> workflowLeaves = workflowLeaveMapper.selectWorkflowLeaveList(workflowLeave);
|
List<WorkflowLeave> workflowLeaves = workflowLeaveMapper.selectWorkflowLeaveList(workflowLeave);
|
||||||
List<String> collect = workflowLeaves.parallelStream().map(WorkflowLeave::getInstanceId).collect(Collectors.toList());
|
List<String> collect = workflowLeaves.parallelStream().map(WorkflowLeave::getInstanceId).collect(Collectors.toList());
|
||||||
if (collect != null && !collect.isEmpty()) {
|
if (CollUtil.isNotEmpty(collect)) {
|
||||||
List<Task> tasks = taskService.createTaskQuery().processInstanceIdIn(collect).list();
|
List<Task> tasks = taskService.createTaskQuery().processInstanceIdIn(collect).list();
|
||||||
workflowLeaves.forEach(
|
workflowLeaves.forEach(
|
||||||
wl -> {
|
wl -> {
|
||||||
|
|
@ -93,20 +101,22 @@ public class WorkflowLeaveServiceImpl implements IWorkflowLeaveService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertWorkflowLeave(WorkflowLeave workflowLeave) {
|
public int insertWorkflowLeave(WorkflowLeave workflowLeave) {
|
||||||
|
|
||||||
String id = UUID.randomUUID().toString();
|
String id = UUID.randomUUID().toString();
|
||||||
workflowLeave.setId(id);
|
workflowLeave.setId(id);
|
||||||
workflowLeave.setCreateTime(DateUtils.getNowDate());
|
workflowLeave.setCreateTime(DateUtils.getNowDate());
|
||||||
String join = StringUtils.join(remoteUserService.selectUserNameByPostCodeAndDeptId("se", SecurityUtils.getLoginUser().getSysUser().getDeptId()), ",");
|
String join = StringUtils.join(remoteUserService.selectUserNameByPostCodeAndDeptId("se", SecurityUtils.getLoginUser().getSysUser().getDeptId()), ",");
|
||||||
ProcessInstance processInstance = processRuntime.start(ProcessPayloadBuilder
|
|
||||||
.start()
|
Map<String, Object> map = new HashMap<>();
|
||||||
.withProcessDefinitionKey("leave")
|
map.put("deptLeader", join);
|
||||||
.withName(workflowLeave.getTitle())
|
ProcessInstance processInstance = runtimeService.createProcessInstanceBuilder()
|
||||||
.withBusinessKey(id)
|
.variables(map)
|
||||||
.withVariable("deptLeader", join)
|
.processDefinitionKey("leave")
|
||||||
.build());
|
.businessKey(id)
|
||||||
|
.name(workflowLeave.getTitle())
|
||||||
|
.start();
|
||||||
|
|
||||||
workflowLeave.setInstanceId(processInstance.getId());
|
workflowLeave.setInstanceId(processInstance.getId());
|
||||||
workflowLeave.setState("0");
|
workflowLeave.setState(String.valueOf(ING.getCode()));
|
||||||
workflowLeave.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
workflowLeave.setCreateName(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||||
workflowLeave.setCreateBy(SecurityUtils.getUsername());
|
workflowLeave.setCreateBy(SecurityUtils.getUsername());
|
||||||
workflowLeave.setCreateTime(DateUtils.getNowDate());
|
workflowLeave.setCreateTime(DateUtils.getNowDate());
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,16 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE configuration
|
<!DOCTYPE configuration
|
||||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||||
<configuration>
|
<configuration>
|
||||||
|
|
||||||
<settings>
|
<settings>
|
||||||
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
|
<setting name="cacheEnabled" value="true"/> <!-- 全局映射器启用缓存 -->
|
||||||
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
|
<setting name="useGeneratedKeys" value="true"/> <!-- 允许 JDBC 支持自动生成主键 -->
|
||||||
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
|
<setting name="defaultExecutorType" value="REUSE"/> <!-- 配置默认的执行器 -->
|
||||||
<setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
|
<setting name="logImpl" value="STDOUT_LOGGING"/> <!-- 指定 MyBatis 所用日志的具体实现 -->
|
||||||
|
<!--SLF4J、Apache Commons Logging、Log4j 2、Log4j、JDK logging-->
|
||||||
|
|
||||||
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
|
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
|
||||||
</settings>
|
</settings>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
商品检索页面地址:http://localhost:9981/
|
||||||
|
|
||||||
Loading…
Reference in New Issue