pref#ncu_commit
This commit is contained in:
+68
@@ -0,0 +1,68 @@
|
||||
package com.budwk.app.flow.handler;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:FlowGeneralViceDelegationByArgsAssignmentHandler
|
||||
* @Date 2025/12/17 10:08
|
||||
* @注释 获取副团长(通用版本,根据args中的sessionId和delegationId)
|
||||
*/
|
||||
public class FlowGeneralViceDelegationByArgsAssignmentHandler implements AssignmentHandler {
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
String sessionId = execution.getArgs().getStr("sessionId");
|
||||
String delegationId = execution.getArgs().getStr("delegationId");
|
||||
|
||||
if (StrUtil.isBlank(sessionId)) {
|
||||
throw new BaseException("参数 sessionId 不能为空");
|
||||
}
|
||||
if (StrUtil.isBlank(delegationId)) {
|
||||
throw new BaseException("参数 delegationId 不能为空");
|
||||
}
|
||||
|
||||
SysRoleService sysRoleService = ServiceContext.find(SysRoleService.class);
|
||||
Sys_role role = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_VICE_DELEGATION_HEAD);
|
||||
|
||||
List<Sys_user_role> roles = ServiceContext.find(Dao.class).query(
|
||||
Sys_user_role.class,
|
||||
Cnd.where(Sys_user_role::getRoleId, "=", role.getId())
|
||||
.and(Sys_user_role::getTcDelegationId, "=", delegationId)
|
||||
.and(Sys_user_role::getTcSessionId, "=", sessionId)
|
||||
);
|
||||
|
||||
if (Lang.isEmpty(roles)) {
|
||||
throw new RuntimeException("您所在的代表团没有设置副团长,无法流转到下一步,请联系校工会进行设置。");
|
||||
}
|
||||
return roles.stream().map(Sys_user_role::getUserId).toList();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "获取代表团副团长(通用版本,根据args中的sessionId和delegationId)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return AssignmentHandler.super.getOrder();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.sys.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.codec.Base64Encoder;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
@@ -67,6 +68,7 @@ public class SysLoginController {
|
||||
@Ok("re")
|
||||
@ApiOperation("用户本地登录页面")
|
||||
@Filters
|
||||
// @SaCheckLogin
|
||||
public String login(HttpServletRequest req, HttpSession session) {
|
||||
return "beetl:/platform/sys/login.html";
|
||||
}
|
||||
@@ -74,6 +76,7 @@ public class SysLoginController {
|
||||
@At
|
||||
@Ok("re")
|
||||
@Filters
|
||||
// @SaCheckLogin
|
||||
public String h5() {
|
||||
return "beetl:/platform/sys/login.html";
|
||||
}
|
||||
@@ -89,6 +92,7 @@ public class SysLoginController {
|
||||
@At("/doLogin")
|
||||
@Ok("json")
|
||||
@ApiOperation("用户本地账号密码登录")
|
||||
// @SaCheckLogin
|
||||
public Object doLogin(@Param("username") String username,
|
||||
@Param("password") String password,
|
||||
@Param("platformKey") String captchaKey,
|
||||
|
||||
@@ -94,7 +94,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
||||
@CacheResult(cacheKey = "${user.id}_getRoleCodeList")
|
||||
public List<String> getRoleCodeList(Sys_user user) {
|
||||
dao().fetchLinks(user, "roles");
|
||||
List<String> roleNameList = new ArrayList<String>();
|
||||
List<String> roleNameList = new ArrayList<>();
|
||||
for (Sys_role role : user.getRoles()) {
|
||||
if (!role.isDisabled()) roleNameList.add(role.getCode());
|
||||
}
|
||||
|
||||
@@ -283,8 +283,8 @@ public class ActivityTissue extends BaseModel implements Serializable, SysHomeCo
|
||||
}
|
||||
sysHomeActivity.setH5Url("/platform/h5/activity/culture/signUp?id=" + this.getId());
|
||||
if (Lang.isNotEmpty(this.getApplyStartTime())) {
|
||||
sysHomeActivity.setStartDate(DateUtil.parseDate(this.getApplyStartTime()));
|
||||
sysHomeActivity.setEndDate(DateUtil.parseDate(this.getApplyEndTime()));
|
||||
sysHomeActivity.setStartDate(DateUtil.parseDateTime(this.getApplyStartTime()));
|
||||
sysHomeActivity.setEndDate(DateUtil.parseDateTime(this.getApplyEndTime()));
|
||||
}
|
||||
sysHomeActivity.setAllowUserGroupId(this.getGroupId());
|
||||
sysHomeActivity.setEnable(this.getIsUnseal());
|
||||
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
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.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.zhgh.democratic.proposal.param.ProposalSearchParam;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:ProposalViceDelegationReviewController
|
||||
* @Date 2025/12/17 15:00
|
||||
* @注释 副团长审核
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@Api(tags = "提案-办理-副团长审核")
|
||||
@At("/platform/proposal/vice/delegation/review")
|
||||
public class ProposalViceDelegationReviewController {
|
||||
|
||||
@Inject
|
||||
private ProposalCommonService proposalCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/proposal/transact/viceDelegationReview/index.html")
|
||||
@SaCheckPermission("proposal.vice.delegation.review")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/democratic/proposal/transact/viceDelegationReview/index.html")
|
||||
@SaCheckPermission("proposal.vice.delegation.review")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.vice.delegation")
|
||||
@ApiOperation("分页列表")
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm) {
|
||||
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
|
||||
FROM
|
||||
proposal_info info
|
||||
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 `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and("info.delegationId", "in", proposalCommonService.getSelfManageDelegationIds());
|
||||
}
|
||||
ProposalSearchParam.buildSearch(cnd, pageForm);
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = proposalCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
}
|
||||
+93
@@ -7,6 +7,7 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
@@ -45,6 +46,9 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
@@ -265,4 +269,93 @@ public class TeacherCongressDelegatePushZgAuditController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("批量审查")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("tc.delegate.push.zcAudit")
|
||||
@SLog(tag = "代表管理-代表资格批量审查", msg = "批量审查")
|
||||
public Result submitBatch(@Param("data") String param) {
|
||||
List<NutMap> list = JSONUtil.parseArray(param).toList(NutMap.class);
|
||||
|
||||
// 审核的 id 列表 Map
|
||||
Map<String, NutMap> dataMap = list.stream().collect(Collectors.toMap(v -> v.getString("id"), v -> v));
|
||||
Set<String> idKeySet = dataMap.keySet();
|
||||
|
||||
List<TeacherCongressDelegatePush> pushList = baseService.dao().query(
|
||||
TeacherCongressDelegatePush.class,
|
||||
Cnd.where(TeacherCongressDelegatePush::getId, "in", idKeySet)
|
||||
);
|
||||
|
||||
List<String> userIdList = pushList.stream().map(TeacherCongressDelegatePush::getUserId).toList();
|
||||
|
||||
Map<String, View_user> userMap = baseService.dao().query(View_user.class, Cnd.where("id", "in", userIdList))
|
||||
.stream().collect(Collectors.toMap(View_user::getId, v -> v));
|
||||
|
||||
// 去循环审核数据
|
||||
for (TeacherCongressDelegatePush delegatePush : pushList) {
|
||||
View_user user = userMap.get(delegatePush.getUserId());
|
||||
|
||||
if (delegatePush.getIsJdh()) {
|
||||
Teacher_congress_delegate delegate = new Teacher_congress_delegate();
|
||||
Sys_user_role userRole = new Sys_user_role();
|
||||
|
||||
delegate.setUserId(user.getId());
|
||||
delegate.setLoginName(user.getLoginname());
|
||||
delegate.setUserName(user.getUsername());
|
||||
delegate.setSex(user.getSex());
|
||||
delegate.setAge(delegatePush.getAge());
|
||||
delegate.setMobile(user.getMobile());
|
||||
delegate.setUnitId(user.getUnitId());
|
||||
delegate.setUnitName(user.getUnitName());
|
||||
delegate.setUnionId(user.getUnionId());
|
||||
delegate.setUnionName(user.getUnionName());
|
||||
|
||||
delegate.setSessionId(delegatePush.getSessionId());
|
||||
|
||||
/*Teacher_congress_delegation_unit delegation_unit = baseService.dao().fetch(Teacher_congress_delegation_unit.class,
|
||||
Cnd.where(Teacher_congress_delegation_unit::getUnitId, "=", user.getUnitId())
|
||||
.and(Teacher_congress_delegation_union::getSessionId, "=", delegatePush.getSessionId()));
|
||||
|
||||
if (ObjectUtil.isNotEmpty(delegation_unit)) {
|
||||
delegate.setDelegationId(delegation_unit.getDelegationId());
|
||||
userRole.setTcDelegationId(delegation_unit.getDelegationId());
|
||||
} else {
|
||||
return Result.error(user.getUnitName() + "没有设置到代表团,请先在代表团管理里设置。");
|
||||
}*/
|
||||
if ("正式代表".equals(delegatePush.getRepresentativeType())) {
|
||||
Sys_role sys_role = baseService.dao().fetch(Sys_role.class, Cnd.where(Sys_role::getCode, "=", RoleConstant.TEACHER_CONGRESS_DELEGATE_FORMAL.name()));
|
||||
delegate.setRoleId(sys_role.getId());
|
||||
userRole.setRoleId(sys_role.getId());
|
||||
}
|
||||
if ("列席代表".equals(delegatePush.getRepresentativeType())) {
|
||||
Sys_role sys_role = baseService.dao().fetch(Sys_role.class, Cnd.where(Sys_role::getCode, "=", RoleConstant.TEACHER_CONGRESS_DELEGATE_ATTENDANCE.name()));
|
||||
delegate.setRoleId(sys_role.getId());
|
||||
userRole.setRoleId(sys_role.getId());
|
||||
}
|
||||
userRole.setUserId(user.getId());
|
||||
userRole.setTcSessionId(delegatePush.getSessionId());
|
||||
|
||||
baseService.dao().insert(delegate);
|
||||
|
||||
// 去改改用户表的手机号
|
||||
baseService.dao().update(
|
||||
Sys_user.class,
|
||||
Chain.make("mobile", delegatePush.getMobile()),
|
||||
Cnd.where(Sys_user::getId, "=", user.getId())
|
||||
);
|
||||
|
||||
NutMap nutMap = dataMap.get(delegatePush.getId());
|
||||
|
||||
Dict args = Dict.create();
|
||||
args.set("processTaskId", nutMap.getString("processTaskId"));
|
||||
args.set("taskName", nutMap.getString("taskName"));
|
||||
args.set("submitType", nutMap.getString("submitType"));
|
||||
flowCommonService.executeTask(args);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+20
-2
@@ -5,7 +5,9 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import cn.hutool.core.lang.tree.TreeNode;
|
||||
import cn.hutool.core.lang.tree.TreeUtil;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
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.exception.BaseException;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
@@ -127,21 +129,37 @@ public class TeacherCongressDelegationController {
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("新增代表团")
|
||||
@SaCheckPermission("tc.delegation")
|
||||
@SLog(tag = "教代会代表团管理", msg = "新增")
|
||||
public Result insert(Teacher_congress_delegation delegation) {
|
||||
dao.insert(delegation);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("修改代表团")
|
||||
@SaCheckPermission("tc.delegation")
|
||||
@SLog(tag = "教代会代表团管理", msg = "修改")
|
||||
public Result update(Teacher_congress_delegation delegation) {
|
||||
dao.updateIgnoreNull(delegation);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("修改联合代表团")
|
||||
@SaCheckPermission("tc.delegation")
|
||||
@SLog(tag = "教代会代表团管理", msg = "设置开启或者关闭联合代表团")
|
||||
public Result unite(String id, Boolean unite) {
|
||||
dao.update(
|
||||
Teacher_congress_delegation.class,
|
||||
Chain.make("unite", unite),
|
||||
Cnd.where("id", "=", id)
|
||||
);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("tc.delegation")
|
||||
|
||||
+5
@@ -29,6 +29,11 @@ public class Teacher_congress_delegation extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String code;
|
||||
|
||||
@Column
|
||||
@Comment("是否联合组团")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean unite;
|
||||
|
||||
@Column
|
||||
@Comment("教代会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
|
||||
Reference in New Issue
Block a user