Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2026-03-18 11:48:18 +08:00
56 changed files with 2077 additions and 1715 deletions
@@ -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);
}
@@ -7,7 +7,6 @@ import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.expression.ExpressionUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.hutool.json.JSONUtil;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.base.vo.LabelValueVO;
@@ -281,7 +280,7 @@ public class ProcessInstanceServiceImpl extends BaseServiceImpl<ProcessInstance>
List<ProcessTask> processTaskList = flowEngine.processTaskService().getDoingTaskList(processInstanceId, new String[]{});
// 拿到历史任务-按更新时间倒序
List<ProcessTask> hisProcessTaskList = flowEngine.processTaskService().query(Cnd.where(ProcessTask::getProcessInstanceId, "=", processInstanceId).desc(ProcessTask::getUpdatedAt));
processTaskList.forEach(task -> {
processTaskList.forEach(task -> {
if (!vo.getActiveNodeNames().contains(task.getTaskName())) {
vo.getActiveNodeNames().add(task.getTaskName());
recursionModel(processModel.getStart(), processInstance, processTaskList, hisProcessTaskList, task.getTaskName(), vo);
@@ -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));
@@ -38,7 +38,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@IocBean
@At("/platform/sys/menu")
@@ -391,11 +390,11 @@ public class SysMenuController {
@At
@Ok("json")
@SaCheckPermission("sys.manager.menu.edit")
public Object sortDo(@Param("ids") String ids, HttpServletRequest req) {
public Object sortDo(@Param("ids") String ids, @Param("platform") String platform, HttpServletRequest req) {
try {
String[] menuIds = StringUtils.split(ids, ",");
int i = 0;
sysMenuService.execute(Sqls.create("update sys_menu set location=0"));
sysMenuService.execute(Sqls.create("update sys_menu set location=0 where platform = '%s'".formatted(platform)));
for (String s : menuIds) {
if (!Strings.isBlank(s)) {
sysMenuService.update(org.nutz.dao.Chain.make("location", i), Cnd.where("id", "=", s));
@@ -425,11 +424,11 @@ public class SysMenuController {
@SaCheckPermission("sys.manager.menu")
@ApiOperation("更新首页推荐应用或服务")
public Result updateRecommendSetting(@Param("menuIds") String[] menuIds, String platform, String type) {
String column = "";
switch (type) {
case "app" -> column = "isRecommendApp";
case "service" -> column = "isRecommendService";
}
String column = "";
switch (type) {
case "app" -> column = "isRecommendApp";
case "service" -> column = "isRecommendService";
}
sysMenuService.update(Chain.make(column, 0), Cnd.where("id", "is not", null).and("platform", "=", platform));
if (ArrayUtil.isNotEmpty(menuIds)) {
sysMenuService.update(Chain.make(column, 1), Cnd.where("id", "in", menuIds).and("platform", "=", platform));
@@ -87,9 +87,9 @@ public class SysV4AppsController {
LEFT JOIN sys_module sm ON sm.id = m.moduleId
$condition
""");
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
categoryId = "2";
}
// if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
// categoryId = "2";
// }
Cnd cnd = Cnd.NEW();
cnd.and("m.platform", "=", platform);
cnd.and("m.disabled", "=", false);
@@ -304,7 +304,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
String decodePwd = Base64Decoder.decodeStr(passowrd);
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
if (!Globals.sso) {
if (Globals.sso) {
throw new BaseException("用户名或者密码不正确");
}
}
@@ -68,6 +68,20 @@ public class ExecutiveCommitteeConfigController {
""").setParam("sessionId",sessionId);
List<NutMap> listMap = committeeConfigService.listMap(sql);
config.setUnionQuotaList(listMap);
Sql sql2 = Sqls.create("""
SELECT
dbt.id as delegationId,
dbt.name as delegationName,
dbt.code as delegationCode,
(SELECT count(1) FROM teacher_congress_delegate WHERE delegationId =dbt.id) AS dbCount,
0 as quotaCount
FROM
teacher_congress_delegation dbt
WHERE dbt.sessionId = @sessionId
ORDER BY CODE ASC
""").setParam("sessionId", sessionId);
List<NutMap> listMap2 = committeeConfigService.listMap(sql2);
config.setDelegationQuotaList(listMap2);
}
return Result.success(config);
}
@@ -15,6 +15,7 @@ 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.teachercongress.delegate.models.Teacher_congress_delegate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -40,13 +41,13 @@ import java.util.stream.Collectors;
/**
* @author zhf
* @date 2025/8/25 15:18
* @description 分工会一次推选
* @description 团长一次推选
*/
@IocBean
@At("/platform/executiveCommittee/delegationOnePush")
@Ok("json:full")
@Slf4j
@Api(tags = "执委会推选-分工会主席一次推选")
@Api(tags = "执委会推选-团长一次推选")
public class ExecutiveCommitteeDelegationOnePushController {
@Inject
@@ -60,9 +61,8 @@ public class ExecutiveCommitteeDelegationOnePushController {
public void index() {
}
@At
@ApiOperation("查询某个分工会的一次推选的委员")
@ApiOperation("查询某个代表团的团长一次推选的委员")
@SaCheckPermission("executiveCommittee.delegationOnePush")
public Result pageData(PageForm pageForm,
String teacherMeetId,
@@ -91,13 +91,19 @@ public class ExecutiveCommitteeDelegationOnePushController {
Cnd cnd = Cnd.NEW();
cnd.andEX("t1.teacherMeetId", "=", teacherMeetId);
if (StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()) ||
StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
cnd.andEX("t3.id", "=", unionId);
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.andEX("t1.delegationId", "=", delegationId);
}else{
cnd.andEX("t3.id", "=", SecurityUtil.getUnionId());
Teacher_congress_delegate db = dao.fetch(Teacher_congress_delegate.class,
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
.and(Teacher_congress_delegate::getUserId, "=", SecurityUtil.getUserId()));
if (ObjectUtil.isEmpty(db)) {
return Result.error("没有权限,只有代表团团长才能推选");
}
cnd.andEX("t1.delegationId", "=", db.getDelegationId());
}
cnd.andEX("t1.delegationId", "=", delegationId);
cnd.andEX("t3.id", "=", unionId);
cnd.andEX("t1.addType", "=", 1);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup group = new SqlExpressionGroup();
@@ -115,10 +121,11 @@ public class ExecutiveCommitteeDelegationOnePushController {
@ApiOperation("查询可以推选委员和已经推选的人员")
@SaCheckPermission("executiveCommittee.delegationOnePush")
public Result getDelegationUser(String teacherMeetId) {
if (!(StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()) ||
StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()))) {
return Result.error("没有权限,只有分工会主席才能推选");
Teacher_congress_delegate db = dao.fetch(Teacher_congress_delegate.class,
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
.and(Teacher_congress_delegate::getUserId, "=", SecurityUtil.getUserId()));
if (ObjectUtil.isEmpty(db)) {
return Result.error("没有权限,只有代表团团长才能推选");
}
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
Cnd.where(ExecutiveCommitteeConfig::getTeacherMeetId, "=", teacherMeetId));
@@ -137,6 +144,11 @@ public class ExecutiveCommitteeDelegationOnePushController {
List<ExecutiveCommitteeOnePush> onePushList = dao.query(ExecutiveCommitteeOnePush.class, Cnd.NEW());
List<String> userIds = onePushList.stream().map(v -> v.getUserId()).collect(Collectors.toList());
Cnd cnd = Cnd.NEW();
cnd.andEX("db.sessionId", "=", teacherMeetId);
cnd.andEX("db.userId", "not in", userIds);
cnd.andEX("db.userId", "!=", SecurityUtil.getUserId());
cnd.and("db.delegationId", "=", db.getDelegationId());
Sql sql = Sqls.create("""
SELECT
db.*,
@@ -148,33 +160,29 @@ public class ExecutiveCommitteeDelegationOnePushController {
LEFT JOIN `vw_user` u ON db.userId = u.id
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.andEX("db.sessionId", "=", teacherMeetId);
cnd.andEX("db.userId", "not in", userIds);
cnd.andEX("db.userId", "!=", SecurityUtil.getUserId());
cnd.and("db.unionId", "=", SecurityUtil.getUnionId());
sql.setCondition(cnd);
List<NutMap> userData = baseService.listMap(sql);
List<NutMap> unionQuotaList = config.getUnionQuotaList();
NutMap unionQuota = unionQuotaList.stream().filter(v -> v.get("unionId").equals(SecurityUtil.getUnionId())).findFirst().orElse(null);
if (Lang.isNotEmpty(unionQuota)) {
return Result.success(Map.of("userData", userData, "userValue", userValue, "quotaCount", unionQuota.getInt("quotaCount")));
List<NutMap> delegationQuotaList = config.getDelegationQuotaList();
NutMap delegationQuota = delegationQuotaList.stream().filter(v -> v.get("delegationId").equals(db.getDelegationId())).findFirst().orElse(null);
if (Lang.isNotEmpty(delegationQuota)) {
return Result.success(Map.of("userData", userData, "userValue", userValue, "quotaCount", delegationQuota.getInt("quotaCount")));
}
return Result.success(Map.of("userData", userData, "userValue", userValue, "quotaCount", 0));
}
@At
@SaCheckPermission("executiveCommittee.delegationOnePush")
@SLog(tag = "执委会推选-分工会主席推选委员", msg = "推选委员")
@SLog(tag = "执委会推选-团长推选委员", msg = "推选委员")
public Result addOnePush(@Param("userValue") String[] userValue,
String teacherMeetId) {
try {
if (!(StpUtil.hasRole(RoleConstant.SYSADMIN.name()) ||
StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()) ||
StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()))) {
return Result.error("没有权限,只有分工会主席才能推选");
Teacher_congress_delegate db = dao.fetch(Teacher_congress_delegate.class,
Cnd.where(Teacher_congress_delegate::getSessionId, "=", teacherMeetId)
.and(Teacher_congress_delegate::getUserId, "=", SecurityUtil.getUserId()));
if (ObjectUtil.isEmpty(db)) {
return Result.error("没有权限,只有代表团团长才能推选");
}
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
@@ -188,20 +196,19 @@ public class ExecutiveCommitteeDelegationOnePushController {
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
return Result.error("一次预选已结束");
}
List<NutMap> unionQuotaList = config.getUnionQuotaList();
List<NutMap> delegationQuotaList = config.getDelegationQuotaList();
NutMap unionQuota = unionQuotaList.stream().filter(v -> v.getString("unionId").equals(SecurityUtil.getUnionId())).findFirst().orElse(null);
if (ObjectUtil.isEmpty(unionQuota)) {
return Result.error("请先配置分工会人数");
NutMap delegationQuota = delegationQuotaList.stream().filter(v -> v.getString("delegationId").equals(db.getDelegationId())).findFirst().orElse(null);
if (ObjectUtil.isEmpty(delegationQuota)) {
return Result.error("请先配置代表团人数");
}
int dbCount = dao.count(ExecutiveCommitteeOnePush.class,
Cnd.where("unionId", "=", SecurityUtil.getUnionId())
Cnd.where("delegationId", "=", db.getDelegationId())
.and("teacherMeetId", "=", teacherMeetId)
.and("addType", "=", 1));
assert unionQuota != null;
if (dbCount + userValue.length > unionQuota.getInt("quotaCount")) {
return Result.error("推选人数限制" + unionQuota.getInt("quotaCount") + "");
if (dbCount + userValue.length > delegationQuota.getInt("quotaCount")) {
return Result.error("推选人数限制" + delegationQuota.getInt("quotaCount") + "");
}
Sql sql = Sqls.create("""
SELECT
@@ -229,7 +236,6 @@ public class ExecutiveCommitteeDelegationOnePushController {
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")));
@@ -247,7 +253,7 @@ public class ExecutiveCommitteeDelegationOnePushController {
@At
@SaCheckPermission("executiveCommittee.delegationOnePush")
@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));
@@ -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();
}
@@ -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"));
@@ -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("字符串不能为空");
@@ -0,0 +1,197 @@
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.pinyin.PinyinUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
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.base.utils.PageUtil;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.flow.service.FlowCommonService;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeOnePush;
import com.budwk.app.zhgh.democratic.executiveCommittee.models.ExecutiveCommitteeUnionPushInfo;
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
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.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.ArrayList;
import java.util.List;
/**
* @author zhf
* @date 2026/3/13 16:09
* @description 党委书记审核
*/
@IocBean
@At("/platform/executiveCommittee/pushDwSjAudit")
@Ok("json:full")
@Slf4j
@Api(tags = "两委会委员推选-党委书记审查")
public class ExecutiveCommitteePushDwSjAuditController {
@Inject
private BaseService baseService;
@Inject
private FlowCommonService flowCommonService;
@Inject
private FlowEngine flowEngine;
@At("")
@SaCheckPermission("executiveCommittee.pushDwSjAudit")
@Ok("beetl:/platform/zhgh/democratic/executiveCommittee/pushDwSjAudit/index.html")
public void index() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("executiveCommittee.pushDwSjAudit")
public Result pageData(PageForm pageForm,
@Param(value = "teacherMeetId") String teacherMeetId,
@Param(value = "unionId") String unionId,
@Param(value = "approval") Boolean approval) {
Sql sql = Sqls.create("""
SELECT
info.*,
tcd.loginName,
tcd.userName,
tcd.age,
tcd.sex,
tcd.unitName,
tcd.unionName,
ion.`name` 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 executive_committee_union_push_info info ON info.id = ins.businessNo
LEFT JOIN teacher_congress_delegate tcd on tcd.sessionId=@sessionId and tcd.userId=info.userId
LEFT JOIN teacher_congress_delegation ion on ion.id=tcd.delegationId
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
$condition
""").setParam("sessionId", teacherMeetId);
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "4d57210e-076e-4446-a3b3-139397e4e6de");
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name())) {
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
}
cnd.andEX("info.teacherMeetId", "=", teacherMeetId);
cnd.andEX("info.unionId", "=", unionId);
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup group = new SqlExpressionGroup();
group.orLike("info.userName", pageForm.getSearchKeyword());
group.orLike("info.loginName", pageForm.getSearchKeyword());
cnd.and(group);
}
cnd.groupBy("t.id");
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("t.createdAt");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
Pagination<NutMap> pageVO = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO);
}
@At
@ApiOperation("提交")
@SaCheckPermission("executiveCommittee.pushDwSjAudit")
public Result executeTask(@Param("data") String data) {
Dict args = Json.fromJson(Dict.class, data);
flowCommonService.executeTask(args);
List<ExecutiveCommitteeOnePush> pushArrayList = new ArrayList<>();
if (args.getInt("submitType") == 1) {
ExecutiveCommitteeUnionPushInfo pushInfo = baseService.dao().fetch(ExecutiveCommitteeUnionPushInfo.class, args.getStr("bizId"));
Teacher_congress_delegate delegate = baseService.dao().fetch(Teacher_congress_delegate.class,
Cnd.where(Teacher_congress_delegate::getUserId, "=", pushInfo.getUserId())
.and(Teacher_congress_delegate::getSessionId, "=", pushInfo.getTeacherMeetId()));
ExecutiveCommitteeOnePush onePush = new ExecutiveCommitteeOnePush();
onePush.setUserId(pushInfo.getUserId());
onePush.setTeacherMeetId(pushInfo.getTeacherMeetId());
onePush.setUnionId(delegate.getUnionId());
onePush.setUnitId(delegate.getUnitId());
onePush.setDelegationId(delegate.getDelegationId());
onePush.setUserName(delegate.getUserName());
onePush.setLoginName(delegate.getLoginName());
String firstLetter = String.valueOf(getFirstLetter(delegate.getUserName()));
onePush.setFirstLetter(firstLetter);
onePush.setAddType(3);
onePush.setPushDate(DateUtil.date());
pushArrayList.add(onePush);
}
baseService.dao().insert(pushArrayList);
return Result.success();
}
public static char getFirstLetter(String str) {
if (str == null || str.isEmpty()) {
throw new IllegalArgumentException("字符串不能为空");
}
char firstChar = str.charAt(0);
if (Validator.isChinese(String.valueOf(firstChar))) {
return Character.toUpperCase(PinyinUtil.getPinyin(firstChar).charAt(0));
} else if (Character.isLetter(firstChar)) {
return Character.toUpperCase(firstChar);
} else {
return firstChar;
}
}
}
@@ -0,0 +1,290 @@
package com.budwk.app.zhgh.democratic.executiveCommittee.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
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.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowEngine;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
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.ExecutiveCommitteeUnionPushInfo;
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author zhf
* @date 2026/3/13 11:32
* @description 分工会推选
*/
@IocBean
@At("/platform/executiveCommittee/unionPush")
@Ok("json:full")
@Slf4j
@Api(tags = "两委会委员推选-分工会推选")
public class ExecutiveCommitteeUnionPushController {
@Inject
private Dao dao;
@Inject
private BaseService baseService;
@Inject
private FlowEngine flowEngine;
@At("")
@SaCheckPermission("executiveCommittee.unionPush")
@Ok("beetl:/platform/zhgh/democratic/executiveCommittee/unionPush/index.html")
public void index() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("executiveCommittee.unionPush")
public Result pageData(PageForm pageForm,
@Param(value = "teacherMeetId") String teacherMeetId,
@Param(value = "unionId") String unionId) {
Sql sql = Sqls.create("""
SELECT
info.*,
tcd.loginName,
tcd.userName,
tcd.age,
tcd.sex,
tcd.unitName,
tcd.unionName,
ion.`name` 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 t.displayName),'结束') curTaskName,
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask') AS startTaskId
FROM
executive_committee_union_push_info info
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN teacher_congress_delegate tcd on tcd.sessionId=@sessionId and tcd.userId=info.userId
LEFT JOIN teacher_congress_delegation ion on ion.id=tcd.delegationId
$condition
""").setParam("sessionId", teacherMeetId);
Cnd cnd = Cnd.NEW();
cnd.andEX("info.teacherMeetId", "=", teacherMeetId);
cnd.andEX("info.unionId", "=", unionId);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup group = new SqlExpressionGroup();
group.orLike("info.userName", pageForm.getSearchKeyword());
group.orLike("info.loginName", pageForm.getSearchKeyword());
cnd.and(group);
}
cnd.desc("info.createdAt");
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
if (AuthUtil.hasRole(RoleConstant.UNIT_PARTY_SECRETARY.name())) {
cnd.andEX("info.unionId", "=", SecurityUtil.getUnionId());
} else {
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
}
}
cnd.groupBy("info.id");
sql.setCondition(cnd);
Pagination<NutMap> pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@ApiOperation("查询可以推选委员和已经推选的人员")
@SaCheckPermission("executiveCommittee.unionPush")
public Result getUnionUser(String teacherMeetId) {
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
Cnd.where(ExecutiveCommitteeConfig::getTeacherMeetId, "=", teacherMeetId));
if (ObjectUtil.isEmpty(config)) {
return Result.error("请先配置基础信息");
}
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
return Result.error("请等待一次预选开始时间");
}
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
return Result.error("一次预选已结束");
}
List<ExecutiveCommitteeOnePush> userValue = dao.query(ExecutiveCommitteeOnePush.class,
Cnd.where("teacherMeetId", "=", teacherMeetId));
List<ExecutiveCommitteeOnePush> onePushList = dao.query(ExecutiveCommitteeOnePush.class, Cnd.NEW());
List<String> userIds = onePushList.stream().map(v -> v.getUserId()).collect(Collectors.toList());
List<ExecutiveCommitteeUnionPushInfo> pushInfoList = dao.query(ExecutiveCommitteeUnionPushInfo.class, Cnd.where(ExecutiveCommitteeUnionPushInfo::getTeacherMeetId, "=", teacherMeetId));
List<String> unionPushUserIds = pushInfoList.stream().map(v -> v.getUserId()).toList();
Cnd cnd = Cnd.NEW();
cnd.andEX("db.sessionId", "=", teacherMeetId);
cnd.andEX("db.userId", "not in", userIds);
cnd.andEX("db.userId", "not in", unionPushUserIds);
cnd.andEX("db.userId", "!=", SecurityUtil.getUserId());
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
Sql sql = Sqls.create("""
SELECT
db.*,
u.professionalTitle,
u.professionalLevel,
TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) AS age
FROM
teacher_congress_delegate db
LEFT JOIN `vw_user` u ON db.userId = u.id
$condition
""");
sql.setCondition(cnd);
List<NutMap> userData = baseService.listMap(sql);
List<NutMap> unionQuotaList = config.getUnionQuotaList();
NutMap unionQuota = unionQuotaList.stream().filter(v -> v.getString("unionId").equals(SecurityUtil.getUnionId())).findFirst().orElse(null);
if (Lang.isNotEmpty(unionQuota)) {
return Result.success(Map.of("userData", userData, "userValue", userValue, "quotaCount", unionQuota.getInt("quotaCount")));
}
return Result.success(Map.of("userData", userData, "userValue", userValue, "quotaCount", 0));
}
@At
@Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("executiveCommittee.unionPush")
@SLog(tag = "执委会推选-分工会推选委员", msg = "推选委员")
public Result addPush(@Param("userValue") String[] userValue,
String teacherMeetId) {
ExecutiveCommitteeConfig config = dao.fetch(ExecutiveCommitteeConfig.class,
Cnd.where("teacherMeetId", "=", teacherMeetId));
if (ObjectUtil.isEmpty(config)) {
return Result.error("请先配置基础信息");
}
if (config.getFirstStartTime().getTime() > System.currentTimeMillis()) {
return Result.error("请等待一次预选开始时间");
}
if (config.getFirstEndTime().getTime() < System.currentTimeMillis()) {
return Result.error("一次预选已结束");
}
List<NutMap> unionQuotaList = config.getUnionQuotaList();
NutMap unionQuota = unionQuotaList.stream().filter(v -> v.getString("unionId").equals(SecurityUtil.getUnionId())).findFirst().orElse(null);
if (ObjectUtil.isEmpty(unionQuota)) {
return Result.error("请先配置分工会人数");
}
int dbCount = dao.count(ExecutiveCommitteeUnionPushInfo.class,
Cnd.where(ExecutiveCommitteeUnionPushInfo::getUnionId, "=", SecurityUtil.getUnionId())
.and(ExecutiveCommitteeUnionPushInfo::getTeacherMeetId, "=", teacherMeetId));
if (dbCount + userValue.length > unionQuota.getInt("quotaCount")) {
return Result.error("推选人数限制" + unionQuota.getInt("quotaCount") + "");
}
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<Teacher_congress_delegate> dbList = baseService.listVO(sql, Teacher_congress_delegate.class);
List<ExecutiveCommitteeUnionPushInfo> list = new ArrayList<>();
for (String id : userValue) {
Teacher_congress_delegate jdhDb = dbList.stream().filter(v -> v.getUserId().equals(id)).findFirst().orElse(null);
if (ObjectUtil.isEmpty(jdhDb)) {
return Result.error("请选择正确的代表!");
}
ExecutiveCommitteeUnionPushInfo pushInfo = new ExecutiveCommitteeUnionPushInfo();
pushInfo.setPushDate(DateUtil.date());
pushInfo.setUserId(jdhDb.getUserId());
pushInfo.setUnionId(jdhDb.getUnionId());
pushInfo.setUnitId(jdhDb.getUnitId());
pushInfo.setTeacherMeetId(teacherMeetId);
list.add(pushInfo);
}
dao.insert(list);
list.forEach(ExecutiveCommitteeUnionPushInfo -> {
// 开启流程实例
Dict args = Dict.create();
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, ExecutiveCommitteeUnionPushInfo);
ProcessInstance instance = flowEngine.startProcessInstanceByKey("LWHHY", ExecutiveCommitteeUnionPushInfo.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
for (ProcessTask task : doingTaskList) {
flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args);
}
});
return Result.success();
}
@At
@ApiOperation("删除")
@SaCheckPermission("executiveCommittee.unionPush")
@SLog(tag = "删除推选代表", msg = "删除推选代表")
public Result doDelete(String id){
baseService.dao().delete(ExecutiveCommitteeUnionPushInfo.class, id);
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
return Result.success();
}
}
@@ -51,6 +51,11 @@ public class ExecutiveCommitteeConfig extends BaseModel implements Serializable
@ColDefine(type = ColType.INT)
private Integer unionQuotaCount;
@Column
@Comment("代表团推荐名额总数")
@ColDefine(type = ColType.INT)
private Integer delegationQuotaCount;
@Column
@Comment("一次预选开始时间")
@ColDefine(type = ColType.DATETIME)
@@ -76,4 +81,9 @@ public class ExecutiveCommitteeConfig extends BaseModel implements Serializable
@ColDefine(type = ColType.MYSQL_JSON)
private List<NutMap> unionQuotaList;
@Column
@Comment("各代表团名额数")
@ColDefine(type = ColType.MYSQL_JSON)
private List<NutMap> delegationQuotaList;
}
@@ -66,4 +66,15 @@ public class ExecutiveCommitteeTwoPush extends BaseModel implements Serializable
@Comment("推选时间")
@ColDefine(type = ColType.DATETIME)
private DateTime pushDate;
@Column
@Comment("录入类型1.执委会委员/2.工会委员会委员/3.经审委员会委员")
@ColDefine(type = ColType.VARCHAR,width = 30)
private String roleCode;
@Column
@Comment("是否正式委员")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isFormal;
}
@@ -0,0 +1,52 @@
package com.budwk.app.zhgh.democratic.executiveCommittee.models;
import cn.hutool.core.date.DateTime;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* @author zhf
* @date 2026/3/13 14:32
* @description 分工会推选记录表
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table("executive_committee_union_push_info")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("分工会推选记录表")
public class ExecutiveCommitteeUnionPushInfo extends BaseModel {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("代表用户ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("所属教代会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String teacherMeetId;
@Column
@Comment("所属分工会")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionId;
@Column
@Comment("单位ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unitId;
@Column
@Comment("推选时间")
@ColDefine(type = ColType.DATETIME)
private DateTime pushDate;
}
@@ -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
@@ -94,7 +94,7 @@ public class OpinionWriteController {
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, opinionInfo);
ProcessInstance instance = flowEngine.startProcessInstanceByKey("JDHYJ", opinionInfo.getId(), opinionInfo.getCreateUserId(), args);
ProcessInstance instance = flowEngine.startProcessInstanceByKey("JDHYJ", opinionInfo.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务
List<ProcessTask> doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null);
@@ -2,11 +2,14 @@ package com.budwk.app.zhgh.democratic.proposal.controller.query;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
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.zhgh.democratic.proposal.controller.vo.ProposalInfoPageVO;
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.ProposalQueryComprehensiveParam;
import com.budwk.app.zhgh.democratic.proposal.service.common.ProposalCommonService;
import io.swagger.annotations.Api;
@@ -24,7 +27,6 @@ import org.nutz.mvc.annotation.Param;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.Arrays;
@IocBean
@At("/platform/proposal/query/comprehensive")
@@ -65,6 +67,7 @@ public class ProposalQueryComprehensiveController {
GROUP_CONCAT(DISTINCT CASE WHEN pru.isMaster = 0 THEN pru.unitName END) AS slaveUnitNames
FROM
proposal_info info
LEFT JOIN vw_user us ON us.loginname=info.createUserLoginName
LEFT JOIN proposal_type type on type.id = info.typeId
LEFT JOIN proposal_merge mer ON mer.proposalId = info.id
LEFT JOIN teacher_congress_session tcs on tcs.id = info.sessionId
@@ -77,25 +80,25 @@ public class ProposalQueryComprehensiveController {
$condition
""");
Cnd cnd = Cnd.NEW();
if(ArrayUtil.isNotEmpty(pageForm.getOrigins())){
if (ArrayUtil.isNotEmpty(pageForm.getOrigins()) && ObjectUtil.isNotEmpty(pageForm.getCommonKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
// 案名
if(ArrayUtil.contains(pageForm.getOrigins(),"name")){
if (ArrayUtil.contains(pageForm.getOrigins(), "name")) {
for (String keyword : pageForm.getCommonKeyword().split(" ")) {
seg.orLike("info.name", keyword);
}
}
// 案由
if(ArrayUtil.contains(pageForm.getOrigins(),"brief")){
if (ArrayUtil.contains(pageForm.getOrigins(), "brief")) {
for (String keyword : pageForm.getCommonKeyword().split(" ")) {
seg.orLike("info.brief", keyword);
}
}
// 提案人
if(ArrayUtil.contains(pageForm.getOrigins(),"createUserName")){
if (ArrayUtil.contains(pageForm.getOrigins(), "createUserName")) {
for (String keyword : pageForm.getCommonKeyword().split(" ")) {
seg.orLike("info.createUserName", keyword);
seg.orLike("info.createUserLoginName", keyword);
@@ -103,21 +106,24 @@ public class ProposalQueryComprehensiveController {
}
// 答复内容
if(ArrayUtil.contains(pageForm.getOrigins(),"answer")){
if (ArrayUtil.contains(pageForm.getOrigins(), "answer")) {
for (String keyword : pageForm.getCommonKeyword().split(" ")) {
seg.orLike("JSON_EXTRACT(replyTask.variable,'$.tf_opinion')", keyword);
}
}
if(!seg.isEmpty()){
if (!seg.isEmpty()) {
cnd.and(seg);
}
}
if(StrUtil.isNotBlank(pageForm.getUnderTakeUnitId())){
if (StrUtil.isNotBlank(pageForm.getUnderTakeUnitId())) {
cnd.andEX("pru.unitId", "=", pageForm.getUnderTakeUnitId());
}
ProposalQueryComprehensiveParam.buildSearch(cnd, pageForm);
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),RoleConstant.SCHOOL_UNION_PROPOSAL_ADMIN.name())){
cnd.and("us.unionId", "=", SecurityUtil.getUnionId());
}
cnd.groupBy("info.id");
sql.setCondition(cnd);
Pagination pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
@@ -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(399L);
}
baseService.update(tasks);
baseService.update(actorList);
baseService.update(instanceList);
return Result.success();
}
}
@@ -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);
}
}
@@ -1,13 +1,11 @@
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.ProposalSecondedService;
@@ -101,7 +99,7 @@ public class ProposalSecondedController {
Cnd cnd = Cnd.NEW();
cnd.and("t.taskName", "=", "second");
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
if (!SecurityUtil.getUserLoginname().equals("sysadmin")) {
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
}
@@ -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();
}
}
@@ -1,24 +1,23 @@
package com.budwk.app.zhgh.democratic.proposal.interceptor;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowInterceptor;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.flow.entity.ProcessTask;
import com.budwk.app.sys.models.Sys_role;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.sys.models.Sys_user_role;
import com.budwk.app.sys.services.SysRoleService;
import com.budwk.app.zhgh.democratic.proposal.models.ProposalInfo;
import com.budwk.app.zhgh.democratic.teachercongress.delegation.models.Teacher_congress_delegation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import java.util.List;
/**
* @ClassName ProposalDelegationPrefixInterceptor
* @Author JyuHsin
@@ -77,6 +76,12 @@ public class ProposalDelegationPrefixInterceptor implements FlowInterceptor {
execution.getArgs().set(FlowConst.TASK_FORM_DATA_PREFIX + "delegationAudit", delegationAudit);
ProcessTask processTask = execution.getProcessTask();
Dict dict = JSONUtil.toBean(processTask.getVariable(), Dict.class);
dict.set(FlowConst.TASK_FORM_DATA_PREFIX + "delegationAudit", delegationAudit);
processTask.setVariable(JSONUtil.toJsonStr(dict));
dao.update(processTask);
// 存储一些参数,方便查询副团长
execution.getArgs().set("sessionId", proposalInfo.getSessionId());
execution.getArgs().set("delegationId", proposalInfo.getDelegationId());
@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HtmlUtil;
import com.budwk.app.base.param.ExportTableColumns;
@@ -192,25 +193,30 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
// 添加序号,去除富文本,获取附议人
for (int i = 0; i < list.size(); i++) {
list.get(i).put("index", i + 1);
list.get(i).put("brief", HtmlUtil.cleanHtmlTag(list.get(i).getString("brief")));
list.get(i).put("measures", HtmlUtil.cleanHtmlTag(list.get(i).getString("measures")));
list.get(i).put("brief", HtmlUtil.cleanHtmlTag(list.get(i).getString("brief")).replaceAll("&nbsp;"," "));
list.get(i).put("measures", HtmlUtil.cleanHtmlTag(list.get(i).getString("measures")).replaceAll("&nbsp;"," "));
// 流程实例
ProcessInstance instance = dao().fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", list.get(i).getString("id")));
// 查询附议人信息
ProcessTask inviteTask = dao().fetch(ProcessTask.class,
Cnd.where(ProcessTask::getProcessInstanceId, "=", instance.getId())
.and(ProcessTask::getTaskName, "=", "invite")
.and(ProcessTask::getTaskState, "in",
List.of(ProcessTaskStateEnum.DOING.getCode(), ProcessTaskStateEnum.FINISHED.getCode()))
.desc(ProcessTask::getCreatedAt));
if (ObjectUtil.isNotEmpty(instance)){
ProcessTask inviteTask = dao().fetch(ProcessTask.class,
Cnd.where(ProcessTask::getProcessInstanceId, "=", instance.getId())
.and(ProcessTask::getTaskName, "=", "invite")
.and(ProcessTask::getTaskState, "in",
List.of(ProcessTaskStateEnum.DOING.getCode(), ProcessTaskStateEnum.FINISHED.getCode()))
.desc(ProcessTask::getCreatedAt));
if (inviteTask != null) {
NutMap variable = Json.fromJson(NutMap.class, inviteTask.getVariable());
List<NutMap> seconders = variable.getAsList(FlowConst.TASK_FORM_DATA_PREFIX + "seconder", NutMap.class);
list.get(i).put("secondedUserNames", seconders.stream().map(v -> v.getString("userName")).collect(Collectors.joining(",")));
if (inviteTask != null) {
NutMap variable = Json.fromJson(NutMap.class, inviteTask.getVariable());
List<NutMap> seconders = variable.getAsList(FlowConst.TASK_FORM_DATA_PREFIX + "seconder", NutMap.class);
if (seconders != null){
list.get(i).put("secondedUserNames", seconders.stream().map(v -> v.getString("userName")).collect(Collectors.joining(",")));
}
}
}
}
List<ExcelExportEntity> exportEntities = new ArrayList<>();
@@ -570,8 +576,8 @@ public class ProposalExportServiceImpl extends BaseServiceImpl<ProposalInfo> imp
// 添加序号,去除富文本,获取附议人
for (int i = 0; i < list.size(); i++) {
list.get(i).put("index", i + 1);
list.get(i).put("brief", HtmlUtil.cleanHtmlTag(list.get(i).getString("brief")));
list.get(i).put("measures", HtmlUtil.cleanHtmlTag(list.get(i).getString("measures")));
list.get(i).put("brief", HtmlUtil.cleanHtmlTag(list.get(i).getString("brief")).replaceAll("&nbsp;"," "));
list.get(i).put("measures", HtmlUtil.cleanHtmlTag(list.get(i).getString("measures")).replaceAll("&nbsp;"," "));
// 流程实例
// ProcessInstance instance = dao().fetch(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "=", list.get(i).getString("id")));
@@ -1,10 +1,12 @@
package com.budwk.app.zhgh.democratic.teachercongress.common;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.stp.StpUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.result.Result;
import com.budwk.app.sys.models.Sys_role;
import com.budwk.app.sys.services.SysRoleService;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.zhgh.democratic.teachercongress.delegate.models.Teacher_congress_delegate;
import com.budwk.app.zhgh.democratic.teachercongress.delegation.models.Teacher_congress_delegation;
import com.budwk.app.zhgh.democratic.teachercongress.prepare.models.Teacher_congress_session;
@@ -14,6 +16,7 @@ import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Strings;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@@ -54,10 +57,14 @@ public class TeacherCongressCommonController {
@At
@SaCheckLogin
public Result listDelegate(String sessionId, String keyWord) {
public Result listDelegate(String sessionId, String delegationId,String keyWord) {
Cnd cnd = Cnd.NEW();
cnd.and("sessionId", "=", sessionId);
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())&&!AuthUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and("delegationId", "=", delegationId);
}
SqlExpressionGroup group = new SqlExpressionGroup();
group.orLike("userName", keyWord);
group.orLike("loginName", keyWord);
@@ -1,6 +1,7 @@
package com.budwk.app.zhgh.staffbenefit.benefiting.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
@@ -47,7 +48,7 @@ public class BenefitingProjectManageController {
@At
@SaCheckPermission(value = {"benefiting.manage","benefiting.list"})
@SaCheckPermission(value = {"benefiting.manage", "benefiting.list"}, mode = SaMode.OR)
public Result pageData(PageForm pageForm,Integer year,String projectName) {
Sql sql = Sqls.create("""
select * from benefiting_project $condition
@@ -63,7 +64,7 @@ public class BenefitingProjectManageController {
@At
@SaCheckPermission("benefiting.manage")
@SaCheckPermission(value = {"benefiting.manage", "benefiting.list"}, mode = SaMode.OR)
public Result doSubmit(BenefitingProject benefitingProject) {
benefitingProject.setCreateTime(new Date());
baseService.insertOrUpdate(benefitingProject);
@@ -72,7 +73,7 @@ public class BenefitingProjectManageController {
@At
@SaCheckPermission("benefiting.manage")
@SaCheckPermission(value = {"benefiting.manage", "benefiting.list"}, mode = SaMode.OR)
public Result doDelete(String id) {
baseService.dao().delete(BenefitingProject.class, id);
return Result.success();
@@ -80,7 +81,7 @@ public class BenefitingProjectManageController {
@At
@SaCheckPermission("benefiting.manage")
@SaCheckPermission(value = {"benefiting.manage", "benefiting.list"}, mode = SaMode.OR)
public Result findOne(String id) {
BenefitingProject project = baseService.dao().fetch(BenefitingProject.class, id);
return Result.success(project);
+1 -1
View File
@@ -59,4 +59,4 @@ create index qz_ft_jg on sys_qrtz_fired_triggers(SCHED_NAME,JOB_GROUP)
/*QUARTZ_52*/
create index qz_ft_t_g on sys_qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
/*QUARTZ_53*/
create index qz_ft_tg on sys_qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP)
create index qz_ft_tg on sys_qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP)
+1 -1
View File
@@ -59,4 +59,4 @@ create index qz_ft_jg on sys_qrtz_fired_triggers(SCHED_NAME,JOB_GROUP)
/*QUARTZ_52*/
create index qz_ft_t_g on sys_qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
/*QUARTZ_53*/
create index qz_ft_tg on sys_qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP)
create index qz_ft_tg on sys_qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP)
File diff suppressed because one or more lines are too long
@@ -14,7 +14,8 @@
<!-- 引入 core 包和对应 css-->
<script src="/assets/platform/plugins/logicflow/logic-flow.js"></script>
<link rel="stylesheet" href="/assets/platform/plugins/logicflow/index.css"/>
<script src="https://cdn.jsdelivr.net/npm/@logicflow/extension@2.1.4/dist/index.min.js"></script>
<script src="/assets/platform/plugins/logicflow/index.min.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/@logicflow/extension@2.1.4/dist/index.min.js"></script>-->
<script src="/assets/platform/plugins/snaker/SnakerflowDesigner.umd.js"></script>
<style>
#snaker-flow-preview {
@@ -2,25 +2,25 @@
layout("/layouts/platform.html"){
#-->
<style>
.context-menu {
position: fixed;
background: #fff;
border: 1px solid #dcdfe6;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
z-index: 3000;
list-style: none;
padding: 5px 0;
margin: 0;
font-size: 14px;
}
.context-menu li {
padding: 7px 20px;
cursor: pointer;
}
.context-menu li:hover {
background: #f2f6fc;
}
.context-menu {
position: fixed;
background: #fff;
border: 1px solid #dcdfe6;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
z-index: 3000;
list-style: none;
padding: 5px 0;
margin: 0;
font-size: 14px;
}
.context-menu li {
padding: 7px 20px;
cursor: pointer;
}
.context-menu li:hover {
background: #f2f6fc;
}
</style>
<div id="app" v-cloak>
<el-card shadow="never">
@@ -52,17 +52,17 @@ layout("/layouts/platform.html"){
</el-button>
</table-tool>
<el-table
:data="tableData"
:highlight-current-row="true"
:key="tableKey"
:load="loadChild"
@row-contextmenu="openMenu"
:expand-row-keys="expandedRowKeysRenew"
@expand-change="handleExpandChange"
ref="tableData"
style="width: 100%"
lazy
row-key="id"
:data="tableData"
:highlight-current-row="true"
:key="tableKey"
:load="loadChild"
@row-contextmenu="openMenu"
:expand-row-keys="expandedRowKeysRenew"
@expand-change="handleExpandChange"
ref="tableData"
style="width: 100%"
lazy
row-key="id"
>
<el-table-column align="left" header-align="left" label="菜单名称" prop="name" width="200"></el-table-column>
<el-table-column align="center" header-align="center" label="菜单图标" prop="icon" width="100">
@@ -124,13 +124,13 @@ layout("/layouts/platform.html"){
</el-table-column>
</el-table>
<!-- 右键菜单 -->
<ul v-show="menuVisible" class="context-menu" :style="{left: menuLeft + 'px', top: menuTop + 'px'}">
<li @click="handleAddMenu(currentRow)">新建菜单</li>
<li v-if="showAddMenu" @click="handleAddChildMenu(currentRow)">添加子菜单</li>
<li @click="handleEdit(currentRow)">编辑</li>
<li @click="handleDelete(currentRow)">删除</li>
</ul>
<!-- 右键菜单 -->
<ul v-show="menuVisible" class="context-menu" :style="{left: menuLeft + 'px', top: menuTop + 'px'}">
<li @click="handleAddMenu(currentRow)">新建菜单</li>
<li v-if="showAddMenu" @click="handleAddChildMenu(currentRow)">添加子菜单</li>
<li @click="handleEdit(currentRow)">编辑</li>
<li @click="handleDelete(currentRow)">删除</li>
</ul>
</el-card>
@@ -140,7 +140,7 @@ layout("/layouts/platform.html"){
<sort ref="sortRef" @refresh="doSearch"></sort>
<recommend-setting ref="recommendSettingRef" @refresh="doSearch"></recommend-setting>
</div>
<script>
<script nonce="${cspNonce!}">
<!--#include("permissionForm.js"){}#-->
<!--#include("basicForm.js"){}#-->
<!--#include("sort.js"){}#-->
@@ -165,65 +165,65 @@ layout("/layouts/platform.html"){
expandedRowKeysRenew: [],
tableTreeRefreshTool: [],
// 右键打开菜单相关
currentRow: null,
menuVisible: false,
menuLeft: 0,
menuTop: 0,
showAddMenu: false,
// 右键打开菜单相关
currentRow: null,
menuVisible: false,
menuLeft: 0,
menuTop: 0,
showAddMenu: false,
}
},
methods: {
/* 右键行 */
openMenu(row, column, event) {
this.showAddMenu = row.type === 'menu';
// 阻止浏览器默认菜单
event.preventDefault();
this.currentRow = row;
/* 右键行 */
openMenu(row, column, event) {
this.showAddMenu = row.type === 'menu';
// 阻止浏览器默认菜单
event.preventDefault();
this.currentRow = row;
this.menuVisible = true;
this.$nextTick(() => {
const menu = this.$el.querySelector('.context-menu');
const h = menu.offsetHeight || 100;
const sh = document.documentElement.clientHeight;
let top = event.clientY;
if (top + h > sh) top -= h;
this.menuLeft = event.clientX;
this.menuTop = top;
});
},
// 新建菜单
handleAddMenu(row) {
console.log(row)
this.$refs.basicFormRef.onOpen(null, this.pageForm.platform)
},
handleAddChildMenu(row) {
this.$refs.basicFormRef.addChildMenu(row, this.pageForm.platform)
},
handleEdit(row) {
// 判断子菜单的type是权限还是菜单
if (row.type === 'menu') {
this.$refs.basicFormRef.onOpen(row.id, this.pageForm.platform)
} else {
this.$refs.permissionFormRef.onOpen(row.id)
}
},
handleDelete(row) {
// 删除逻辑
console.log(row)
this.$confirm("此操作将删除 " + row.name, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/sys/menu/delete/" + row.id).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.loadChildByExpandedKeys()
}
})
})
},
this.menuVisible = true;
this.$nextTick(() => {
const menu = this.$el.querySelector('.context-menu');
const h = menu.offsetHeight || 100;
const sh = document.documentElement.clientHeight;
let top = event.clientY;
if (top + h > sh) top -= h;
this.menuLeft = event.clientX;
this.menuTop = top;
});
},
// 新建菜单
handleAddMenu(row) {
console.log(row)
this.$refs.basicFormRef.onOpen(null, this.pageForm.platform)
},
handleAddChildMenu(row) {
this.$refs.basicFormRef.addChildMenu(row, this.pageForm.platform)
},
handleEdit(row) {
// 判断子菜单的type是权限还是菜单
if (row.type === 'menu') {
this.$refs.basicFormRef.onOpen(row.id, this.pageForm.platform)
} else {
this.$refs.permissionFormRef.onOpen(row.id)
}
},
handleDelete(row) {
// 删除逻辑
console.log(row)
this.$confirm("此操作将删除 " + row.name, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/sys/menu/delete/" + row.id).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.loadChildByExpandedKeys()
}
})
})
},
doSearch() {
this.initTreeTable()
},
@@ -327,13 +327,13 @@ layout("/layouts/platform.html"){
})
}
},
mounted() {
// 点击任意处关闭菜单
document.addEventListener('click', () => (this.menuVisible = false));
},
beforeDestroy() {
document.removeEventListener('click', () => (this.menuVisible = false));
},
mounted() {
// 点击任意处关闭菜单
document.addEventListener('click', () => (this.menuVisible = false));
},
beforeDestroy() {
document.removeEventListener('click', () => (this.menuVisible = false));
},
created() {
setTimeout(() => {
if (this.dict.type.SYS_MENU_PLATFORM) {
@@ -139,11 +139,16 @@ layout("/layouts/platform.html"){
this.$refs.infoRef.initData(row.id)
})
},
onOpen(row) {
async onOpen(row) {
if(this.$moment().isBefore(this.$moment(row.activitySignUpStartTime))) {
this.onView(row)
return
}
const res = await this.$axios.post('/platform/trainSignUp/apply/validSignCount')
if (res.code !== 0) {
this.$message.warning(res.msg)
return
}
this.infoVisible = false
this.$nextTick(() => {
this.$refs.guava.view(() => {
@@ -4,7 +4,7 @@ const DELEGATION_ONE_PUSH_FORMAL_DIALOG = {
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="分工会推选委员"
title="代表团推选委员"
width="70%"
>
@@ -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
@@ -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,8 +3,8 @@ layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<custom-card>
<template slot="header" class="mb10">
<search @search="fetchConfig">
<search-item label="教代会届次">
<el-select
@@ -23,82 +23,112 @@ layout("/layouts/platform.html"){
</el-select>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="基础信息"></table-tool>
<el-form ref="form" label-width="140px" :model="formData" :rules="formRules">
<el-form-item prop="prepareGroupQuotaCount" label="筹备组推荐名额数">
<el-input-number v-model="formData.prepareGroupQuotaCount" placeholder="请填写筹备组推荐名额数"
style="width: 100%"></el-input-number>
</el-form-item>
</template>
<el-form-item prop="unionQuotaCount" label="分工会推荐总数">
<el-input-number v-model="formData.unionQuotaCount"
placeholder="请填写分工会推荐名额总数" style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="committeeQuotaCount" label="委员会预选人数">
<el-input-number v-model="formData.committeeQuotaCount"
placeholder="请填写委员会预选人数" style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="firstTime" label="第一次预选时间">
<el-date-picker
v-model="formData.firstTime"
style="width: 100%"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
start-placeholder="请选择开始日期"
end-placeholder="请选择结束日期"
></el-date-picker>
</el-form-item>
<el-form-item prop="secondTime" label="第次预选时间">
<el-date-picker
v-model="formData.secondTime"
style="width: 100%"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
start-placeholder="请选择开始日期"
end-placeholder="请选择结束日期"
></el-date-picker>
</el-form-item>
</el-form>
<table-tool label="分工会名额分配"></table-tool>
<el-table :data="formData.unionQuotaList" show-summar size="mini" max-height="500">
<el-table-column
align="center"
header-align="center"
type="index"
:index="indexMethod"
label="序号"
width="80px"
></el-table-column>
<el-table-column
v-for="column in tableColumns"
:key="column.prop"
align="center"
header-align="center"
:label="column.label"
:prop="column.prop"
show-overflow-tooltip
>
<template v-if="column.prop === 'quotaCount'" #default="{ row }">
<el-input-number
v-model="row.quotaCount"
:precision="0"
:step="1"
:min="0"
:max="100"
></el-input-number>
</template>
</el-table-column>
</el-table>
<el-row type="flex" justify="end" class="mt20">
<el-button type="primary" @click="onHandle">提 交</el-button>
</el-row>
<table-tool label="基础信息"></table-tool>
<el-form ref="formRef" label-width="140px" :model="formData" :rules="formRules">
<el-form-item prop="prepareGroupQuotaCount" label="筹备组推荐名额数">
<el-input-number v-model="formData.prepareGroupQuotaCount" placeholder="请填写筹备组推荐名额数"
style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="unionQuotaCount" label="分工会推荐总数">
<el-input-number v-model="formData.unionQuotaCount"
placeholder="请填写分工会推荐名额总数" style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="delegationQuotaCount" label="代表团推荐总数">
<el-input-number v-model="formData.delegationQuotaCount"
placeholder="请填写代表团推荐名额总数" style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="committeeQuotaCount" label="委员会预选人数">
<el-input-number v-model="formData.committeeQuotaCount"
placeholder="请填写委员会预选人数" style="width: 100%"></el-input-number>
</el-form-item>
<el-form-item prop="firstTime" label="第次预选时间">
<el-date-picker
v-model="formData.firstTime"
style="width: 100%"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
start-placeholder="请选择开始日期"
end-placeholder="请选择结束日期"
></el-date-picker>
</el-form-item>
<el-form-item prop="secondTime" label="第二次预选时间">
<el-date-picker
v-model="formData.secondTime"
style="width: 100%"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
start-placeholder="请选择开始日期"
end-placeholder="请选择结束日期"
></el-date-picker>
</el-form-item>
</el-form>
<table-tool label="分工会名额分配"></table-tool>
<el-table :data="formData.unionQuotaList" show-summar size="mini" max-height="500">
<el-table-column
align="center"
header-align="center"
type="index"
:index="indexMethod"
label="序号"
width="80px"
></el-table-column>
<el-table-column
v-for="column in tableColumns"
:key="column.prop"
align="center"
header-align="center"
:label="column.label"
:prop="column.prop"
show-overflow-tooltip
>
<template v-if="column.prop === 'quotaCount'" #default="{ row }">
<el-input-number
v-model="row.quotaCount"
:precision="0"
:step="1"
:min="0"
:max="100"
></el-input-number>
</template>
</el-table-column>
</el-table>
<table-tool label="代表团名额分配"></table-tool>
<el-table :data="formData.delegationQuotaList" show-summar size="mini" max-height="500">
<el-table-column
type="index"
:index="indexMethod"
label="序号"
width="80px"
></el-table-column>
<el-table-column
v-for="column in delegationTableColumns"
:key="column.prop"
:label="column.label"
:prop="column.prop"
show-overflow-tooltip
>
<template v-if="column.prop === 'quotaCount'" #default="{ row }">
<el-input-number
v-model="row.quotaCount"
:precision="0"
:step="1"
:min="0"
:max="100"
></el-input-number>
</template>
</el-table-column>
</el-table>
<template slot="footer">
<el-button type="primary" @click="onHandle">提 交</el-button>
</template>
</custom-card>
</el-card>
</guava>
</div>
<script>
@@ -117,13 +147,19 @@ layout("/layouts/platform.html"){
{prop: 'dbCount', label: '代表人数', sortable: true},
{prop: 'quotaCount', label: '分配人数', sortable: true}
],
delegationTableColumns: [
{prop: 'delegationName', label: '代表团名称', sortable: true},
{prop: 'dbCount', label: '代表人数', sortable: true},
{prop: 'quotaCount', label: '分配人数', sortable: true}
],
formData: {},
formRules: {
prepareGroupQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
committeeQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
unionQuotaCount: [{required: true, message: '必填', trigger: ['blur']}],
firstTime: [{required: true, message: '必填', trigger: ['blur']}],
secondTime: [{required: true, message: '必填', trigger: ['blur']}]
prepareGroupQuotaCount: [{required: true, message: '必填', trigger: ["change", "blur"]}],
committeeQuotaCount: [{required: true, message: '必填', trigger: ["change", "blur"]}],
unionQuotaCount: [{required: true, message: '必填', trigger: ["change", "blur"]}],
delegationQuotaCount: [{required: true, message: '必填', trigger: ["change", "blur"]}],
firstTime: [{required: true, message: '必填', trigger: ["change", "blur"]}],
secondTime: [{required: true, message: '必填', trigger: ["change", "blur"]}]
}
}
},
@@ -147,7 +183,7 @@ layout("/layouts/platform.html"){
},
onHandle() {
this.$refs['form'].validate(async (valid) => {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm('您确定要提交吗?', '提示', {
confirmButtonText: '确定',
@@ -159,6 +195,11 @@ layout("/layouts/platform.html"){
this.$message.warning('各分工会名额分配数之和不能超过' + this.formData.unionQuotaCount)
return
}
const delegationTotal = this.formData.delegationQuotaList.reduce((sum, item) => sum + (item.quotaCount || 0), 0)
if (delegationTotal > this.formData.delegationQuotaCount) {
this.$message.warning('各代表团名额分配数之和不能超过' + this.formData.delegationQuotaCount)
return
}
if (this.formData.firstTime && this.formData.firstTime.length > 1) {
this.$set(this.formData, 'firstStartTime', this.formData.firstTime[0])
this.$set(this.formData, 'firstEndTime', this.formData.firstTime[1])
@@ -169,6 +210,7 @@ layout("/layouts/platform.html"){
}
this.$set(this.formData, 'teacherMeetId', this.pageForm.sessionId)
this.$set(this.formData, 'unionQuotaList', JSON.stringify(this.formData.unionQuotaList))
this.$set(this.formData, 'delegationQuotaList', JSON.stringify(this.formData.delegationQuotaList))
const resp = await this.$axios.post('/platform/executiveCommittee/executiveCommitteeConfig/onHandle', this.formData)
if (resp.code === 0) {
await this.fetchConfig()
@@ -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>
@@ -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
@@ -4,7 +4,7 @@ const PUSH_FORMAL_DIALOG = {
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="筹备组推选"
title="正式委员录入"
width="70%"
>
@@ -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>
@@ -0,0 +1,174 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入姓名或工号" clearable>
</el-input>
</search-item>
<search-item label="教代会">
<el-select
v-model="pageForm.teacherMeetId"
filterable
placeholder="请选择教代会"
style="width:100%;"
@change="getAllDelegation(pageForm.teacherMeetId);doSearch()"
>
<el-option
v-for="item in teacherMeets"
:key="item.id"
:label="item.fullName"
:value="item.id"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="上报列表">
<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
ref="tableRef"
:data="tableData"
row-key="id"
@sort-change="pageOrder"
>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="50"></el-table-column>
<el-table-column label="工号" prop="loginName"></el-table-column>
<el-table-column label="姓名" prop="userName"></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="性别" prop="sex"></el-table-column>
<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 prop="curTaskName" label="当前节点" width="120" fixed="right"></el-table-column>
<el-table-column prop="instanceState" label="流程状态" fixed="right">
<template slot-scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="250" fixed="right">
<template scope="{row}">
<el-button v-if="row.taskState === 10" @click="handleTaskAction(1,row)" size="mini"
type="primary">
通过
</el-button>
<el-button v-if="row.taskState === 10" @click="handleTaskAction(2,row)" size="mini"
type="danger">
返回修改
</el-button>
<el-button v-if="row.canRevoke||[45].includes(row.instanceState)" @click="onRevoke(row)"
size="mini"
type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
</div>
<script>
new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageForm: {
teacherMeetId: null,
unionId: null,
approval: false,
},
teacherMeets: [],
unionOptions: [],
delegations: []
}
},
async created() {
this.unionOptions = await this.$businessTool.listUnion()
await this.getAllJdh()
},
methods: {
handleTaskAction(tf_type, row) {
this.$confirm("您确定要" + (tf_type === 1 ? "通过" : "返回修改") + "吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.formData = {
bizId: row.id,
userId: row.userId,
processTaskId: row.taskId,
taskKey: row.taskKey,
taskName: row.taskName,
instanceId: row.instanceId,
submitType: tf_type,
}
this.$axios.post("/platform/executiveCommittee/pushDwSjAudit/executeTask", {
data: JSON.stringify({
...this.formData,
})
}).then((res) => {
if (res.code === 0) {
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()
}
})
})
},
getAllDelegation(id) {
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
if (resp.code === 0) {
this.delegations = resp.data
}
})
},
getAllJdh() {
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
if (resp.code === 0) {
this.teacherMeets = resp.data
if (this.teacherMeets && this.teacherMeets.length > 0) {
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
this.getAllDelegation(this.teacherMeets[0].id)
this.pageData()
}
}
})
},
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,196 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="姓名/工号">
<el-input v-model="pageForm.searchKeyword" placeholder="请输入姓名或工号" clearable>
</el-input>
</search-item>
<search-item label="教代会">
<el-select
v-model="pageForm.teacherMeetId"
filterable
placeholder="请选择教代会"
style="width:100%;"
@change="getAllDelegation(pageForm.teacherMeetId);doSearch()"
>
<el-option
v-for="item in teacherMeets"
:key="item.id"
:label="item.fullName"
:value="item.id"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="上报列表">
<el-button
icon="el-icon-check"
size="small"
type="primary"
@click="$refs.pushFormalRef.onOpen(pageForm.teacherMeetId)"
>委员推选
</el-button>
</table-tool>
<el-table
ref="tableRef"
:data="tableData"
row-key="id"
@sort-change="pageOrder"
>
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号"
fixed
type="index"
width="50"></el-table-column>
<el-table-column label="工号" prop="loginName"></el-table-column>
<el-table-column label="姓名" prop="userName"></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="性别" prop="sex"></el-table-column>
<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 prop="curTaskName" label="当前节点" width="120" fixed="right"></el-table-column>
<el-table-column prop="instanceState" label="流程状态" fixed="right">
<template slot-scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template scope="{row}">
<el-button
v-if="row.instanceState!=20"
size="mini"
type="danger"
@click="onDelete(row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
<union-push-formal-dialog ref="pushFormalRef" @refresh="doSearch"></union-push-formal-dialog>
</div>
<script>
<!--#include("pushFormalDialog.js"){}#-->
new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pageForm: {
teacherMeetId: null,
unionId: null
},
teacherMeets: [],
unionOptions: [],
delegations: []
}
},
components: {
"union-push-formal-dialog": UNION_PUSH_FORMAL_DIALOG
},
async created() {
this.unionOptions = await this.$businessTool.listUnion()
await this.getAllJdh()
},
methods: {
getAllDelegation(id) {
this.$axios.post("/platform/teacherCongress/common/listDelegation", {sessionId: id}).then(resp => {
if (resp.code === 0) {
this.delegations = resp.data
}
})
},
getAllJdh() {
this.$axios.post("/platform/teacherCongress/common/listSession", {}).then(resp => {
if (resp.code === 0) {
this.teacherMeets = resp.data
if (this.teacherMeets && this.teacherMeets.length > 0) {
this.$set(this.pageForm, 'teacherMeetId', this.teacherMeets[0].id)
this.getAllDelegation(this.teacherMeets[0].id)
this.pageData()
}
}
})
},
onDelete(row) {
this.$confirm('确定要删除该条数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await this.$axios.post('/platform/executiveCommittee/unionPush/doDelete', {
id: row.id,
teacherMeetId: this.pageForm.teacherMeetId
})
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
}
})
},
}
})
</script>
<style>
.pushFormDialog .el-transfer-panel__item.el-checkbox {
height: auto;
display: block;
margin-right: 0;
padding: 0 15px;
}
.pushFormDialog .el-checkbox__input {
vertical-align: top;
margin-top: 5px;
}
.pushFormDialog .transfer-item {
padding: 5px;
font-size: 12px;
border-bottom: 1px solid #f0f0f0;
}
.pushFormDialog .el-transfer-panel {
height: 60vh;
width: unset !important;
flex: 2 !important;
}
.pushFormDialog .el-transfer-panel__body {
height: calc(100% - 40px) !important;
display: flex;
flex-direction: column;
}
.pushFormDialog .el-transfer-panel__list.is-filterable {
flex: 1;
}
</style>
<!--#
}
#-->
@@ -0,0 +1,104 @@
const UNION_PUSH_FORMAL_DIALOG = {
template: /*language=HTML*/ `
<div class="pushFormDialog">
<el-dialog
:close-on-click-modal="false"
:visible.sync="dialogVisible"
title="分工会推选委员"
width="70%"
>
<el-transfer
ref="transfer"
v-model="userValue"
:data="userData"
filter-placeholder="请按姓名模糊搜索"
:filter-method="filterMethod"
:props="{key: 'userId',label: 'name'}"
:right-default-checked="rightChecked"
:titles="['可推选人员名单', '当前选择']"
filterable
class="transfer-high"
>
<div slot-scope="{ option }">
<div class="transfer-item">
<div class="transfer-item-name">{{ option.userName }} - {{ option.loginName
}} - {{option.unitName}} - {{option.unionName}}
</div>
<div class="transfer-item-details">
<span class="detail-item">
{{option.sex}}
</span>
<span class="detail-item">{{ option.age }}岁</span>
<span class="detail-item">{{ option.professionalTitle }}</span>
</div>
</div>
</div>
</el-transfer>
<span slot="footer">
<span style="color:red;font-size: 15px; display:flex;text-align: right;">推选名额:{{quotaCount}}个</span>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onConfirm">确 定</el-button>
</span>
</span>
</el-dialog>
</div>
`,
data() {
return {
dialogVisible: false,
userValue: [],
userData: [],
rightChecked: [],
attendanceRightChecked: [],
teacherMeetId: null,
quotaCount: 0
}
},
methods: {
async onOpen(teacherMeetId) {
this.teacherMeetId = teacherMeetId
this.userValue = []
this.userData = []
const {
code,
msg,
data
} = await this.$axios.post('/platform/executiveCommittee/unionPush/getUnionUser', {teacherMeetId: teacherMeetId})
if (code === 0) {
data.userData.forEach(v => {
this.userData.push({userId: v.userId, ...v})
})
this.quotaCount = data.quotaCount
this.dialogVisible = true
} else {
this.$message.error(msg)
}
},
filterMethod(query, item) {
return item.userName.indexOf(query) > -1
},
async onConfirm() {
const {
code,
msg
} = await this.$axios.post('/platform/executiveCommittee/unionPush/addPush', {
userValue: JSON.stringify(this.userValue),
teacherMeetId: this.teacherMeetId
})
if (code === 0) {
this.dialogVisible = false
this.$message.success(msg)
this.$emit('refresh')
} else {
this.$message.error(msg)
}
}
},
style: /*language=CSS*/ `
`
}
@@ -7,14 +7,14 @@ const BASIC_FORM = {
<el-col :span="12">
<el-form-item label="代表姓名" prop="createUserId">
<user-select
:disabled="school || !$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])"
:disabled="school || !$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN','TEACHER_CONGRESS_DELEGATION_CONTACT'])"
ref="userSelectRef"
v-model="formData.createUserId"
style="width: 100%"
api="/platform/teacherCongress/common/listDelegate"
option_label="userName"
option_value="userId"
:api_params="{sessionId:formData.sessionId}"
:api_params="{sessionId:formData.sessionId,delegationId:formData.delegationId}"
:option_label_func="(item)=>{return item.userName + ' - ' + item.loginName}"
@change="userChange"
></user-select>
@@ -5,6 +5,7 @@ const PROPOSAL_INFO = {
<div class="proposal-info">
<div class="process-title">
提案基础信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<h3 style="text-align: center;font-weight: 600" class="pt10 pb10">
{{ viewData.name }}
@@ -143,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>
@@ -197,6 +198,7 @@ const PROPOSAL_INFO = {
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE", "PROCESS_TASK_SUBMIT_TYPE", "PROPOSAL_FEEDBACK"],
@@ -242,9 +244,14 @@ 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)
}
})
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
}
},
style:
@@ -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">
@@ -71,9 +71,9 @@ const merge = {
></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">
@@ -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>
<!--#
}
#-->
@@ -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>
<!--#
}
#-->
@@ -231,7 +231,6 @@ layout("/layouts/platform.html"){
}
this.$refs.auditInfoRef.onOpen(row)
})
},
onView(row) {
this.$refs.guava.edit(() => {
@@ -21,8 +21,8 @@ const times = {
<div v-if="row.isSign === true && row.isMobileSign === true" class="sign_button">
<van-button
v-if="item.isAttend !== true
&&
$moment(item.courseEndTime).unix()>$moment().unix()"
&& $moment(item.courseStartTime).unix() <= $moment().unix()
&& $moment(item.courseEndTime).unix()>$moment().unix()"
@click.stop="onSign(item)" size="mini" type="info">签到
</van-button>
<van-button v-if="item.isAttend === true" size="mini" type="info" disabled>已签到
@@ -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>
<!--#
}
#-->
File diff suppressed because one or more lines are too long
-50
View File
@@ -1,50 +0,0 @@
package com.budwk.app;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.budwk.app.base.sms.impl.njupt.SmsNjuptServiceImpl;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
public class Test {
public static void main(String[] args) {
String appId = "1926887238437818370";
String secret = "32df31fcf4fc43f9a647ee1f47134f36";
long ts = System.currentTimeMillis();
String sign = Base64.encode(DigestUtil.md5Hex(appId + secret + ts, CharsetUtil.CHARSET_UTF_8));
HttpRequest httpRequest = HttpUtil.createPost("https://sjzcpt.nnu.edu.cn/cdsp/data-api/v2/DS0005");
httpRequest.header("Content-Type", "application/json");
httpRequest.header("appId", appId);
httpRequest.header("timestamp", String.valueOf(ts));
httpRequest.header("sign", sign);
httpRequest.body("{}");
String body = httpRequest.execute().body();
System.out.println(body);
// JSONObject entries = JSONUtil.parseObj(body);
// JSONArray value = entries.getJSONArray("value");
//
// for (Object o : value) {
// JSONObject jsonObject = (JSONObject) o;
// }
}
}