commit
This commit is contained in:
+64
@@ -0,0 +1,64 @@
|
|||||||
|
package com.budwk.app.flow.handler;
|
||||||
|
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
|
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||||
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
|
import com.budwk.app.flow.engine.model.TaskModel;
|
||||||
|
import org.nutz.dao.Dao;
|
||||||
|
import org.nutz.dao.Sqls;
|
||||||
|
import org.nutz.dao.sql.Sql;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校工会福利管理员参与者处理类。
|
||||||
|
*/
|
||||||
|
public class FlowSchoolUnionWelfareAdminAssignmentHandler implements AssignmentHandler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据校工会福利管理员角色查询流程任务参与者。
|
||||||
|
*
|
||||||
|
* @param model 当前任务模型
|
||||||
|
* @param execution 当前流程执行上下文
|
||||||
|
* @return 校工会福利管理员用户ID列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<String> assign(TaskModel model, Execution execution) {
|
||||||
|
Dao dao = ServiceContext.find(Dao.class);
|
||||||
|
Sql sql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
userRole.userId
|
||||||
|
FROM
|
||||||
|
`sys_user_role` userRole
|
||||||
|
LEFT JOIN sys_role role ON role.id = userRole.roleId
|
||||||
|
WHERE
|
||||||
|
role.`code` = @roleCode
|
||||||
|
GROUP BY
|
||||||
|
userRole.userId
|
||||||
|
""").setParam("roleCode", RoleConstant.SCHOOL_UNION_WELFARE_ADMIN.name());
|
||||||
|
sql.setCallback(Sqls.callback.strList());
|
||||||
|
dao.execute(sql);
|
||||||
|
return sql.getList(String.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回流程设计器下拉框显示名称。
|
||||||
|
*
|
||||||
|
* @return 处理类显示名称
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return "获取校工会福利管理员";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回流程设计器下拉框排序值。
|
||||||
|
*
|
||||||
|
* @return 处理类排序值
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int getOrder() {
|
||||||
|
return AssignmentHandler.super.getOrder();
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
-1
@@ -242,6 +242,7 @@ public class CondolenceServiceImpl extends BaseServiceImpl<Condolence> implement
|
|||||||
|
|
||||||
List<ProcessTaskVO> doneTaskVos = getDoneTaskVos(info.getLong("instanceId"));
|
List<ProcessTaskVO> doneTaskVos = getDoneTaskVos(info.getLong("instanceId"));
|
||||||
putApprovalSign(docData, doneTaskVos, "分工会审核", "branchChairmanSign", "branchChairmanSignTime", "branchChairmanTime", "分工会主席填写时间");
|
putApprovalSign(docData, doneTaskVos, "分工会审核", "branchChairmanSign", "branchChairmanSignTime", "branchChairmanTime", "分工会主席填写时间");
|
||||||
|
putApprovalSign(docData, doneTaskVos, "校工会预审", new String[]{"schoolPrincipalSign", "principalSign"}, "schoolPrincipalSignTime", "schoolPrincipalTime", "校工会预审填写时间");
|
||||||
putApprovalSign(docData, doneTaskVos, "校工会审核", "unionChairmanSign", "unionChairmanSignTime", "unionChairmanTime", "工会主席填写时间");
|
putApprovalSign(docData, doneTaskVos, "校工会审核", "unionChairmanSign", "unionChairmanSignTime", "unionChairmanTime", "工会主席填写时间");
|
||||||
|
|
||||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||||
@@ -395,6 +396,13 @@ public class CondolenceServiceImpl extends BaseServiceImpl<Condolence> implement
|
|||||||
* 将指定审批节点最近一次签字和填写时间放入模板字段。
|
* 将指定审批节点最近一次签字和填写时间放入模板字段。
|
||||||
*/
|
*/
|
||||||
private void putApprovalSign(Map<String, Object> docData, List<ProcessTaskVO> doneTaskVos, String taskName, String templateField, String... timeFields) {
|
private void putApprovalSign(Map<String, Object> docData, List<ProcessTaskVO> doneTaskVos, String taskName, String templateField, String... timeFields) {
|
||||||
|
putApprovalSign(docData, doneTaskVos, taskName, new String[]{templateField}, timeFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将指定审批节点最近一次签字写入多个模板字段,兼容不同模板占位符命名。
|
||||||
|
*/
|
||||||
|
private void putApprovalSign(Map<String, Object> docData, List<ProcessTaskVO> doneTaskVos, String taskName, String[] templateFields, String... timeFields) {
|
||||||
doneTaskVos.stream()
|
doneTaskVos.stream()
|
||||||
.filter(task -> taskName.equals(task.getDisplayName()))
|
.filter(task -> taskName.equals(task.getDisplayName()))
|
||||||
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
|
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
|
||||||
@@ -412,7 +420,7 @@ public class CondolenceServiceImpl extends BaseServiceImpl<Condolence> implement
|
|||||||
sign = taskFormData.getStr("tf_sign");
|
sign = taskFormData.getStr("tf_sign");
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotBlank(sign)) {
|
if (StrUtil.isNotBlank(sign)) {
|
||||||
putPictureRenderData(docData, sign, templateField);
|
putPictureRenderData(docData, sign, templateFields);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-15
@@ -146,22 +146,27 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleTaskAction(val) {
|
handleTaskAction(val) {
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
this.$refs.formRef.validate((valid) => {
|
||||||
confirmButtonText: "确定",
|
if (!valid) {
|
||||||
cancelButtonText: "取消",
|
return
|
||||||
type: "warning"
|
}
|
||||||
}).then(() => {
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
confirmButtonText: "确定",
|
||||||
data: JSON.stringify({
|
cancelButtonText: "取消",
|
||||||
...this.formData,
|
type: "warning"
|
||||||
submitType: val
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
|
})
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$refs.guava.index()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$refs.guava.index()
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.doSearch()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -68,6 +68,12 @@ const condolenceInfo = {
|
|||||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||||
task.taskFormData.opinion }}
|
task.taskFormData.opinion }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="签字" :span="3" v-if="!task.ext.isFirstTaskNode">
|
||||||
|
<el-image :src="task.ext.tf_userSign"
|
||||||
|
v-if="task.ext.tf_userSign"
|
||||||
|
class="signature-image"></el-image>
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
+26
-16
@@ -101,6 +101,10 @@ layout("/layouts/platform.html"){
|
|||||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="电子签名" prop="tf_userSign"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end">
|
<el-row type="flex" justify="end">
|
||||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||||
@@ -158,28 +162,34 @@ layout("/layouts/platform.html"){
|
|||||||
this.showApprovalForm = true
|
this.showApprovalForm = true
|
||||||
this.formData = {
|
this.formData = {
|
||||||
processTaskId: row.taskId,
|
processTaskId: row.taskId,
|
||||||
taskName: row.curTaskName
|
taskName: row.curTaskName,
|
||||||
|
tf_userSign: null
|
||||||
}
|
}
|
||||||
this.$refs.condolenceInfoRef.onOpen(row)
|
this.$refs.condolenceInfoRef.onOpen(row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleTaskAction(val) {
|
handleTaskAction(val) {
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
this.$refs.formRef.validate((valid) => {
|
||||||
confirmButtonText: "确定",
|
if (!valid) {
|
||||||
cancelButtonText: "取消",
|
return
|
||||||
type: "warning"
|
}
|
||||||
}).then(() => {
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
confirmButtonText: "确定",
|
||||||
data: JSON.stringify({
|
cancelButtonText: "取消",
|
||||||
...this.formData,
|
type: "warning"
|
||||||
submitType: val
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
|
})
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$refs.guava.index()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$refs.guava.index()
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.doSearch()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+20
-15
@@ -169,22 +169,27 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleTaskAction(val) {
|
handleTaskAction(val) {
|
||||||
this.$confirm("您确定要提交吗?", "提示", {
|
this.$refs.formRef.validate((valid) => {
|
||||||
confirmButtonText: "确定",
|
if (!valid) {
|
||||||
cancelButtonText: "取消",
|
return
|
||||||
type: "warning"
|
}
|
||||||
}).then(() => {
|
this.$confirm("您确定要提交吗?", "提示", {
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
confirmButtonText: "确定",
|
||||||
data: JSON.stringify({
|
cancelButtonText: "取消",
|
||||||
...this.formData,
|
type: "warning"
|
||||||
submitType: val
|
}).then(() => {
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
|
})
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$refs.guava.index()
|
||||||
|
this.$message.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}).then((res) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$refs.guava.index()
|
|
||||||
this.$message.success(res.msg)
|
|
||||||
this.doSearch()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ const condolenceInfo = {
|
|||||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
|
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
|
||||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
|
<van-cell title="签字" v-if="!task.ext.isFirstTaskNode">
|
||||||
|
<van-image :src="task.ext.tf_userSign"
|
||||||
|
v-if="task.ext.tf_userSign"
|
||||||
|
class="signature-image"></van-image>
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</van-cell>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+13
-1
@@ -70,6 +70,17 @@ layout("/layouts/platform_h5.html"){
|
|||||||
maxlength="100"
|
maxlength="100"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></van-field>
|
></van-field>
|
||||||
|
<van-field
|
||||||
|
class="more-text"
|
||||||
|
name="tf_userSign"
|
||||||
|
label="电子签名"
|
||||||
|
:rules="[{ required: true, message: '请签字' }]"
|
||||||
|
required
|
||||||
|
>
|
||||||
|
<template #input>
|
||||||
|
<h5-signature v-model="formData.tf_userSign"></h5-signature>
|
||||||
|
</template>
|
||||||
|
</van-field>
|
||||||
</van-form>
|
</van-form>
|
||||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||||
@@ -128,7 +139,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$refs.infoRef.onOpen(row)
|
this.$refs.infoRef.onOpen(row)
|
||||||
this.formData = {
|
this.formData = {
|
||||||
processTaskId: row.taskId,
|
processTaskId: row.taskId,
|
||||||
taskName: row.curTaskName
|
taskName: row.curTaskName,
|
||||||
|
tf_userSign: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async handleTaskAction(val) {
|
async handleTaskAction(val) {
|
||||||
|
|||||||
Reference in New Issue
Block a user