commit
This commit is contained in:
@@ -66,6 +66,7 @@ RoleConstant {
|
||||
PROPOSAL_BRANCH_SCHOOL_LEADER("提案分管校领导"),
|
||||
PROPOSAL_UNIT_LEADER("提案承办单位领导"),
|
||||
PROPOSAL_UNIT_PROXY("提案承办单位代理答复人"),
|
||||
PROPOSAL_PERSONNEL_OFFICE_ADMIN("提案人事处管理员"),
|
||||
|
||||
WORKER_CONGRESS_DELEGATE_FORMAL("工代会正式代表"),
|
||||
WORKER_CONGRESS_DELEGATE_ATTENDANCE("工代会列席代表"),
|
||||
|
||||
@@ -2,18 +2,32 @@ package com.budwk.app.flow.service;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.engine.event.ProcessEvent;
|
||||
import com.budwk.app.flow.engine.event.ProcessPublisher;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.*;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
public class FlowCommonService {
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
/**
|
||||
* 执行任务
|
||||
@@ -65,4 +79,42 @@ public class FlowCommonService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result revokeTask(Long taskId) {
|
||||
// 自己任务
|
||||
ProcessTask selfTask = dao.fetch(ProcessTask.class, taskId);
|
||||
selfTask.setTaskState(ProcessTaskStateEnum.DOING.getCode());
|
||||
|
||||
// 撤销任务
|
||||
List<ProcessTask> taskList = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getTaskParentId, "=", taskId));
|
||||
for (ProcessTask task : taskList) {
|
||||
task.setTaskState(ProcessTaskStateEnum.WITHDRAW.getCode());
|
||||
dao.update(task);
|
||||
}
|
||||
// 会签并行任务 撤销后续任务
|
||||
if (selfTask.getPerformType().equals(ProcessTaskPerformTypeEnum.COUNTERSIGN.getCode())) {
|
||||
List<ProcessTask> doingTasks = dao.query(ProcessTask.class, Cnd.where(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.DOING.getCode())
|
||||
.and(ProcessTask::getProcessInstanceId, "=", selfTask.getProcessInstanceId()));
|
||||
for (ProcessTask doingTask : doingTasks) {
|
||||
doingTask.setTaskState(ProcessTaskStateEnum.WITHDRAW.getCode());
|
||||
dao.update(doingTask);
|
||||
}
|
||||
}
|
||||
|
||||
// 激活
|
||||
dao.update(selfTask);
|
||||
|
||||
// 流程激活
|
||||
dao.update(ProcessInstance.class, Chain.make("state", ProcessInstanceStateEnum.DOING.getCode()),Cnd.where(ProcessInstance::getId, "=", selfTask.getProcessInstanceId()));
|
||||
|
||||
// 发送任务撤回事件 确保上面执行成功
|
||||
for (ProcessTask task : taskList) {
|
||||
ProcessPublisher.notify(ProcessEvent.builder().eventType(ProcessEventTypeEnum.PROCESS_TASK_REVOKE).sourceId(task.getId()).build());
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -211,4 +211,13 @@ public interface ProcessTaskService extends BaseService<ProcessTask> {
|
||||
*/
|
||||
List<ProcessTask> getDoingTaskByBizIdTaskName(List<String> bizIds, String taskName);
|
||||
|
||||
/**
|
||||
* 获取已结束的任务
|
||||
*
|
||||
* @param bizIds 业务ID
|
||||
* @param taskName 任务名称
|
||||
* @return
|
||||
*/
|
||||
List<ProcessTask> getDoneTaskByBizIdTaskName(List<String> bizIds, String taskName);
|
||||
|
||||
}
|
||||
|
||||
@@ -490,6 +490,16 @@ public class ProcessTaskServiceImpl extends BaseServiceImpl<ProcessTask> impleme
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ProcessTask> getDoneTaskByBizIdTaskName(List<String> bizIds, String taskName) {
|
||||
List<ProcessInstance> instances = dao().query(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", bizIds));
|
||||
List<Long> instanceIds = instances.stream().map(ProcessInstance::getId).toList();
|
||||
List<ProcessTask> tasks = dao().query(ProcessTask.class, Cnd.where(ProcessTask::getProcessInstanceId, "in", instanceIds)
|
||||
.and(ProcessTask::getTaskName, "=", taskName)
|
||||
.and(ProcessTask::getTaskState, "=", ProcessTaskStateEnum.FINISHED.getCode()));
|
||||
return tasks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProcessTask> getDoingTaskByBizIdTaskName(List<String> bizIds, String taskName) {
|
||||
List<ProcessInstance> instances = dao().query(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", bizIds));
|
||||
|
||||
+18
-17
@@ -36,7 +36,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2025/6/23 15:25
|
||||
* @description 分工会二次推选
|
||||
* @description 候选人录入
|
||||
*/
|
||||
@At("/platform/executiveCommittee/delegationTwoPush")
|
||||
@Ok("json:full")
|
||||
@@ -62,7 +62,8 @@ public class ExecutiveCommitteeDelegationTwoPushController {
|
||||
public Result pageData(PageForm pageForm,
|
||||
String teacherMeetId,
|
||||
String delegationId,
|
||||
String unionId) {
|
||||
String unionId,
|
||||
String roleCode) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.*,
|
||||
@@ -86,9 +87,9 @@ public class ExecutiveCommitteeDelegationTwoPushController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("t1.pushUserId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
|
||||
cnd.andEX("t2.delegationId", "=", delegationId);
|
||||
cnd.andEX("t1.roleCode", "=", roleCode);
|
||||
if (StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
|
||||
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()) ||
|
||||
StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
@@ -109,9 +110,9 @@ public class ExecutiveCommitteeDelegationTwoPushController {
|
||||
|
||||
@At
|
||||
@SaCheckPermission("executiveCommittee.delegationTwoPush")
|
||||
@SLog(type = "执委会推选-分工会二次推选", tag = "查询可以二次推选的名单", param = true, result = true)
|
||||
@SLog(type = "执委会推选-候选人录入", tag = "查询可以二次推选的名单", param = true, result = true)
|
||||
public Result getDelegationUser(String teacherMeetId) {
|
||||
if (!(StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
|
||||
/* if (!(StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
|
||||
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()) ||
|
||||
StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()))) {
|
||||
return Result.error("没有权限,只有分工会主席才能推选");
|
||||
@@ -126,10 +127,9 @@ public class ExecutiveCommitteeDelegationTwoPushController {
|
||||
}
|
||||
if (config.getSecondEndTime().getTime() < System.currentTimeMillis()) {
|
||||
return Result.error("二次预选已结束");
|
||||
}
|
||||
}*/
|
||||
List<ExecutiveCommitteeTwoPush> userValue = dao.query(ExecutiveCommitteeTwoPush.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||
.and("pushUserId", "=", SecurityUtil.getUserId()));
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||
List<String> userIds = userValue.stream().map(v -> v.getUserId()).collect(Collectors.toList());
|
||||
|
||||
|
||||
@@ -151,20 +151,20 @@ public class ExecutiveCommitteeDelegationTwoPushController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
|
||||
cnd.andEX("t1.userId", "not in", userIds);
|
||||
cnd.andEX("t1.userId", "!=", SecurityUtil.getUserId());
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> userData = baseService.listMap(sql);
|
||||
return Result.success(Map.of("userData", userData, "userValue", userValue, "committeeQuotaCount", config.getCommitteeQuotaCount()));
|
||||
return Result.success(Map.of("userData", userData, "userValue", userValue, "committeeQuotaCount",0));
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("executiveCommittee.delegationTwoPush")
|
||||
@ApiOperation("推选委员")
|
||||
@SLog(tag = "执委会推选-分工会二次推选", msg = "推选委员")
|
||||
@SLog(tag = "执委会推选-候选人录入", msg = "推选委员")
|
||||
public Result addOnePush(@Param("userValue") String[] userValue,
|
||||
String teacherMeetId) {
|
||||
String teacherMeetId,
|
||||
String roleCode) {
|
||||
try {
|
||||
if (!(StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
|
||||
/* if (!(StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
|
||||
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()) ||
|
||||
StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()))) {
|
||||
return Result.error("没有权限,只有分工会主席才能推选");
|
||||
@@ -187,7 +187,7 @@ public class ExecutiveCommitteeDelegationTwoPushController {
|
||||
if (dbCount + userValue.length > config.getCommitteeQuotaCount()) {
|
||||
return Result.error("推选人数限制" + config.getCommitteeQuotaCount() + "人");
|
||||
}
|
||||
|
||||
*/
|
||||
List<Teacher_congress_delegate> dbList = dao.query(Teacher_congress_delegate.class,
|
||||
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
|
||||
.andEX(Teacher_congress_delegate::getUserId, "in", userValue));
|
||||
@@ -206,6 +206,7 @@ public class ExecutiveCommitteeDelegationTwoPushController {
|
||||
twoPush.setPushUserName(SecurityUtil.getUserUsername());
|
||||
twoPush.setPushLoginName(SecurityUtil.getUserLoginname());
|
||||
twoPush.setTeacherMeetId(teacherMeetId);
|
||||
twoPush.setRoleCode(roleCode);
|
||||
list.add(twoPush);
|
||||
}
|
||||
dao.insert(list);
|
||||
@@ -219,16 +220,16 @@ public class ExecutiveCommitteeDelegationTwoPushController {
|
||||
@At
|
||||
@ApiOperation("删除推选人员")
|
||||
@SaCheckPermission("executiveCommittee.delegationTwoPush")
|
||||
@SLog(tag = "执委会推选-分工会二次推选", msg = "删除推选人员")
|
||||
@SLog(tag = "执委会推选-候选人录入", msg = "删除推选人员")
|
||||
public Result doDelete(@Valid String id, @Valid String teacherMeetId) {
|
||||
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||
if (ObjectUtil.isEmpty(config)) {
|
||||
return Result.error("请先配置基础信息");
|
||||
}
|
||||
if (config.getSecondEndTime().getTime() < System.currentTimeMillis()) {
|
||||
/* if (config.getSecondEndTime().getTime() < System.currentTimeMillis()) {
|
||||
return Result.error("二次预选已结束不能删除!");
|
||||
}
|
||||
}*/
|
||||
int num = dao.clear(ExecutiveCommitteeTwoPush.class, Cnd.where("id", "=", id));
|
||||
return num >= 0 ? Result.success() : Result.error();
|
||||
}
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ public class ExecutiveCommitteeMemberController {
|
||||
entityList.add(new ExcelExportEntity("联系方式", "mobile", 20));
|
||||
entityList.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||
entityList.add(new ExcelExportEntity("所属代表团", "delegationName", 20));
|
||||
entityList.add(new ExcelExportEntity("票数", "pushCount", 20));
|
||||
entityList.add(new ExcelExportEntity("委员类别", "addTypeName", 20));
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("委员会预选名单.xlsx", "UTF-8"));
|
||||
|
||||
+68
-105
@@ -1,21 +1,22 @@
|
||||
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.lang.Validator;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeConfig;
|
||||
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeOnePush;
|
||||
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeTwoPush;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -29,10 +30,8 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
@@ -43,7 +42,7 @@ import java.util.stream.Collectors;
|
||||
@At("/platform/executiveCommittee/preparatoryGroupPush")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
@Api(tags = "执委会推选-筹备组推选")
|
||||
@Api(tags = "执委会推选-正式委员录入")
|
||||
public class ExecutiveCommitteePushController {
|
||||
|
||||
@Inject
|
||||
@@ -63,38 +62,49 @@ public class ExecutiveCommitteePushController {
|
||||
public Result pageData(PageForm pageForm,
|
||||
String teacherMeetId,
|
||||
String delegationId,
|
||||
String unionId) {
|
||||
String unionId,
|
||||
String roleCode) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.name AS unitName,
|
||||
t3.name unionName,
|
||||
t4.sex,
|
||||
t2.loginName,
|
||||
t2.userName,
|
||||
t3.name AS unitName,
|
||||
t4.name unionName,
|
||||
t5.sex,
|
||||
TIMESTAMPDIFF(
|
||||
YEAR,
|
||||
t4.birthday,
|
||||
t5.birthday,
|
||||
CURDATE()) AS age,
|
||||
t5.name AS delegationName
|
||||
t6.name AS delegationName
|
||||
FROM
|
||||
`executive_committee_one_push` t1
|
||||
LEFT JOIN sys_unit t2 ON t1.unitId = t2.id
|
||||
LEFT JOIN `sys_union` t3 ON t3.id = t2.unionid
|
||||
LEFT JOIN `vw_user` t4 ON t4.id = t1.userId
|
||||
LEFT JOIN teacher_congress_delegation t5 ON t5.id = t1.delegationId
|
||||
`executive_committee_two_push` t1
|
||||
LEFT JOIN executive_committee_one_push t2 on t2.userId=t1.userId and t2.teacherMeetId=t1.teacherMeetId
|
||||
LEFT JOIN sys_unit t3 ON t2.unitId = t3.id
|
||||
LEFT JOIN `sys_union` t4 ON t4.id = t3.unionid
|
||||
LEFT JOIN `vw_user` t5 ON t5.id = t1.userId
|
||||
LEFT JOIN teacher_congress_delegation t6 ON t6.id = t2.delegationId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
|
||||
cnd.andEX("t1.delegationId", "=", delegationId);
|
||||
cnd.andEX("t3.id", "=", unionId);
|
||||
cnd.andEX("t1.addType", "=", 2);
|
||||
cnd.andEX("t2.delegationId", "=", delegationId);
|
||||
cnd.andEX("t1.roleCode", "=", roleCode);
|
||||
cnd.andEX("t1.isFormal", "=", true);
|
||||
if (StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
|
||||
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()) ||
|
||||
StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
cnd.andEX("t4.id", "=", unionId);
|
||||
} else {
|
||||
cnd.andEX("t4.id", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("t1.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("t1.loginName", pageForm.getSearchKeyword());
|
||||
group.orLike("t2.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("t2.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
cnd.asc("t5.code").asc("t1.firstLetter");
|
||||
cnd.asc("t6.code").asc("t2.firstLetter");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql));
|
||||
}
|
||||
@@ -104,93 +114,53 @@ public class ExecutiveCommitteePushController {
|
||||
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
|
||||
@ApiOperation("查询可以推选委员和已经推选的人员")
|
||||
public Result getDelegationUser(String teacherMeetId) {
|
||||
List<ExecutiveCommitteeOnePush> userValue = dao.query(ExecutiveCommitteeOnePush.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||
.and("addType", "=", 2));
|
||||
List<ExecutiveCommitteeOnePush> onePushList = dao.query(ExecutiveCommitteeOnePush.class, Cnd.NEW());
|
||||
List<String> userIds = onePushList.stream().map(ExecutiveCommitteeOnePush::getUserId).collect(Collectors.toList());
|
||||
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("db.sessionId", "=", teacherMeetId);
|
||||
cnd.andEX("db.userId", "not in", userIds);
|
||||
cnd.andEX("db.userId", "!=", SecurityUtil.getUserId());
|
||||
List<ExecutiveCommitteeTwoPush> twoPushList = dao.query(ExecutiveCommitteeTwoPush.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId).and(ExecutiveCommitteeTwoPush::getRoleCode, "is not", null));
|
||||
|
||||
List<ExecutiveCommitteeTwoPush> userValue = twoPushList.stream().filter(ExecutiveCommitteeTwoPush::getIsFormal).toList();
|
||||
List<String> userIds = userValue.stream().map(ExecutiveCommitteeTwoPush::getUserId).toList();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
db.*,
|
||||
u.professionalTitle,
|
||||
u.professionalLevel,
|
||||
TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) AS age
|
||||
SELECT
|
||||
t2.id userId,
|
||||
t2.username userName,
|
||||
t2.loginname loginName,
|
||||
t2.unitName,
|
||||
t2.sex,
|
||||
t2.professionalTitle,
|
||||
t2.professionalLevel,
|
||||
t1.roleCode,
|
||||
TIMESTAMPDIFF(
|
||||
YEAR,
|
||||
t2.birthday,
|
||||
CURDATE()) age
|
||||
FROM
|
||||
teacher_congress_delegate db
|
||||
LEFT JOIN `vw_user` u ON db.userId = u.id
|
||||
executive_committee_two_push t1
|
||||
LEFT JOIN `vw_user` t2 ON t1.userId = t2.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
|
||||
cnd.andEX("t1.userId", "not in", userIds);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> userData = baseService.listMap(sql);
|
||||
return Result.success(Map.of("userData", userData, "userValue", userValue,"prepareGroupQuotaCount",config.getPrepareGroupQuotaCount()));
|
||||
return Result.success(Map.of("userData", userData, "userValue", userValue));
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
|
||||
@SLog(tag = "执委会推选-筹备组推选", msg = "推选委员")
|
||||
@SLog(tag = "执委会推选-正式委员录入", msg = "推选委员")
|
||||
public Result addOnePush(@Param("userValue") String[] userValue,
|
||||
String teacherMeetId) {
|
||||
try {
|
||||
|
||||
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||
/* if (ObjectUtil.isEmpty(config)) {
|
||||
return Result.error("请先配置基础信息");
|
||||
if (ObjectUtil.isEmpty(userValue)) {
|
||||
return Result.error("请选择要录入的委员!");
|
||||
}
|
||||
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
|
||||
return Result.error("请等待一次预选开始时间");
|
||||
if (ObjectUtil.isEmpty(teacherMeetId)) {
|
||||
return Result.error("请选择教代会!");
|
||||
}
|
||||
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
|
||||
return Result.error("一次预选已结束");
|
||||
}*/
|
||||
|
||||
int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId)
|
||||
.and("addType", "=", 2));
|
||||
if (dbCount + userValue.length > config.getPrepareGroupQuotaCount()) {
|
||||
return Result.error("推选人数限制" + config.getPrepareGroupQuotaCount() + "人");
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.*
|
||||
FROM
|
||||
teacher_congress_delegate t1
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t1.sessionId", "=", teacherMeetId);
|
||||
cnd.andEX("t1.userId", "in", userValue);
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> dbList = baseService.listMap(sql);
|
||||
|
||||
List<ExecutiveCommitteeOnePush> list = new ArrayList<>();
|
||||
for (String id : userValue) {
|
||||
NutMap jdhDb = dbList.stream().filter(v -> v.getString("userId").equals(id)).findFirst().orElse(null);
|
||||
if (ObjectUtil.isEmpty(jdhDb)) {
|
||||
return Result.error("请选择正确的代表!");
|
||||
}
|
||||
ExecutiveCommitteeOnePush onePush = new ExecutiveCommitteeOnePush();
|
||||
onePush.setPushDate(DateUtil.date());
|
||||
onePush.setUserId(jdhDb.getString("userId"));
|
||||
onePush.setUserName(jdhDb.getString("userName"));
|
||||
onePush.setLoginName(jdhDb.getString("loginName"));
|
||||
onePush.setDelegationId(jdhDb.getString("delegationId"));
|
||||
onePush.setUnionId(jdhDb.getString("unionId"));
|
||||
onePush.setUnitId(jdhDb.getString("unitId"));
|
||||
onePush.setTeacherMeetId(teacherMeetId);
|
||||
String firstLetter = String.valueOf(getFirstLetter(jdhDb.getString("userName")));
|
||||
onePush.setFirstLetter(firstLetter);
|
||||
onePush.setAddType(2);
|
||||
list.add(onePush);
|
||||
}
|
||||
dao.insert(list);
|
||||
List<ExecutiveCommitteeTwoPush> twoPushList = dao.query(ExecutiveCommitteeTwoPush.class, Cnd.where(ExecutiveCommitteeTwoPush::getTeacherMeetId, "=", teacherMeetId).and(ExecutiveCommitteeTwoPush::getUserId, "in", userValue));
|
||||
List<String> ids = twoPushList.stream().map(ExecutiveCommitteeTwoPush::getId).toList();
|
||||
dao.update(ExecutiveCommitteeTwoPush.class, Chain.make("isFormal", true), Cnd.where("id", "in", ids));
|
||||
return Result.success("添加成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -202,16 +172,9 @@ public class ExecutiveCommitteePushController {
|
||||
@SaCheckPermission("executiveCommittee.preparatoryGroupPush")
|
||||
@SLog(tag = "执委会推选-筹备组推选", msg = "删除推选的人")
|
||||
public Result doDelete(@Valid String id, @Valid String teacherMeetId) {
|
||||
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
|
||||
Cnd.where("teacherMeetId", "=", teacherMeetId));
|
||||
if (ObjectUtil.isEmpty(config)) {
|
||||
return Result.error("请先配置基础信息");
|
||||
}
|
||||
int num = dao.clear(ExecutiveCommitteeOnePush.class, Cnd.where("id", "=", id));
|
||||
return num >= 0 ? Result.success() : Result.error();
|
||||
dao.update(ExecutiveCommitteeTwoPush.class, Chain.make("isFormal", false), Cnd.where("id", "=", id));
|
||||
return Result.success("删除成功!");
|
||||
}
|
||||
|
||||
|
||||
public static char getFirstLetter(String str) {
|
||||
if (str == null || str.isEmpty()) {
|
||||
throw new IllegalArgumentException("字符串不能为空");
|
||||
|
||||
+6
-1
@@ -37,7 +37,12 @@ public class ExecutiveCommitteeMemberServiceImpl extends BaseServiceImpl impleme
|
||||
YEAR,
|
||||
u.birthday,
|
||||
CURDATE()) AS age,
|
||||
( SELECT count( 1 ) FROM executive_committee_two_push tp WHERE tp.userId = op.userId ) as pushCount
|
||||
( SELECT count( 1 ) FROM executive_committee_two_push tp WHERE tp.userId = op.userId ) as pushCount,
|
||||
CASE op.addType
|
||||
WHEN 1 THEN '执委会委员'
|
||||
WHEN 3 THEN '工会委员会委员'
|
||||
ELSE '未知'
|
||||
END AS addTypeName
|
||||
FROM
|
||||
executive_committee_one_push op
|
||||
LEFT JOIN sys_unit it ON op.unitId = it.id
|
||||
|
||||
+130
-102
@@ -1,23 +1,26 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.bpm.enums.BpmProcessTaskStatusEnum;
|
||||
import com.budwk.app.bpm.models.BpmProcessTask;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.entity.ProcessTaskActor;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.flow.service.ProcessTaskService;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.proposal.controller.vo.ProposalInfoPageVO;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalUndertake;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalCommitteeFilingUnitApprovalParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.ProposalCommitteeFilingUnitService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -25,10 +28,10 @@ import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
@@ -46,10 +49,15 @@ public class ProposalCommitteeFilingUnitController {
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
@Inject
|
||||
private ProposalCommitteeFilingUnitService proposalCommitteeFilingUnitService;
|
||||
|
||||
@Inject
|
||||
private ProposalCommonService proposalCommonService;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
@Inject
|
||||
private ProcessTaskService processTaskService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/committeeFilingUnit/index.html")
|
||||
@SaCheckPermission("proposal.committeeFilingUnit")
|
||||
@@ -64,123 +72,143 @@ public class ProposalCommitteeFilingUnitController {
|
||||
SELECT
|
||||
info.*,
|
||||
type.name AS typeName,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.`name` AS delegationName,
|
||||
inst.id processInstanceId,
|
||||
inst.processInstanceNodeId,
|
||||
inst.processInstanceNodeName,
|
||||
inst.processInstanceTaskIds,
|
||||
inst.processInstanceStatus,
|
||||
task.id processInstanceTaskId,
|
||||
task.taskStatus processInstanceTaskStatus,
|
||||
COUNT(p.consolidationIds) > 0 AS isConsolidation,
|
||||
EXISTS (
|
||||
SELECT 1
|
||||
FROM bpm_process_task next_task
|
||||
WHERE next_task.prevTaskId = task.id
|
||||
AND next_task.taskStatus = 'COMPLETE'
|
||||
) AS nextTaskIsComplete
|
||||
IF(mer.proposalId IS NOT NULL, 1, 0) AS merge,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.`name` AS delegationName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL OR (ins.state = 20 AND info.caseFilingResult = 'NOT'), 1, 0) AS canRevoke
|
||||
FROM
|
||||
bpm_process_task task
|
||||
INNER JOIN bpm_process_node_define nd ON nd.id = task.processTaskNodeId
|
||||
INNER JOIN bpm_process_instance inst ON inst.id = task.processInstanceId
|
||||
INNER JOIN proposal_info info ON info.id = inst.processInstanceBusinessId
|
||||
LEFT JOIN proposal_consolidation p ON JSON_CONTAINS(p.consolidationIds, JSON_QUOTE(info.id))
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
LEFT JOIN proposal_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN proposal_type type on type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs ON tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd ON tcd.id = info.delegationId
|
||||
LEFT JOIN bpm_process_task nt ON nt.prevTaskId = task.id AND nt.taskStatus = 'COMPLETE'
|
||||
LEFT JOIN proposal_merge mer ON mer.proposalId = info.id
|
||||
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "committeeFilingUnit");
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and(new Static("JSON_CONTAINS( task.assignments, '\"%s\"' )".formatted(SecurityUtil.getUserLoginname())));
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
}
|
||||
cnd.and("nd.nodeCode", "=", 70);
|
||||
if (approval) {
|
||||
cnd.and("task.taskStatus", "=", BpmProcessTaskStatusEnum.COMPLETE);
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("task.taskStatus", "=", BpmProcessTaskStatusEnum.ACTIVE);
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
ProposalSearchParam.buildSearch(cnd, pageForm);
|
||||
cnd.and(new Static("""
|
||||
NOT EXISTS(
|
||||
SELECT 1
|
||||
FROM bpm_process_task t2
|
||||
WHERE t2.processInstanceId = task.processInstanceId
|
||||
AND t2.processTaskNodeCode = task.processTaskNodeCode
|
||||
AND t2.createdOn > task.createdOn
|
||||
)
|
||||
"""));
|
||||
cnd.groupBy("info.id");
|
||||
cnd.groupBy("task.id");
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = baseService.listPageVO(pageForm, sql, ProposalInfoPageVO.class);
|
||||
Pagination pagination = proposalCommitteeFilingUnitService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.committeeFilingUnit")
|
||||
@ApiOperation("执行任务")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "委员会确认承办单位", msg = "委员会确认承办单位")
|
||||
@ApiOperation("委员会确认承办单位")
|
||||
public Result approval(@Valid @Param("approval") ProposalCommitteeFilingUnitApprovalParam approvalParam) {
|
||||
proposalCommitteeFilingUnitService.approval(approvalParam);
|
||||
return Result.success();
|
||||
}
|
||||
public Result executeTask(@Param("data") String data) {
|
||||
Dict args = Json.fromJson(Dict.class, data);
|
||||
String proposalId = args.getStr("proposalId");
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.committeeFilingUnit")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "委员会确认承办单位", msg = "委员会确认承办单位撤回")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
proposalCommitteeFilingUnitService.revoke(taskId);
|
||||
return Result.success();
|
||||
}
|
||||
// 查询是否提案
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.committeeFilingUnit")
|
||||
@ApiOperation("查询立案的结果及承办单位")
|
||||
public Result committeeFiling(@Valid String processInstanceId, @Valid String processInstanceTaskId) {
|
||||
JSONObject newJson = new JSONObject();
|
||||
|
||||
BpmProcessTask caseUnitTask = proposalCommitteeFilingUnitService.dao().fetch(BpmProcessTask.class,
|
||||
Cnd.where(BpmProcessTask::getId, "=", processInstanceTaskId)
|
||||
.and(BpmProcessTask::getProcessInstanceId, "=", processInstanceId)
|
||||
.and(BpmProcessTask::getProcessTaskNodeCode, "=", 70)
|
||||
.and(BpmProcessTask::getDelFlag, "=", 0)
|
||||
);
|
||||
if (ObjectUtil.isNotNull(caseUnitTask) && ObjectUtil.isNotEmpty(caseUnitTask.getExtVariable())) {
|
||||
JSONObject jsonObject = caseUnitTask.getExtVariable();
|
||||
newJson.set("caseFilingResult", jsonObject.get("caseFilingResult"));
|
||||
newJson.set("hostUnitId", jsonObject.get("hostUnitId"));
|
||||
newJson.set("helpUnitIds", jsonObject.getBeanList("helpUnitIds", String.class));
|
||||
newJson.set("approvalOpinion", jsonObject.get("approvalOpinion"));
|
||||
newJson.set("consolidationIds", jsonObject.getBeanList("consolidationIds", String.class));
|
||||
return Result.success(newJson);
|
||||
// 单条审核
|
||||
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
|
||||
if (ObjectUtil.isEmpty(mergeProposalIds)) {
|
||||
flowCommonService.executeTask(args);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
BpmProcessTask caseTask = proposalCommitteeFilingUnitService.dao().fetch(BpmProcessTask.class,
|
||||
Cnd.where(BpmProcessTask::getProcessInstanceId, "=", processInstanceId)
|
||||
.and(BpmProcessTask::getDelFlag, "=", 0)
|
||||
.and(BpmProcessTask::getProcessTaskNodeCode, "=", 60)
|
||||
.desc(BpmProcessTask::getCreatedOn)
|
||||
);
|
||||
JSONObject jsonObject = caseTask.getExtVariable();
|
||||
newJson.set("caseFilingResult", jsonObject.get("caseFilingResult"));
|
||||
newJson.set("hostUnitId", jsonObject.get("hostUnitId"));
|
||||
newJson.set("helpUnitIds", jsonObject.getBeanList("helpUnitIds", String.class));
|
||||
newJson.set("approvalOpinion", jsonObject.get("approvalOpinion"));
|
||||
newJson.set("consolidationIds", jsonObject.getBeanList("consolidationIds", String.class));
|
||||
return Result.success(newJson);
|
||||
// 并案审核
|
||||
ProcessTask thisTask = baseService.dao().fetch(ProcessTask.class, args.getLong(FlowConst.PROCESS_TASK_ID_KEY));
|
||||
List<ProcessTask> mergeTasks = processTaskService.getDoingTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
|
||||
for (ProcessTask mergeTask : mergeTasks) {
|
||||
Dict cloneArgs = args.clone();
|
||||
cloneArgs.put(FlowConst.PROCESS_TASK_ID_KEY, mergeTask.getId());
|
||||
flowCommonService.executeTask(cloneArgs);
|
||||
}
|
||||
|
||||
ProposalInfo info = proposalCommonService.fetch(proposalId);
|
||||
info.setCaseFilingResult(args.getStr("caseFilingResult"));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("撤销任务")
|
||||
public Result revokeTask(@Param("taskId") Long taskId,@Param("proposalId")String proposalId) {
|
||||
// 单条审核
|
||||
List<String> mergeProposalIds = proposalCommonService.mergeProposal(proposalId);
|
||||
if (ObjectUtil.isEmpty(mergeProposalIds)) {
|
||||
flowCommonService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
}
|
||||
// 并案审核
|
||||
ProcessTask thisTask = baseService.dao().fetch(ProcessTask.class, taskId);
|
||||
List<ProcessTask> mergeTasks = processTaskService.getDoneTaskByBizIdTaskName(mergeProposalIds, thisTask.getTaskName());
|
||||
for (ProcessTask mergeTask : mergeTasks) {
|
||||
flowCommonService.revokeTask(mergeTask.getId());
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.committeeFilingUnit")
|
||||
@ApiOperation("查询承办单位")
|
||||
public Result listUnderTake() {
|
||||
List<ProposalUndertake> list = baseService.dao().query(ProposalUndertake.class, Cnd.NEW().asc(ProposalUndertake::getCode));
|
||||
return Result.success(list);
|
||||
public Result doUpData(){
|
||||
List<ProcessTask> tasks = baseService.dao().query(ProcessTask.class, Cnd.where("taskName", "=", "personnelOffice"));
|
||||
List<Long> list = tasks.stream().map(ProcessTask::getId).toList();
|
||||
|
||||
List<ProcessTaskActor> actorList = baseService.dao().query(ProcessTaskActor.class, Cnd.where(ProcessTaskActor::getProcessTaskId, "in", list));
|
||||
|
||||
List<ProcessInstance> instanceList = baseService.dao().query(ProcessInstance.class, Cnd.where(ProcessInstance::getProcessDefineId, "=", 396));
|
||||
|
||||
for (ProcessTask task : tasks) {
|
||||
task.setTaskName("committee");
|
||||
task.setDisplayName("提案委员会立案");
|
||||
task.setFormKey("/platform/proposal/committee");
|
||||
task.setH5FormKey("");
|
||||
}
|
||||
|
||||
for (ProcessTaskActor actor : actorList) {
|
||||
actor.setActorId("1fb89886bf4c43dcb48409c83d3363c3");
|
||||
actor.setActorAccount("018054");
|
||||
actor.setActorName("赵丽霞");
|
||||
actor.setActorUnitName("工会");
|
||||
actor.setActorUnitId("0011");
|
||||
}
|
||||
|
||||
for (ProcessInstance instance : instanceList) {
|
||||
instance.setProcessDefineId(400L);
|
||||
}
|
||||
|
||||
baseService.update(tasks);
|
||||
baseService.update(actorList);
|
||||
baseService.update(instanceList);
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.controller.transact;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.ProposalDelegationService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2026/3/12 09:36
|
||||
* @description 人事处审核
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/proposal/personnelOffice")
|
||||
@Slf4j
|
||||
@Ok("json:full")
|
||||
@Api(tags = "提案-办理-人事处审核")
|
||||
public class ProposalPersonnelOfficeController {
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
@Inject
|
||||
private ProposalCommonService proposalCommonService;
|
||||
@Inject
|
||||
private ProposalDelegationService proposalDelegationService;
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/personnelOffice/index.html")
|
||||
@SaCheckPermission("proposal.personnelOffice")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/democratic/proposal/transact/personnelOffice/index.html")
|
||||
@SaCheckPermission("h5.proposal.personnelOffice")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.personnelOffice")
|
||||
@ApiOperation("分页列表")
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
type.name AS typeName,
|
||||
tcs.fullName AS sessionName,
|
||||
tcd.`name` AS delegationName,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
|
||||
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
LEFT JOIN proposal_info info ON info.id = ins.businessNo
|
||||
LEFT JOIN proposal_type type on type.id = info.typeId
|
||||
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
|
||||
LEFT JOIN teacher_congress_delegation tcd on tcd.id = info.delegationId
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "personnelOffice");
|
||||
|
||||
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
}
|
||||
|
||||
if (approval) {
|
||||
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
|
||||
} else {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
ProposalSearchParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("t.id");
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(),pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.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 com.budwk.app.sys.models.Sys_role;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2026/3/16 13:54
|
||||
* @description 提案人事处管理员
|
||||
*/
|
||||
public class proposalPersonnelOfficeAdminHandler implements AssignmentHandler {
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||
Sys_role role = sysRoleService.getByCode(RoleConstant.PROPOSAL_PERSONNEL_OFFICE_ADMIN);
|
||||
|
||||
List<Sys_user_role> roles = ServiceContext.find(Dao.class).query(
|
||||
Sys_user_role.class,
|
||||
Cnd.where(Sys_user_role::getRoleId, "=", role.getId()));
|
||||
if (Lang.isEmpty(roles)) {
|
||||
throw new RuntimeException("当前登录用户所在单位未设置单位党委书记,请联系校工会进行设置。");
|
||||
}
|
||||
return roles.stream().map(Sys_user_role::getUserId).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "获取当前提案人事处管理员";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return AssignmentHandler.super.getOrder();
|
||||
}
|
||||
}
|
||||
+23
-2
@@ -27,7 +27,7 @@ layout("/layouts/platform.html"){
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="代表团" >
|
||||
<search-item label="代表团">
|
||||
<el-select clearable filterable placeholder="请选择代表团" style="width: 100%"
|
||||
v-model="pageForm.delegationId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
@@ -41,6 +41,19 @@ layout("/layouts/platform.html"){
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="委员类别">
|
||||
<el-select
|
||||
v-model="pageForm.roleCode"
|
||||
filterable
|
||||
placeholder="请选择委员类别"
|
||||
clearable
|
||||
style="width:100%;"
|
||||
>
|
||||
<el-option label="执委会委员" value="1"></el-option>
|
||||
<el-option label="工会委员会委员" value="2"></el-option>
|
||||
<el-option label="经审委员会委员" value="3"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
@@ -50,7 +63,7 @@ layout("/layouts/platform.html"){
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
|
||||
>委员推选
|
||||
>候选人录入
|
||||
</el-button>
|
||||
</table-tool>
|
||||
|
||||
@@ -59,6 +72,7 @@ layout("/layouts/platform.html"){
|
||||
:data="tableData"
|
||||
row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading"
|
||||
>
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号"
|
||||
@@ -72,6 +86,13 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="委员类别" prop="roleCode">
|
||||
<template scope="{row}">
|
||||
<el-tag v-if="row.roleCode === '1'">执委会委员</el-tag>
|
||||
<el-tag v-if="row.roleCode === '2'">工会委员会委员</el-tag>
|
||||
<el-tag v-if="row.roleCode === '3'">经审委员会委员</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button
|
||||
|
||||
+19
-5
@@ -4,10 +4,19 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
title="分工会最终投票"
|
||||
title="执委会\工会委员会候选人、经审委员会委员录入"
|
||||
width="70%"
|
||||
|
||||
>
|
||||
<div style="display:flex;align-items: center;margin-bottom: 20px">
|
||||
<span style=" margin-right: 10px;white-space: nowrap;">录入类型:</span>
|
||||
<el-radio-group v-model="roleCode">
|
||||
<el-radio-button label="1">执委会委员</el-radio-button>
|
||||
<el-radio-button label="2">工会委员会委员</el-radio-button>
|
||||
<el-radio-button label="3">经审委员会委员</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<el-transfer
|
||||
ref="transfer"
|
||||
v-model="userValue"
|
||||
@@ -16,7 +25,7 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
|
||||
:filter-method="filterMethod"
|
||||
:props="{key: 'userId',label: 'name'}"
|
||||
:right-default-checked="rightChecked"
|
||||
:titles="['可推选人员名单', '当前选择']"
|
||||
:titles="['可录入人员名单', '当前选择']"
|
||||
filterable
|
||||
class="transfer-high"
|
||||
>
|
||||
@@ -36,7 +45,6 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
|
||||
</div>
|
||||
</el-transfer>
|
||||
<span slot="footer">
|
||||
<span style="color:red;font-size: 15px; display:flex;text-align: right;">投票名额:{{committeeQuotaCount}}个</span>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
||||
@@ -53,7 +61,8 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
|
||||
rightChecked: [],
|
||||
attendanceRightChecked: [],
|
||||
teacherMeetId: null,
|
||||
committeeQuotaCount: 0
|
||||
committeeQuotaCount: 0,
|
||||
roleCode: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -80,12 +89,17 @@ const DELEGATION_TWO_PUSH_FORMAL_DIALOG = {
|
||||
return item.userName.indexOf(query) > -1
|
||||
},
|
||||
async onConfirm() {
|
||||
if (!this.roleCode) {
|
||||
this.$message.error('请选择录入类型')
|
||||
return
|
||||
}
|
||||
const {
|
||||
code,
|
||||
msg
|
||||
} = await this.$axios.post('/platform/executiveCommittee/delegationTwoPush/addOnePush', {
|
||||
userValue: JSON.stringify(this.userValue),
|
||||
teacherMeetId: this.teacherMeetId
|
||||
teacherMeetId: this.teacherMeetId,
|
||||
roleCode: this.roleCode
|
||||
})
|
||||
if (code === 0) {
|
||||
this.dialogVisible = false
|
||||
|
||||
+3
-3
@@ -80,8 +80,8 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="票数" prop="pushCount"></el-table-column>
|
||||
<el-table-column label="操作" width="130" fixed="right">
|
||||
<el-table-column label="委员类别" prop="addTypeName"></el-table-column>
|
||||
<!--<el-table-column label="操作" width="130" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button
|
||||
size="mini"
|
||||
@@ -90,7 +90,7 @@ layout("/layouts/platform.html"){
|
||||
>推选详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
+22
-1
@@ -41,6 +41,19 @@ layout("/layouts/platform.html"){
|
||||
v-for="item in delegations"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="委员类别">
|
||||
<el-select
|
||||
v-model="pageForm.roleCode"
|
||||
filterable
|
||||
placeholder="请选择委员类别"
|
||||
clearable
|
||||
style="width:100%;"
|
||||
>
|
||||
<el-option label="执委会委员" value="1"></el-option>
|
||||
<el-option label="工会委员会委员" value="2"></el-option>
|
||||
<el-option label="经审委员会委员" value="3"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
@@ -50,7 +63,7 @@ layout("/layouts/platform.html"){
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="$refs.onePushFormalRef.onOpen(pageForm.teacherMeetId)"
|
||||
>委员推选
|
||||
>正式委员录入
|
||||
</el-button>
|
||||
</table-tool>
|
||||
|
||||
@@ -59,6 +72,7 @@ layout("/layouts/platform.html"){
|
||||
:data="tableData"
|
||||
row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading"
|
||||
>
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号"
|
||||
@@ -72,6 +86,13 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column align="center" label="代表团" prop="delegationName"></el-table-column>
|
||||
<el-table-column align="center" label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column align="center" label="所属单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="委员类别" prop="roleCode">
|
||||
<template scope="{row}">
|
||||
<el-tag v-if="row.roleCode === '1'">执委会委员</el-tag>
|
||||
<el-tag v-if="row.roleCode === '2'">工会委员会委员</el-tag>
|
||||
<el-tag v-if="row.roleCode === '3'">经审委员会委员</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button
|
||||
|
||||
+1
-1
@@ -31,12 +31,12 @@ const PUSH_FORMAL_DIALOG = {
|
||||
</span>
|
||||
<span class="detail-item">{{ option.age }}岁</span>
|
||||
<span class="detail-item">{{ option.professionalTitle }}</span>
|
||||
<span class="detail-item" style="color:#ee0a24;">{{ option.roleCode==='1'?'执委会委员':option.roleCode==='2'?'工会委员会委员':'经审委员会委员' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-transfer>
|
||||
<span slot="footer">
|
||||
<span style="color:red;font-size: 15px; display:flex;text-align: right;">推选名额:{{prepareGroupQuotaCount}}个</span>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
||||
|
||||
@@ -144,7 +144,7 @@ const PROPOSAL_INFO = {
|
||||
|
||||
<!--提案委员会立案-->
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-else-if="task.taskName === 'committee'">
|
||||
v-else-if="task.taskName === 'committee'||task.taskName === 'committeeFilingUnit'">
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
@@ -244,6 +244,7 @@ const PROPOSAL_INFO = {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
this.$emit("done-tasks", this.doneTasks)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
+2
-2
@@ -147,9 +147,9 @@ layout("/layouts/platform.html"){
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="approvalOpinion"
|
||||
<el-form-item label="审核意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
|
||||
+251
-329
@@ -2,96 +2,91 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style></style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="提案编号">
|
||||
<el-input v-model="pageForm.code" placeholder="提案编号" @keyup.enter.native="doSearch" clearable style="width: 100%"></el-input>
|
||||
</search-item>
|
||||
<search-item label="提案名称">
|
||||
<el-input v-model="pageForm.name" placeholder="提案名称" @keyup.enter.native="doSearch" clearable style="width: 100%"></el-input>
|
||||
</search-item>
|
||||
<search-item label="提案人姓名">
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
placeholder="请输入提案人姓名"
|
||||
v-model="pageForm.createUserName"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</search-item>
|
||||
<search-item label="提案人工号">
|
||||
<el-input
|
||||
@keyup.enter.native="doSearch"
|
||||
clearable
|
||||
placeholder="请输入提案人工号"
|
||||
v-model="pageForm.createUserLoginName"
|
||||
style="width: 100%"
|
||||
></el-input>
|
||||
</search-item>
|
||||
<search-item label="教代会">
|
||||
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会" v-model="pageForm.sessionId">
|
||||
<el-option :key="item.id" :label="item.fullName" :value="item.id" v-for="item in sessionOptions"></el-option>
|
||||
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
|
||||
v-model="pageForm.sessionId">
|
||||
<el-option :key="item.id" :label="item.fullName" :value="item.id"
|
||||
v-for="item in sessionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="提案编号">
|
||||
<el-input v-model="pageForm.code" placeholder="提案编号" @keyup.enter.native="doSearch" clearable
|
||||
style="width: 100%"></el-input>
|
||||
</search-item>
|
||||
<search-item label="提案名称">
|
||||
<el-input v-model="pageForm.name" placeholder="提案名称" @keyup.enter.native="doSearch" clearable
|
||||
style="width: 100%"></el-input>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.createUserKeyword"></el-input>
|
||||
</search-item>
|
||||
<!-- <search-item label="提案人姓名">-->
|
||||
<!-- <el-input-->
|
||||
<!-- @keyup.enter.native="doSearch"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请输入提案人姓名"-->
|
||||
<!-- v-model="pageForm.createUserName"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </search-item>-->
|
||||
<!-- <search-item label="提案人工号">-->
|
||||
<!-- <el-input-->
|
||||
<!-- @keyup.enter.native="doSearch"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请输入提案人工号"-->
|
||||
<!-- v-model="pageForm.createUserLoginName"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </search-item>-->
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button @click="openConsolidationApproval" size="small" type="primary" class="mr5">重新并案审核</el-button>
|
||||
<el-radio-group v-model="pageForm.approval" @change="doSearch();$refs.tableRef.clearSelection()" size="small">
|
||||
<table-tool :columns.sync="tableColumns">
|
||||
<!-- <el-button type="primary" icon="el-icon-plus" size="small" @click="openMerge">并案审核</el-button>-->
|
||||
<el-button type="primary" icon="el-icon-plus" size="small" @click="doUpData">更新</el-button>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
ref="tableRef"
|
||||
@sort-change="pageOrder"
|
||||
header-align="center"
|
||||
style="width: 100%"
|
||||
:row-key="(val)=>{val.id + val.processInstanceTaskId}"
|
||||
>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" ref="tableRef" row-key="id" style="width: 100%">
|
||||
<el-table-column type="selection" width="50" fixed="left" v-if="!pageForm.approval"></el-table-column>
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
|
||||
fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
v-if="!pageForm.approval"
|
||||
type="selection"
|
||||
reserve-selection
|
||||
:selectable="(row)=>row.processInstanceTaskStatus==='ACTIVE'"
|
||||
></el-table-column>
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="120" sortable></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案人" prop="createUserName"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="立案结果" prop="caseFilingResult">
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.key"
|
||||
:min-width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
|
||||
<dict-tag v-if="row.taskState!==10"
|
||||
:options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="row.caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'merge'" scope="{row}">
|
||||
<el-tag v-if="row.merge" size="small">是</el-tag>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否并案" prop="isConsolidation">
|
||||
<template scope="{row}">
|
||||
<el-tag size="mini" v-if="row.isConsolidation" type="success">是</el-tag>
|
||||
<el-tag size="mini" v-else type="danger">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
||||
@click="openRevoke(row.processInstanceTaskId)"
|
||||
size="mini"
|
||||
type="danger"
|
||||
>
|
||||
撤回
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -99,225 +94,216 @@ layout("/layouts/platform.html"){
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<proposal-info ref="infoRef"></proposal-info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
||||
|
||||
<el-alert v-if="formData.isConsolidation" type="success" title="提醒:本提案已并案,您只需审核一次即可!"></el-alert>
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
||||
<el-form-item label="立案结果" prop="caseFilingResult" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.caseFilingResult" size="small">
|
||||
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code" border>{{item.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="主办单位"
|
||||
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult)"
|
||||
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult),message:'必填',trigger:['change','blur']}]"
|
||||
>
|
||||
<el-select v-model="formData.hostUnitId" filterable clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in underTakeOptions"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:disabled="formData && formData.helpUnitIds.includes(item.id)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="协办单位" v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult)">
|
||||
<el-select v-model="formData.helpUnitIds" filterable clearable multiple style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in underTakeOptions"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:disabled="item.id===formData.hostUnitId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">-->
|
||||
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button type="primary" @click="doApproval('DYNAMIC')">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<div class="process-title">并案提案列表</div>
|
||||
<el-table :data="consolidationProposalTableData" size="small">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="提案编号" prop="code" width="120px" sortable></el-table-column>
|
||||
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="提案人" prop="createUserName" width="200px"></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName" width="300px"></el-table-column>
|
||||
<el-table-column label="立案结果" prop="caseFilingResult" width="100px">
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否并案" prop="isConsolidation" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-tag size="mini" v-if="row.isConsolidation" type="success">是</el-tag>
|
||||
<el-tag size="mini" v-else type="danger">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100px">
|
||||
<template scope="{row}">
|
||||
<el-link size="mini" type="primary" @click="openViewDialog(row)">查看</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="process-title">{{consolidationFormData.processInstanceNodeName}}</div>
|
||||
<el-form :model="consolidationFormData" ref="consolidationFormRef" label-position="left" label-width="80px">
|
||||
<el-form-item label="立案结果" prop="caseFilingResult" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="consolidationFormData.caseFilingResult" size="small">
|
||||
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code" border>{{item.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="主办单位"
|
||||
v-if="['CONFIRM_FILING','SUGGESTION'].includes(consolidationFormData.caseFilingResult)"
|
||||
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(consolidationFormData.caseFilingResult),message:'必填',trigger:['change','blur']}]"
|
||||
>
|
||||
<el-select v-model="consolidationFormData.hostUnitId" filterable clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in underTakeOptions"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:disabled="consolidationFormData && consolidationFormData.helpUnitIds.includes(item.id)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="协办单位" v-if="['CONFIRM_FILING','SUGGESTION'].includes(consolidationFormData.caseFilingResult)">
|
||||
<el-select v-model="consolidationFormData.helpUnitIds" filterable clearable multiple style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in underTakeOptions"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:disabled="item.id===consolidationFormData.hostUnitId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="consolidationFormData.approvalOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="consolidationFormData.approvalSignature"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button type="primary" @click="doConsolidationApproval('PASS')">提交</el-button>
|
||||
</el-row>
|
||||
<proposal-info ref="proposalInfoRef" @done-tasks="doneTasks">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
|
||||
<el-form-item label="立案结果" prop="tf_caseFilingResult"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
|
||||
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code"
|
||||
border>{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="['CONFIRM_FILING'].includes(formData.tf_caseFilingResult)" label="立案类型"
|
||||
prop="tf_caseFilingType"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-radio-group v-model="formData.tf_caseFilingType" size="small">
|
||||
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_TYPE" :label="item.code" border>
|
||||
{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="主办单位"
|
||||
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
|
||||
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult),message:'必填',trigger:['change','blur']}]"
|
||||
prop="tf_masterUnitId"
|
||||
>
|
||||
<el-select v-model="formData.tf_masterUnitId" filterable clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in underTakeOptions"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:disabled="formData && formData.tf_slaveUnitIds.includes(item.id)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="协办单位"
|
||||
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
|
||||
prop="tf_slaveUnitIds"
|
||||
>
|
||||
<el-select v-model="formData.tf_slaveUnitIds" filterable clearable multiple
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in underTakeOptions"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:disabled="item.id===formData.tf_masterUnitId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</template>
|
||||
|
||||
<el-dialog title="提案详情" :visible.sync="viewDialogVisible" width="1200px" top="50px" append-to-body>
|
||||
<div style="max-height: 80vh; overflow-y: auto">
|
||||
<proposal-info ref="infoDialogRef"></proposal-info>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<template #public>
|
||||
<merge ref="mergeRef" @close="$refs.guava.index()"></merge>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
const vue = new Vue({
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
<!--#include('../committeeFiling/merge.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT"],
|
||||
store,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO_COMPONENT
|
||||
"proposal-info": PROPOSAL_INFO,
|
||||
merge
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sessionOptions: [],
|
||||
delegationOptions: [],
|
||||
underTakeOptions: [],
|
||||
formData: {
|
||||
hostUnitIds: null,
|
||||
helpUnitId: []
|
||||
},
|
||||
tableColumns: [
|
||||
{label: "提案编号", prop: "code"},
|
||||
{label: "提案名称", prop: "name", width: "200px"},
|
||||
{label: "提案类别", prop: "typeName"},
|
||||
{label: "届次", prop: "sessionName"},
|
||||
{label: "立案结果", prop: "caseFilingResult"},
|
||||
{label: "代表团", prop: "delegationName"},
|
||||
{label: "当前节点", prop: "curTaskName"},
|
||||
{label: "流程状态", prop: "instanceState"}
|
||||
],
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {
|
||||
tf_masterUnitId: null,
|
||||
tf_slaveUnitIds: []
|
||||
},
|
||||
showApprovalForm: false,
|
||||
//并案的提案列表
|
||||
consolidationProposalTableData: [],
|
||||
consolidationFormData: {},
|
||||
|
||||
viewDialogVisible: false
|
||||
sessionOptions: [],
|
||||
delegationOptions: [],
|
||||
underTakeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doUpData(){
|
||||
this.$.axios.post(loc()+"/doUpData")
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.formData.isConsolidation = row.isConsolidation
|
||||
|
||||
this.$axios
|
||||
.post(loc() + "/committeeFiling", {
|
||||
processInstanceId: row.processInstanceId,
|
||||
processInstanceTaskId: row.processInstanceTaskId
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this.formData, "caseFilingResult", res.data.caseFilingResult)
|
||||
this.$set(this.formData, "hostUnitId", res.data.hostUnitId)
|
||||
this.$set(this.formData, "helpUnitIds", res.data.helpUnitIds || [])
|
||||
this.$set(this.formData, "approvalOpinion", res.data.approvalOpinion)
|
||||
this.$set(this.formData, "proposalIds", res.data.consolidationIds || [row.id])
|
||||
}
|
||||
})
|
||||
doneTasks(val) {
|
||||
const data = val[val.length - 1]
|
||||
this.$set(this.formData, "tf_caseFilingResult", data.ext.tf_caseFilingResult)
|
||||
this.$set(this.formData, "tf_caseFilingType", data.ext.tf_caseFilingType)
|
||||
this.$set(this.formData, "tf_masterUnitId", data.ext.tf_masterUnitId)
|
||||
this.$set(this.formData, "tf_slaveUnitIds", data.ext.tf_slaveUnitIds)
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
},
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
this.$refs.approvalFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post(loc() + "/approval", {
|
||||
approval: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
this.formData = {
|
||||
proposalId: row.id,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
tf_masterUnitId: null,
|
||||
tf_slaveUnitIds: []
|
||||
}
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openRevoke(taskId) {
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
// 是否有协办单位
|
||||
let tf_helpunitreply;
|
||||
if (this.formData.tf_slaveUnitIds && this.formData.tf_slaveUnitIds.length > 0) {
|
||||
tf_helpunitreply = 'HAS_HELP_UNIT'
|
||||
} else {
|
||||
tf_helpunitreply = 'NO_HELP_UNIT'
|
||||
}
|
||||
|
||||
const loading = createLoading('提交中')
|
||||
this.$axios.post("/platform/proposal/committeeFilingUnit/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val,
|
||||
tf_masterUnitName: this.formData.tf_masterUnitId ? this.underTakeOptions.find(v => v.id === this.formData.tf_masterUnitId)?.name : null,
|
||||
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name),
|
||||
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name).join(','),
|
||||
tf_helpunitreply: tf_helpunitreply
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 打开并案审核
|
||||
openMerge() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length < 2) {
|
||||
this.$message.warning('请先勾选需要并案审核的提案,至少需要两条提案')
|
||||
return
|
||||
}
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.mergeRef.onOpen(selection, {
|
||||
processTaskIds: selection.map(v => v.taskId),
|
||||
taskName: selection[0].curTaskName,
|
||||
tf_masterUnitId: null,
|
||||
tf_slaveUnitIds: []
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
|
||||
this.$axios.post("/platform/proposal/committeeFilingUnit/revokeTask", {
|
||||
taskId: row.taskId,
|
||||
proposalId: row.id
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
@@ -326,78 +312,12 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
|
||||
viewSingleProposal(row) {
|
||||
this.proposalInfoVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
|
||||
//打开并案审核
|
||||
openConsolidationApproval() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length < 2) {
|
||||
this.$message.error("并案审核至少需要选择两条提案")
|
||||
return
|
||||
}
|
||||
this.consolidationProposalTableData = selection
|
||||
this.$refs.guava.edit()
|
||||
|
||||
this.consolidationFormData = selection[0].approvalParam
|
||||
this.$set(this.consolidationFormData, "caseFilingResult", null)
|
||||
this.$set(this.consolidationFormData, "hostUnitId", null)
|
||||
this.$set(this.consolidationFormData, "helpUnitIds", [])
|
||||
this.$set(this.consolidationFormData, "helpUnitIds", [])
|
||||
this.$set(this.consolidationFormData, "approvalOpinion", null)
|
||||
this.$set(
|
||||
this.consolidationFormData,
|
||||
"proposalIds",
|
||||
selection.map((v) => v.id)
|
||||
)
|
||||
},
|
||||
|
||||
openViewDialog(row) {
|
||||
this.viewDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoDialogRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
|
||||
//并案审核
|
||||
doConsolidationApproval() {
|
||||
this.consolidationFormData.bpmTaskApprovalType = "DYNAMIC"
|
||||
this.$refs.consolidationFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post(loc() + "/approval", {
|
||||
approval: JSON.stringify(this.consolidationFormData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$refs.tableRef.clearSelection()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//教代会change
|
||||
// 教代会
|
||||
async meetingChange(val) {
|
||||
this.formData.delegationId = null
|
||||
this.formData.committeeId = null
|
||||
this.delegationOptions = await proposal.getDelegation(val)
|
||||
this.committeeOptions = await this.getInstitutions(val)
|
||||
},
|
||||
listDelegation() {
|
||||
this.$axios.post("/platform/proposal/common/listDelegation", { sessionId: this.pageForm.sessionId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.delegationOptions = res.data
|
||||
}
|
||||
})
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
// 查询开启的教代会
|
||||
listOpenSession() {
|
||||
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
@@ -405,14 +325,14 @@ layout("/layouts/platform.html"){
|
||||
if (this.sessionOptions) {
|
||||
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
|
||||
this.pageData()
|
||||
this.listDelegation()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询承办单位
|
||||
listUnderTake() {
|
||||
this.$axios.post(loc() + "/listUnderTake").then((res) => {
|
||||
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.underTakeOptions = res.data
|
||||
}
|
||||
@@ -420,11 +340,13 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
this.listOpenSession()
|
||||
this.listUnderTake()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
-210
@@ -1,210 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="教代会">
|
||||
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
|
||||
v-model="pageForm.sessionId">
|
||||
<el-option :key="item.id" :label="item.fullName" :value="item.id"
|
||||
v-for="item in sessionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="提案名称">
|
||||
<el-input v-model="pageForm.name" placeholder="提案名称" @keyup.enter.native="doSearch" clearable
|
||||
style="width: 100%"></el-input>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.createUserKeyword"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool :columns.sync="tableColumns">
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.key"
|
||||
:min-width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="row.caseFilingResult"></dict-tag>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'merge'" scope="{row}">
|
||||
<el-tag v-if="row.merge" size="small">是</el-tag>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">不同意</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../../common/info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sessionOptions: [],
|
||||
tableColumns: [
|
||||
{label: "提案编号", prop: "code"},
|
||||
{label: "提案名称", prop: "name", width: "200px"},
|
||||
{label: "提案类别", prop: "typeName"},
|
||||
{label: "届次", prop: "sessionName"},
|
||||
{label: "代表团", prop: "delegationName"},
|
||||
{label: "当前节点", prop: "curTaskName"},
|
||||
{label: "流程状态", prop: "instanceState"}
|
||||
],
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).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()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 教代会
|
||||
async meetingChange(val) {
|
||||
this.formData.delegationId = null
|
||||
this.formData.committeeId = null
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
// 查询开启的教代会
|
||||
listOpenSession() {
|
||||
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
if (this.sessionOptions) {
|
||||
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
this.listOpenSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
-190
@@ -1,190 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="团长审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/proposal/personnelOffice/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<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(2)">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.listSession()
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
if (this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user