入职离职工作流基础架构搭建

This commit is contained in:
2025-02-24 18:48:42 +08:00
parent 46d601745f
commit f229565c36
7 changed files with 89 additions and 43 deletions

View File

@@ -221,6 +221,15 @@ public class WfProcessController extends BaseController {
return R.ok("流程启动成功",procInsId);
}
/**
* 根据流程定义id启动流程实例
*
*/
@PostMapping("/commonStart/{category}")
public R<String> startDemo(@PathVariable("category") String category) {
return R.ok("流程启动成功",processService.commonStart(category));
}
/**
* 删除流程实例
*

View File

@@ -48,7 +48,6 @@ public class SysOaHolidayController extends BaseController {
/**
* 查询休假管理列表
*/
@SaCheckPermission("oa:oaHoliday:list")
@GetMapping("/list")
public TableDataInfo<SysOaHolidayVo> list(SysOaHolidayBo bo, PageQuery pageQuery) {
return iSysOaHolidayService.queryPageList(bo, pageQuery);
@@ -57,7 +56,6 @@ public class SysOaHolidayController extends BaseController {
/**
* 导出休假管理列表
*/
@SaCheckPermission("oa:oaHoliday:export")
@Log(title = "休假管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(SysOaHolidayBo bo, HttpServletResponse response) {
@@ -70,7 +68,6 @@ public class SysOaHolidayController extends BaseController {
*
* @param holidayId 主键
*/
@SaCheckPermission("oa:oaHoliday:query")
@GetMapping("/{holidayId}")
public R<SysOaHolidayVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long holidayId) {
@@ -80,7 +77,6 @@ public class SysOaHolidayController extends BaseController {
/**
* 新增休假管理
*/
@SaCheckPermission("oa:oaHoliday:add")
@Log(title = "休假管理", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
@@ -91,7 +87,6 @@ public class SysOaHolidayController extends BaseController {
/**
* 修改休假管理
*/
@SaCheckPermission("oa:oaHoliday:edit")
@Log(title = "休假管理", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping()
@@ -104,7 +99,6 @@ public class SysOaHolidayController extends BaseController {
*
* @param holidayIds 主键串
*/
@SaCheckPermission("oa:oaHoliday:remove")
@Log(title = "休假管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{holidayIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空")

View File

@@ -122,4 +122,12 @@ public interface IWfProcessService {
* @return
*/
String startClaim(Map<String, Object> variables);
/**
* 根据模型分类启动不同模型
* @param category
* @return
*/
String commonStart(String category);
}

View File

@@ -644,6 +644,27 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
}
}
/**
* 根据分类启动不同模型
* @param category
* @return
*/
@Override
public String commonStart(String category) {
try {
List<ProcessDefinition> processDefinition = repositoryService.createProcessDefinitionQuery()
.processDefinitionCategory(category).list();
// 传个空参进去,不破坏其他模型
Map<String, Object> variables = new HashMap<String, Object>();
// 拿到最新版本的模型
return startProcess(processDefinition.get(processDefinition.size()-1), variables);
} catch (Exception e) {
e.printStackTrace();
throw new ServiceException("流程启动错误");
}
}
/**
* 通过DefinitionKey启动流程
* @param procDefKey 流程定义Key

View File

@@ -25,7 +25,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['system:offboarding:add']"
>新增</el-button>
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -36,7 +37,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:offboarding:edit']"
>修改</el-button>
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -47,7 +49,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:offboarding:remove']"
>删除</el-button>
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -57,15 +60,16 @@
size="mini"
@click="handleExport"
v-hasPermi="['system:offboarding:export']"
>导出</el-button>
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="offboardingList" @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="序号" align="center" type="index"/>
<el-table-column label="姓名" align="center" prop="nickName" />
<el-table-column label="姓名" align="center" prop="nickName"/>
<el-table-column label="离职日期" align="center" prop="resignationDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.resignationDate, '{y}-{m}-{d}') }}</span>
@@ -73,32 +77,42 @@
</el-table-column>
<el-table-column label="离职面谈" align="center" prop="exitInterview">
<template slot-scope="scope">
<el-tag :type="scope.row.exitInterview===1?'success':'warning'">{{ scope.row.exitInterview===1?'完成':'未完成' }}</el-tag>
<el-tag :type="scope.row.exitInterview===1?'success':'warning'">
{{ scope.row.exitInterview === 1 ? '完成' : '未完成' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="工作交接" align="center" prop="handoverCompleted">
<template slot-scope="scope">
<el-tag :type="scope.row.handoverCompleted===1?'success':'warning'">{{ scope.row.handoverCompleted===1?'完成':'未完成' }}</el-tag>
<el-tag :type="scope.row.handoverCompleted===1?'success':'warning'">
{{ scope.row.handoverCompleted === 1 ? '完成' : '未完成' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="离职原因" align="center" prop="exitReason" />
<el-table-column label="最终工资" align="center" prop="finalSalary" />
<el-table-column label="离职原因" align="center" prop="exitReason"/>
<el-table-column label="最终工资" align="center" prop="finalSalary"/>
<el-table-column label="离职申请书" align="center" prop="resignationApplicationSubmitted">
<template slot-scope="scope">
<el-tag :type="scope.row.resignationApplicationSubmitted===1?'success':'warning'">{{ scope.row.resignationApplicationSubmitted===1?'已提交':'未提交' }}</el-tag>
<el-tag :type="scope.row.resignationApplicationSubmitted===1?'success':'warning'">
{{ scope.row.resignationApplicationSubmitted === 1 ? '已提交' : '未提交' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="离职证明" align="center" prop="exitCertificateIssued">
<template slot-scope="scope">
<el-tag :type="scope.row.exitCertificateIssued===1?'success':'warning'">{{ scope.row.exitCertificateIssued===1?'已开据':'未开据' }}</el-tag>
<el-tag :type="scope.row.exitCertificateIssued===1?'success':'warning'">
{{ scope.row.exitCertificateIssued === 1 ? '已开据' : '未开据' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="离职状态" align="center" prop="offboardingConfirmed">
<template slot-scope="scope">
<el-tag :type="scope.row.exitCertificateIssued===1?'success':'warning'">{{ scope.row.exitCertificateIssued===1?'已离职':'手续未完善' }}</el-tag>
<el-tag :type="scope.row.exitCertificateIssued===1?'success':'warning'">
{{ scope.row.exitCertificateIssued === 1 ? '已离职' : '手续未完善' }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
@@ -108,14 +122,16 @@
v-if="scope.row.dataBackupCompleted!==1"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:offboarding:edit']"
>离职跟进</el-button>
>离职跟进
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:offboarding:remove']"
>删除</el-button>
>删除
</el-button>
<el-button
size="mini"
@@ -124,7 +140,8 @@
v-if="scope.row.offboardingConfirmed===1&&scope.row.dataBackupCompleted!==1"
@click="handleClose(scope.row)"
v-hasPermi="['system:offboarding:remove']"
>离职完成</el-button>
>离职完成
</el-button>
</template>
</el-table-column>
</el-table>
@@ -140,7 +157,7 @@
</template>
<script>
import { listOffboarding, getOffboarding, delOffboarding, addOffboarding, updateOffboarding } from "@/api/oa/offboarding";
import {listOffboarding, getOffboarding, delOffboarding, addOffboarding, updateOffboarding} from "@/api/oa/offboarding";
import {delUser} from "@/api/system/user";
export default {
@@ -188,9 +205,7 @@ export default {
// 表单参数
form: {},
// 表单校验
rules: {
}
rules: {}
};
},
created() {
@@ -198,7 +213,7 @@ export default {
},
methods: {
// 操作离职删除oa账号
handleClose(row){
handleClose(row) {
this.$confirm('此操作将永久删除该办公系统账号, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -275,7 +290,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.offboardingId)
this.single = selection.length!==1
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
@@ -284,7 +299,7 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('/people/updateOffboarding/' + row.offboardingId);
this.$router.push('/people/updateOffboarding/' + row.offboardingId);
},
/** 提交按钮 */
submitForm() {

View File

@@ -20,7 +20,7 @@
<div class="">
<div class="">
<el-row :gutter="15" style="margin:0px 30px">
<el-form ref="form" :model="form" :rules="rules">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-col :span="12">
<el-form-item label="姓名" required >
<el-input v-model="form.nickName" placeholder="请输入姓名" />
@@ -124,7 +124,7 @@
<el-tabs>
<el-tab-pane label="扩展信息">
<div class="grid grid-cols-3 gap-6">
<el-form ref="form" :model="form" :rules="rules">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row :gutter="18">
<el-col span="8">
<el-form-item label="婚姻状况">
@@ -165,20 +165,22 @@
</div>
</el-tab-pane>
<el-tab-pane label="户籍信息">
<el-form ref="form" :model="form" :rules="rules">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="家庭住址">
<el-input v-model="form.address" placeholder="请输入家庭住址" />
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="紧急联系人">
<el-form ref="form" :model="form" :rules="rules">
<el-form-item label="紧急联系人1">
<el-input v-model="form.emergencyContact1" placeholder="请输入紧急联系人手机号" />
</el-form-item>
<el-form-item label="紧急联系人2">
<el-input v-model="form.emergencyContact2" placeholder="请输入紧急联系人手机号" />
</el-form-item>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-col span="8">
<el-form-item label="紧急联系人1">
<el-input v-model="form.emergencyContact1" placeholder="请输入紧急联系人手机号" />
</el-form-item>
<el-form-item label="紧急联系人2">
<el-input v-model="form.emergencyContact2" placeholder="请输入紧急联系人手机号" />
</el-form-item>
</el-col>
</el-form>
</el-tab-pane>
<el-tab-pane label="其他">

View File

@@ -29,16 +29,13 @@
<el-button icon="el-icon-circle-check" type="success" @click="handleComplete">通过</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-button icon="el-icon-chat-line-square" type="primary" @click="handleDelegate">委派</el-button>-->
</el-col>
<el-col :span="1.5">
<!-- <el-button icon="el-icon-thumb" type="success" @click="handleTransfer">转办</el-button>-->
</el-col>
<el-col :span="1.5">
<el-button icon="el-icon-refresh-left" type="warning" @click="handleReturn">退回</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-button icon="el-icon-circle-close" type="danger" @click="handleReject">拒绝</el-button>-->
</el-col>
</el-row>
</el-card>