commit
This commit is contained in:
@@ -56,6 +56,7 @@ public class RoleEventMsg {
|
||||
|
||||
public RoleEventMsg(String unitId, String roleCode, Integer operationType){
|
||||
this.unitId = unitId;
|
||||
this.roleCode = roleCode;
|
||||
this.operationType = operationType;
|
||||
}
|
||||
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.budwk.app.flow.handler;
|
||||
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.flow.engine.AssignmentHandler;
|
||||
import com.budwk.app.flow.engine.core.Execution;
|
||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||
import com.budwk.app.flow.engine.model.TaskModel;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:FlowSchoolUnionAdminByArgsAssignmentHandler
|
||||
* @Date 2025/9/29 17:00
|
||||
* @注释
|
||||
*/
|
||||
public class FlowSchoolUnionAdminByArgsAssignmentHandler implements AssignmentHandler {
|
||||
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
userRole.userId
|
||||
FROM
|
||||
`sys_user_role` userRole
|
||||
LEFT JOIN sys_role role ON role.id = userRole.roleId
|
||||
WHERE
|
||||
role.`code` = @roleCode
|
||||
GROUP BY
|
||||
userRole.userId
|
||||
""").setParam("roleCode", RoleConstant.SCHOOL_UNION_ADMIN.name());
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(sql);
|
||||
return sql.getList(String.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "获取校工会管理员";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return AssignmentHandler.super.getOrder();
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.budwk.app.flow.handler;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
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_union_group;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.lang.Lang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:FlowUnionGroupLeadersByArgsAssignmentHandler
|
||||
* @Date 2025/9/28 16:35
|
||||
* @注释 获取工会小组长
|
||||
*/
|
||||
public class FlowUnionGroupLeadersByArgsAssignmentHandler implements AssignmentHandler {
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> assign(TaskModel model, Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
String unitId = StrUtil.blankToDefault(execution.getArgs().getStr(FlowConst.INITIATOR_UNIT_ID), SecurityUtil.getUnitId());
|
||||
String unionId = StrUtil.blankToDefault(execution.getArgs().getStr(FlowConst.INITIATOR_UNIT_UNION_ID), SecurityUtil.getUnionId());
|
||||
Sys_union_group group = dao.fetch(Sys_union_group.class, Cnd.where(Sys_union_group::getUnionId, "=", unionId)
|
||||
.and(new Static(" JSON_CONTAINS(unitIds, '\"%s\"')".formatted(unitId))));
|
||||
return Lang.isNotEmpty(group) ? group.getLeaders() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "当前登录用户的工会小组长";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return AssignmentHandler.super.getOrder();
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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;
|
||||
@@ -40,6 +42,7 @@ public class SysDataUserPullController {
|
||||
@ApiOperation("分页数据")
|
||||
@Ok("json:{locked:'password|idCard|mobile'}")
|
||||
public Result pageData(@Valid SysDataUserPullPageForm pageForm) {
|
||||
Sql sql = Sqls.create("select us.*,su.`name` AS unit_name from sys_user_source us left join sys_unit su ON su.id = us.unitId $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX(Sys_user_source::getPullTime, "=", pageForm.getPullTime());
|
||||
cnd.and(Cnd.likeEX(Sys_user_source::getUsername, pageForm.getUserName()));
|
||||
@@ -53,7 +56,8 @@ public class SysDataUserPullController {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.desc(Sys_user_source::getPullTime);
|
||||
Pagination pagination = sysUserPullService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUserPullService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,16 @@ public class SysUnionController {
|
||||
if (Lang.isEmpty(role)) {
|
||||
throw new BaseException("无法找到{}对应编码的角色", roleCode);
|
||||
}
|
||||
sysRoleService.clear("sys_user_role", Cnd.where("roleId", "=", role.getId()).and("userId", "=", userId).and("unionId", "=", unionId));
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("roleId", "=", role.getId());
|
||||
if (StrUtil.isNotBlank(userId)) {
|
||||
cnd.and("userId", "=", userId);
|
||||
} else {
|
||||
cnd.and("userId", "is", null);
|
||||
}
|
||||
cnd.and("unionId", "=", unionId);
|
||||
|
||||
sysRoleService.clear("sys_user_role", cnd);
|
||||
sysRoleService.clearCache();
|
||||
sysUserService.clearCache();
|
||||
return Result.success();
|
||||
|
||||
@@ -5,12 +5,16 @@ 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.sys.models.Sys_union_group;
|
||||
import com.budwk.app.sys.models.Sys_unit;
|
||||
import com.budwk.app.sys.services.SysUnionGroupService;
|
||||
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.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -84,4 +88,31 @@ public class SysUnionGroupController {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("sys.manager.union")
|
||||
@ApiOperation("获取组成单位")
|
||||
public Result getUnits(String unionId, String groupId){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
j.unitId
|
||||
FROM
|
||||
sys_union_group,
|
||||
JSON_TABLE (unitIds, '$[*]' COLUMNS (unitId VARCHAR (50) PATH '$')) AS j
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("unionId", "=", unionId);
|
||||
cnd.andEX("id", "!=", groupId);
|
||||
sql.setCondition(cnd);
|
||||
|
||||
sql.setCallback(Sqls.callback.strList());
|
||||
dao.execute(sql);
|
||||
List<String> list = sql.getList(String.class);
|
||||
|
||||
List<Sys_unit> unitList = dao.query(Sys_unit.class,
|
||||
Cnd.where("unionId", "=", unionId)
|
||||
.and("unitTypeCode", "=", "1")
|
||||
.andEX("id", "not in", list));
|
||||
return Result.success(unitList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.budwk.app.sys.listener;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.budwk.app.base.event.user.UserChangeEventListener;
|
||||
import com.budwk.app.base.event.user.UserChangeMsg;
|
||||
import com.budwk.app.sys.models.Sys_user_role;
|
||||
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.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:SysUserChangeListener
|
||||
* @Date 2025/8/13 15:24
|
||||
* @注释 有关系统人员的广播监听
|
||||
*/
|
||||
@IocBean
|
||||
public class SysUserChangeListener implements UserChangeEventListener {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void receive(UserChangeMsg message) {
|
||||
if (ObjectUtil.equals(message.getOperationType(), UserChangeMsg.UNIT_CHANGE_OPERATION)) {
|
||||
// 单位变动,删除原单位的角色
|
||||
dao.clear(Sys_user_role.class, Cnd.where("userId", "in", message.getUserIds()).and("unitId", "=", message.getSourceUnitId()));
|
||||
|
||||
// 判断这两个单位是不是在一个工会,如果不是,删除原来工会的所有角色
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
(SELECT unionId FROM sys_unit WHERE id = @sourceUnitId) AS sourceUnionId,
|
||||
(SELECT unionId FROM sys_unit WHERE id = @targetUnitId) AS targetUnionId,
|
||||
CASE
|
||||
WHEN (SELECT unionId FROM sys_unit WHERE id = @sourceUnitId) IS NULL
|
||||
AND (SELECT unionId FROM sys_unit WHERE id = @targetUnitId) IS NULL THEN true
|
||||
WHEN (SELECT unionId FROM sys_unit WHERE id = @sourceUnitId) =
|
||||
(SELECT unionId FROM sys_unit WHERE id = @targetUnitId) THEN true
|
||||
ELSE false
|
||||
END AS result
|
||||
""").setParam("sourceUnitId", message.getSourceUnitId()).setParam("targetUnitId", message.getTargetUnitId());
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
dao.execute(sql);
|
||||
NutMap result = (NutMap) sql.getResult();
|
||||
|
||||
if (!result.getBoolean("result")) {
|
||||
dao.clear(Sys_user_role.class, Cnd.where("userId", "in", message.getUserIds()).and("unionId", "=", result.getString("sourceUnionId")));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table("sys_union_group")
|
||||
@@ -23,6 +25,11 @@ public class Sys_union_group extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("绑定单位Id集合")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<String> unitIds;
|
||||
|
||||
@Comment("名称")
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@@ -36,7 +43,6 @@ public class Sys_union_group extends BaseModel {
|
||||
@Comment("小组长")
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String leader;
|
||||
|
||||
private List<String> leaders;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import cn.hutool.http.HtmlUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.event.role.RoleEventMsg;
|
||||
import com.budwk.app.base.event.role.RoleEventPublisher;
|
||||
import com.budwk.app.base.event.user.UserChangeMsg;
|
||||
import com.budwk.app.base.event.user.UserChangePublisher;
|
||||
import com.budwk.app.base.utils.PwdUtil;
|
||||
import com.budwk.app.sys.annotation.DataCenterColumn;
|
||||
import com.budwk.app.sys.models.*;
|
||||
@@ -60,6 +62,9 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
@Inject
|
||||
private ThreadPoolTaskExecutor executorService;
|
||||
|
||||
|
||||
private static Map<String, String> unitIdNameMap;
|
||||
|
||||
/**
|
||||
* 字段映射类,用于缓存反射结果
|
||||
*/
|
||||
@@ -150,6 +155,10 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
Sys_role publicRole = sysRoleService.getByCode(RoleConstant.PUBLIC);
|
||||
Sys_role memberRole = sysRoleService.getByCode(RoleConstant.MEMBER);
|
||||
|
||||
// 获取单位信息,后续判断单位变更
|
||||
List<Sys_unit> unitList = dao.query(Sys_unit.class, Cnd.where("unitTypeCode", "=", "1"));
|
||||
unitIdNameMap = unitList.stream().collect(Collectors.toMap(Sys_unit::getId, Sys_unit::getName));
|
||||
|
||||
// 查询数据源
|
||||
Cnd cnd = Cnd.where(Sys_user_source::getPullTime, "=", updateParam.getPullTime());
|
||||
|
||||
@@ -443,9 +452,13 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
NutMap change = NutMap.NEW();
|
||||
change.put("fieldName", "单位");
|
||||
change.put("field", "unitId");
|
||||
change.put("sourceValue", user.getUnitId());
|
||||
change.put("newValue", source.getUnitId());
|
||||
change.put("sourceValue", unitIdNameMap.get(user.getUnitId()));
|
||||
change.put("newValue", unitIdNameMap.get(user.getUnitId()));
|
||||
changeList.add(change);
|
||||
|
||||
// 单位异动发送订阅消息,清空原单位的所有角色
|
||||
UserChangePublisher.broadcast(new UserChangeMsg(List.of(user.getId()),
|
||||
UserChangeMsg.UNIT_CHANGE_OPERATION, user.getUnitId(), source.getUnitId()));
|
||||
}
|
||||
|
||||
// 如果没有任何变更,返回null
|
||||
|
||||
@@ -6,12 +6,15 @@ import cn.hutool.core.thread.AsyncUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.event.role.RoleEventMsg;
|
||||
import com.budwk.app.base.event.role.RoleEventPublisher;
|
||||
import com.budwk.app.base.utils.ConditionGroupUtil;
|
||||
import com.budwk.app.base.utils.PwdUtil;
|
||||
import com.budwk.app.sys.models.*;
|
||||
import com.budwk.app.sys.param.SysDataUserUpdateParam;
|
||||
import com.budwk.app.sys.services.SysDataUserUpdateService;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalConfig;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -143,6 +146,12 @@ public class SysDataUserIncrUpdateServiceImpl implements SysDataUserUpdateServic
|
||||
// 计算设置为会员的人数
|
||||
long memberCount = sysUsers.stream().filter(Sys_user::getMember).count();
|
||||
|
||||
// 6.1 更新提案的校领导角色,发送订阅
|
||||
ProposalConfig config = dao.fetch(ProposalConfig.class, Cnd.where("delFlag", "=", false).desc("updatedAt"));
|
||||
for (String unitId : config.getSchoolLeaderUnitIds()) {
|
||||
RoleEventPublisher.broadcast(new RoleEventMsg(unitId, RoleConstant.PROPOSAL_BRANCH_SCHOOL_LEADER.name(), RoleEventMsg.RENEW_ROLE));
|
||||
}
|
||||
|
||||
return StrUtil.format("增量更新成功,本次更新新入职老师{}人,新增单位{}个,设置为会员{}人。", sysUsers.size(), insertUnits.size(), memberCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class SysUnionGroupServiceImpl extends BaseServiceImpl<Sys_union_group> i
|
||||
throw new BaseException("小组编码已存在");
|
||||
}
|
||||
dao().insert(group);
|
||||
grantRole(group.getId(), group.getLeader());
|
||||
grantRole(group.getId(), group.getLeaders());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,7 +59,7 @@ public class SysUnionGroupServiceImpl extends BaseServiceImpl<Sys_union_group> i
|
||||
throw new BaseException("小组编码已存在");
|
||||
}
|
||||
dao().updateIgnoreNull(group);
|
||||
grantRole(group.getId(), group.getLeader());
|
||||
grantRole(group.getId(), group.getLeaders());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,20 +88,46 @@ public class SysUnionGroupServiceImpl extends BaseServiceImpl<Sys_union_group> i
|
||||
public Pagination pageData(PageForm pageForm, String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.username AS leaderUserName,
|
||||
t2.mobile AS leaderMobile
|
||||
t1.id,
|
||||
t1.`code`,
|
||||
t1.unionId,
|
||||
t1.`name`,
|
||||
t1.leaders,
|
||||
t1.unitIds,
|
||||
u_agg.unitInfos,
|
||||
l_agg.leaderInfos
|
||||
FROM
|
||||
sys_union_group t1
|
||||
LEFT JOIN sys_user t2 ON t2.id = t1.leader
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
tg.id,
|
||||
GROUP_CONCAT(u.NAME ORDER BY u.id) AS unitInfos
|
||||
FROM
|
||||
sys_union_group tg
|
||||
JOIN JSON_TABLE (tg.unitIds, '$[*]' COLUMNS (unitId VARCHAR (50) PATH '$')) ju
|
||||
JOIN sys_unit u ON u.id = ju.unitId
|
||||
GROUP BY
|
||||
tg.id
|
||||
) u_agg ON u_agg.id = t1.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
tg.id,
|
||||
GROUP_CONCAT(CONCAT(u1.username, '(', u1.loginname, ')') ORDER BY u1.username) AS leaderInfos
|
||||
FROM
|
||||
sys_union_group tg
|
||||
JOIN JSON_TABLE (tg.leaders, '$[*]' COLUMNS (userId VARCHAR (50) PATH '$')) jl
|
||||
JOIN sys_user u1 ON u1.id = jl.userId
|
||||
GROUP BY
|
||||
tg.id
|
||||
) l_agg ON l_agg.id = t1.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t1.unionId", "=", unionId);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.where().andLike("t1.name", pageForm.getSearchKeyword());
|
||||
cnd.where().andLike("t1.`name`", pageForm.getSearchKeyword());
|
||||
}
|
||||
cnd.asc("t1.code");
|
||||
cnd.asc("t1.`code`");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return pagination;
|
||||
@@ -124,16 +150,19 @@ public class SysUnionGroupServiceImpl extends BaseServiceImpl<Sys_union_group> i
|
||||
* @param groupId 小组id
|
||||
* @param groupLeader 组长id
|
||||
*/
|
||||
private void grantRole(String groupId, String groupLeader) {
|
||||
private void grantRole(String groupId, List<String> groupLeader) {
|
||||
// 小组长权限
|
||||
Sys_role unionGroupRole = sysRoleService.getByCode(RoleConstant.BRANCH_UNION_GROUP_LEADER.name());
|
||||
deleteUserRole(groupId, unionGroupRole.getId());
|
||||
|
||||
Sys_user_role userRole = new Sys_user_role();
|
||||
userRole.setRoleId(unionGroupRole.getId());
|
||||
userRole.setUnionGroupId(groupId);
|
||||
userRole.setUserId(groupLeader);
|
||||
dao().insert(userRole);
|
||||
List<Sys_user_role> roleList = groupLeader.stream().map(v -> {
|
||||
Sys_user_role userRole = new Sys_user_role();
|
||||
userRole.setRoleId(unionGroupRole.getId());
|
||||
userRole.setUnionGroupId(groupId);
|
||||
userRole.setUserId(v);
|
||||
return userRole;
|
||||
}).toList();
|
||||
dao().insert(roleList);
|
||||
|
||||
sysUserService.clearCache();
|
||||
sysRoleService.clearCache();
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.budwk.app.sys.models.*;
|
||||
import com.budwk.app.sys.services.SysMenuService;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
@@ -388,7 +389,17 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
||||
|
||||
StpUtil.login(user.getId());
|
||||
StpUtil.checkLogin();
|
||||
StpUtil.getSession(true).set("loginname", Strings.sNull(user.getLoginname())).set("username", Strings.sNull(user.getUsername())).set("unitId", Strings.sNull(user.getUnitId())).set("unitPath", Strings.sNull(user.getUnitPath())).set("unionId", ObjectUtil.isEmpty(user.getUnion()) ? "" : user.getUnion().getId());
|
||||
// 查询一下视图,存储一些sys_user表中没有的字段
|
||||
View_user viewUser = dao().fetch(View_user.class, Cnd.where("id", "=", user.getId()));
|
||||
StpUtil.getSession(true)
|
||||
.set("loginname", Strings.sNull(user.getLoginname()))
|
||||
.set("username", Strings.sNull(user.getUsername()))
|
||||
.set("unitId", Strings.sNull(user.getUnitId()))
|
||||
.set("unitPath", Strings.sNull(user.getUnitPath()))
|
||||
.set("unionId", ObjectUtil.isEmpty(user.getUnion()) ? "" : user.getUnion().getId())
|
||||
.set("unionGroupId", Strings.sNull(viewUser.getUnionGroupId()))
|
||||
.set("clubIds", Strings.sNull(viewUser.getClubIds()));
|
||||
|
||||
Sys_log sysLog = new Sys_log();
|
||||
sysLog.setType("info");
|
||||
sysLog.setTag("用户登陆");
|
||||
|
||||
@@ -199,4 +199,12 @@ public class View_user {
|
||||
@Column
|
||||
private String expectedLeaveSchoolDate;
|
||||
|
||||
@Column
|
||||
private String unionGroupId;
|
||||
|
||||
@Column
|
||||
private String unionGroupName;
|
||||
|
||||
@Column
|
||||
private String clubIds;
|
||||
}
|
||||
|
||||
@@ -4,30 +4,68 @@ import cn.dev33.satoken.session.SaSession;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import org.nutz.lang.Strings;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wizzer@qq.com
|
||||
*/
|
||||
public class SecurityUtil {
|
||||
|
||||
/**
|
||||
* 获取当前用户ID
|
||||
*/
|
||||
public static String getUserId() {
|
||||
return Strings.sNull(StpUtil.getLoginId(""));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户登录名
|
||||
*/
|
||||
public static String getUserLoginname() {
|
||||
return Strings.sNull(getSession().get("loginname"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户姓名
|
||||
*/
|
||||
public static String getUserUsername() {
|
||||
return Strings.sNull(getSession().get("username"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户单位ID
|
||||
*/
|
||||
public static String getUnitId() {
|
||||
return Strings.sNull(getSession().get("unitId"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户工会ID
|
||||
*/
|
||||
public static String getUnionId() {
|
||||
return Strings.sNull(getSession().get("unionId"));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前用户工会小组ID
|
||||
*/
|
||||
public static String getUnionGroupId() {
|
||||
return Strings.sNull(getSession().get("unionGroupId"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户协会ID
|
||||
*/
|
||||
public static List<String> getClubIds() {
|
||||
String clubIds = getSession().get("clubIds").toString();
|
||||
return Arrays.stream(clubIds.split(",")).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户Session
|
||||
*/
|
||||
public static SaSession getSession() {
|
||||
return StpUtil.getSession(true);
|
||||
}
|
||||
|
||||
-11
@@ -146,17 +146,6 @@ public class MemberApplyBranchUnionApprovalController {
|
||||
Pagination<NutMap> pagination = memberApplyRecordService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分工会审核撤回")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.branchUnionApproval")
|
||||
@SLog(tag = "会员管理-入会申请-分工会撤回", msg = "分工会入会审核撤回")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+6
-4
@@ -39,15 +39,17 @@ public class MemberApplyCommonController {
|
||||
return Result.success(user);
|
||||
}
|
||||
|
||||
// 分会主席只能查看本分会用户或未分配分会的用户
|
||||
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()) && (user.getUnionId().equals(SecurityUtil.getUnionId()) || StrUtil.isBlank(user.getUnionId()))) {
|
||||
// 分会主席只能查看本分会用户或未分配分会的用户 分工会操作员同主席权限一致
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_OPERATOR.name()) && (user.getUnionId().equals(SecurityUtil.getUnionId()) || StrUtil.isBlank(user.getUnionId()))) {
|
||||
user.setIdCard(DesensitizedUtil.idCardNum(user.getIdCard(), 3, 4));
|
||||
user.setMobile(DesensitizedUtil.mobilePhone(user.getMobile()));
|
||||
return Result.success(user);
|
||||
}
|
||||
|
||||
// 分工会操作员同主席权限一致
|
||||
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_OPERATOR.name()) && (user.getUnionId().equals(SecurityUtil.getUnionId()) || StrUtil.isBlank(user.getUnionId()))) {
|
||||
// 工会小组组长可以看小组里面的用户
|
||||
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_GROUP_LEADER.name())
|
||||
&& StrUtil.isAllNotBlank(user.getUnionGroupId(), SecurityUtil.getUnionGroupId())
|
||||
&& user.getUnionGroupId().equals(SecurityUtil.getUnionGroupId())) {
|
||||
user.setIdCard(DesensitizedUtil.idCardNum(user.getIdCard(), 3, 4));
|
||||
user.setMobile(DesensitizedUtil.mobilePhone(user.getMobile()));
|
||||
return Result.success(user);
|
||||
|
||||
+11
@@ -12,6 +12,7 @@ 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.flow.service.FlowCommonService;
|
||||
import com.budwk.app.sys.models.Sys_union_group;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
@@ -28,6 +29,7 @@ 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.lang.Lang;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
@@ -91,6 +93,11 @@ public class MemberApplyController {
|
||||
args.set("origin", "OTHER");
|
||||
memberApplyRecord.setOrigin("OTHER");
|
||||
}
|
||||
// 再去判断有没有工会小组
|
||||
Sys_union_group group = dao.fetch(Sys_union_group.class, Cnd.where(Sys_union_group::getUnionId, "=", SecurityUtil.getUnionId())
|
||||
.and(new Static("JSON_CONTAINS(unitIds, '\"%s\"')".formatted(SecurityUtil.getUnitId()))));
|
||||
args.set("type", Lang.isEmpty(group) ? "branch" : "group");
|
||||
|
||||
dao.insertOrUpdate(memberApplyRecord);
|
||||
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
@@ -121,6 +128,10 @@ public class MemberApplyController {
|
||||
dict.set("origin", "OTHER");
|
||||
memberApplyRecord.setOrigin("OTHER");
|
||||
}
|
||||
// 再去判断有没有工会小组
|
||||
Sys_union_group group = dao.fetch(Sys_union_group.class, Cnd.where(Sys_union_group::getUnionId, "=", SecurityUtil.getUnionId())
|
||||
.and(new Static("JSON_CONTAINS(unitIds, '\"%s\"')".formatted(SecurityUtil.getUnitId()))));
|
||||
dict.set("type", Lang.isEmpty(group) ? "branch" : "group");
|
||||
|
||||
dao.insertOrUpdate(memberApplyRecord);
|
||||
|
||||
|
||||
-31
@@ -144,37 +144,6 @@ public class MemberApplySchoolUnionApprovalController {
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("会员入会校工会审核")
|
||||
@SaCheckPermission("member.apply.schoolUnionApproval")
|
||||
@SLog(tag = "会员管理-会员入会申请-校工会审核", msg = "会员入会审核(校工会)")
|
||||
public Result approval(@Param("approval") @Valid BpmTaskApprovalParam approvalParam) {
|
||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
||||
|
||||
if (approvalParam.getBpmTaskApprovalTypeEnum().equals(BpmTaskApprovalTypeEnum.PASS)) {
|
||||
// 审核通过了,要去改基础数据
|
||||
MemberApplyRecord record = memberCommonService.dao().fetch(MemberApplyRecord.class, Cnd.where("id", "=", approvalParam.getProcessInstanceBusinessId()));
|
||||
Sys_user sysUser = new Sys_user();
|
||||
BeanUtil.copyProperties(record, sysUser);
|
||||
sysUser.setId(record.getUserId());
|
||||
dao.updateIgnoreNull(sysUser);
|
||||
}
|
||||
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("校工会审核撤回")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.schoolUnionApproval")
|
||||
@SLog(tag = "会员管理-入会申请-校工会撤回", msg = "校工会入会审核撤回")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.apply;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberApplyPageForm;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberCommonService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员入会申请分工会审核
|
||||
* @author fky
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@ApiOperation("会员入会申请工会小组审核")
|
||||
@At("/platform/member/apply/unionGroupApproval")
|
||||
public class MemberApplyUnionGroupApprovalController {
|
||||
|
||||
@Inject
|
||||
private BpmService bpmService;
|
||||
@Inject
|
||||
private CommonService commonService;
|
||||
@Inject
|
||||
private MemberCommonService memberCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/apply/uniongroupapproval/index.html")
|
||||
@SaCheckPermission("member.apply.unionGroupApproval")
|
||||
public void index() {}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("会员入会申请工会小组审核列表")
|
||||
@SaCheckPermission("member.apply.unionGroupApproval")
|
||||
public Result pageData(MemberApplyPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.userState,
|
||||
info.preparedBy,
|
||||
info.personType,
|
||||
info.applyDateTime,
|
||||
info.sign,
|
||||
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 member_apply_record info ON info.id = ins.businessNo
|
||||
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
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
MemberApplyPageForm.buildSearch(cnd, pageForm);
|
||||
|
||||
cnd.and("t.taskName", "=", "95688013-9dcb-43f1-ae54-c83ea2d2ddb1");
|
||||
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (pageForm.getAudit()) {
|
||||
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.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("t.createdAt");
|
||||
cnd.desc("info.applyDateTime");
|
||||
} else {
|
||||
cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = memberCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
}
|
||||
+3
-33
@@ -1,52 +1,27 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.change;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
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.BpmProcessConstant;
|
||||
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.utils.PageUtil;
|
||||
import com.budwk.app.bpm.enums.BpmTaskApprovalTypeEnum;
|
||||
import com.budwk.app.bpm.models.BpmProcessInstance;
|
||||
import com.budwk.app.bpm.models.BpmProcessTask;
|
||||
import com.budwk.app.bpm.param.BpmTaskApprovalParam;
|
||||
import com.budwk.app.bpm.service.BpmService;
|
||||
import com.budwk.app.bpm.vo.BpmTaskApprovalRecordVo;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.sys.models.Sys_user_history;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.staffmanage.member.models.MemberApplyRecord;
|
||||
import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberChangePageForm;
|
||||
import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberManagePageForm;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberBranchUnionManageService;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberCommonService;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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.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 javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -64,21 +39,16 @@ public class MemberBranchUnionAuditController {
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private CommonService commonService;
|
||||
@Inject
|
||||
private MemberCommonService memberCommonService;
|
||||
@Inject
|
||||
private MemberBranchUnionManageService memberBranchUnionManageService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/branchUnionAudit/index.html")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/branchunionaudit/index.html")
|
||||
@SaCheckPermission("member.change.branchUnion.audit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/branchUnionAudit/form.html")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/branchunionaudit/form.html")
|
||||
@SaCheckPermission("member.change.branchUnion.audit")
|
||||
public void form() {
|
||||
}
|
||||
@@ -129,7 +99,7 @@ public class MemberBranchUnionAuditController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageForm.buildSearch(cnd, "info.");
|
||||
|
||||
cnd.and("t.taskName", "=", "8ca3bcf0-7b86-4ef2-b19f-b76a1707e2da");
|
||||
cnd.and("t.taskName", "=", "64805be3-b325-4c25-a516-d0c4e4a87509");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (pageForm.getAudit()) {
|
||||
|
||||
+12
-4
@@ -13,6 +13,7 @@ import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.sys.models.Sys_union;
|
||||
import com.budwk.app.sys.models.Sys_union_group;
|
||||
import com.budwk.app.sys.models.Sys_unit;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
@@ -26,6 +27,7 @@ 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.util.cri.Static;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -92,7 +94,11 @@ public class MemberChangeApplyController {
|
||||
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set("origin", "person");
|
||||
// 判断有没有工会小组
|
||||
Sys_union_group group = dao.fetch(Sys_union_group.class, Cnd.where(Sys_union_group::getUnionId, "=", SecurityUtil.getUnionId())
|
||||
.and(new Static("JSON_CONTAINS(unitIds, '\"%s\"')".formatted(SecurityUtil.getUnitId()))));
|
||||
args.set("submit", Lang.isEmpty(group) ? "singleBranch" : "singleHaveGroup");
|
||||
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, memberChangeRecord);
|
||||
ProcessInstance instance = flowEngine.startProcessInstanceByKey("HYBG", memberChangeRecord.getId(), SecurityUtil.getUserId(), args);
|
||||
@@ -117,7 +123,10 @@ public class MemberChangeApplyController {
|
||||
dao.insertOrUpdate(memberChangeRecord);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set("origin", "personType");
|
||||
// 判断有没有工会小组
|
||||
Sys_union_group group = dao.fetch(Sys_union_group.class, Cnd.where(Sys_union_group::getUnionId, "=", SecurityUtil.getUnionId())
|
||||
.and(new Static("JSON_CONTAINS(unitIds, '\"%s\"')".formatted(SecurityUtil.getUnitId()))));
|
||||
dict.set("submit", Lang.isEmpty(group) ? "singleBranch" : "singleHaveGroup");
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
@@ -125,7 +134,6 @@ public class MemberChangeApplyController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ApiModelProperty("根据id查询变更记录")
|
||||
@SaCheckPermission("member.change.apply")
|
||||
@@ -139,7 +147,7 @@ public class MemberChangeApplyController {
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission(value = {"member.change.branchUnion.audit","member.change.schoolUnion.audit"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"member.change.branchUnion.audit","member.change.schoolUnion.audit", "member.change.unionGroup.audit"}, mode = SaMode.OR)
|
||||
public Result getUserByIdForMemberChange(String userId){
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where("id", "=", userId));
|
||||
NutMap nutMap = Lang.obj2nutmap(user);
|
||||
|
||||
+20
-3
@@ -22,6 +22,7 @@ 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.sys.models.Sys_config;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
@@ -101,9 +102,12 @@ public class MemberChangeManageController {
|
||||
}
|
||||
boolean schoolRoleBool = AuthUtil.hasRoleOr(RoleConstant.SCHOOL_UNION_CHAIRMAN.name(), RoleConstant.SCHOOL_UNION_MEMBER_ADMIN.name(), RoleConstant.SYSADMIN.name());
|
||||
boolean branchRoleBool = AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_OPERATOR.name());
|
||||
boolean groupRoleBool = AuthUtil.hasRole(RoleConstant.BRANCH_UNION_GROUP_LEADER.name());
|
||||
|
||||
// 变更类型
|
||||
MemberChangeOrigin changeOrigin = schoolRoleBool ? MemberChangeOrigin.SCHOOL_UNION : branchRoleBool ? MemberChangeOrigin.BRANCH_UNION : null;
|
||||
MemberChangeOrigin changeOrigin = schoolRoleBool ? MemberChangeOrigin.SCHOOL_UNION :
|
||||
branchRoleBool ? MemberChangeOrigin.BRANCH_UNION :
|
||||
groupRoleBool ? MemberChangeOrigin.UNION_GROUP : null;
|
||||
|
||||
if (changeOrigin == null) {
|
||||
throw new BaseException("没有权限,或未设置工会小组");
|
||||
@@ -114,10 +118,23 @@ public class MemberChangeManageController {
|
||||
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
args.set("submit", "admin");
|
||||
|
||||
if (schoolRoleBool) {
|
||||
args.set("origin", "schoolUnion");
|
||||
args.set("adminSubmit", "schoolUnion");
|
||||
} else if (branchRoleBool) {
|
||||
args.set("adminSubmit", "branchUnion");
|
||||
} else {
|
||||
args.set("origin", "branchUnion");
|
||||
args.set("adminSubmit", "unionGroup");
|
||||
// 还要设置工会小组是否需要审核的参数
|
||||
Sys_config config = dao.fetch(Sys_config.class, Cnd.where(Sys_config::getConfigKey, "=", "UnionGroupIsNeedBranchAudit"));
|
||||
if ("true".equals(config.getConfigValue())) {
|
||||
// 需要,流转到分工会审核
|
||||
args.set("groupAuditNext", "branchAudit");
|
||||
} else {
|
||||
// 不需要,流转到校工会审核
|
||||
args.set("groupAuditNext", "schoolAudit");
|
||||
}
|
||||
}
|
||||
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
|
||||
args.set(FlowConst.FORM_DATA, record);
|
||||
|
||||
+3
-81
@@ -71,13 +71,13 @@ public class MemberSchoolUnionAuditController {
|
||||
private MemberSchoolUnionManageService memberSchoolUnionManageService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/schoolUnionAudit/index.html")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/schoolunionaudit/index.html")
|
||||
@SaCheckPermission("member.change.schoolUnion.audit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/schoolUnionAudit/form.html")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/schoolunionaudit/form.html")
|
||||
@SaCheckPermission("member.change.schoolUnion.audit")
|
||||
public void form() {
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class MemberSchoolUnionAuditController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageForm.buildSearch(cnd, "info.");
|
||||
|
||||
cnd.and("t.taskName", "=", "f18d8726-75bc-43a9-87a8-2dd73341bdce");
|
||||
cnd.and("t.taskName", "=", "55f85ecd-7aab-4ba9-a8ec-f256839947f0");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (pageForm.getAudit()) {
|
||||
@@ -147,82 +147,4 @@ public class MemberSchoolUnionAuditController {
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@RepeatSubmit
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.change.schoolUnion.audit")
|
||||
@SLog(tag = "会员管理-校工会管理", type = "memberSchoolUnionAudit", msg = "校工会会员审核")
|
||||
public Result approval(@Param("approval") @Valid BpmTaskApprovalParam approvalParam) {
|
||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
||||
if (approvalParam.getBpmTaskApprovalTypeEnum().equals(BpmTaskApprovalTypeEnum.PASS)) {
|
||||
MemberChangeRecord record = memberCommonService.dao().fetch(MemberChangeRecord.class, Cnd.where("id", "=", approvalParam.getProcessInstanceBusinessId()));
|
||||
if (StrUtil.isNotEmpty(approvalParam.getApprovalRemark())) {
|
||||
memberCommonService.dao().update(MemberChangeRecord.class, Chain.make("remark", approvalParam.getApprovalRemark()), Cnd.where("id", "=", record.getId()));
|
||||
}
|
||||
memberCommonService.compareChangeInfoAndUpdateMember(record);
|
||||
}
|
||||
bpmService.completeTask(approvalParam.getProcessInstanceTaskId(), approvalParam.getBpmTaskApprovalTypeEnum(), variables, null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.change.schoolUnion.audit")
|
||||
@SLog(type = "memberChange", tag = "会员变更", msg = "校工会批量审核")
|
||||
public Object doBatchApproval(@Param("data") String[] ids){
|
||||
if (ids.length == 0) {
|
||||
return Result.error("未获取到选择数据");
|
||||
}
|
||||
|
||||
for (String id : ids) {
|
||||
BpmProcessInstance committeeInstance = dao.fetch(BpmProcessInstance.class, Cnd.where("processInstanceBusinessId", "=", id));
|
||||
BpmProcessTask committeeTask = dao.fetch(BpmProcessTask.class, Cnd.where(BpmProcessTask::getProcessInstanceId, "=", committeeInstance.getId())
|
||||
.desc(BpmProcessTask::getCreatedAt));
|
||||
|
||||
BpmTaskApprovalParam committeeParam = new BpmTaskApprovalParam();
|
||||
committeeParam.setProcessInstanceId(committeeInstance.getId());
|
||||
committeeParam.setProcessInstanceBusinessId(id);
|
||||
committeeParam.setProcessInstanceTaskId(committeeTask.getId());
|
||||
committeeParam.setBpmTaskApprovalType(BpmTaskApprovalTypeEnum.PASS.name());
|
||||
committeeParam.setBpmTaskApprovalTypeEnum(BpmTaskApprovalTypeEnum.PASS);
|
||||
committeeParam.setApprovalOpinion("校工会审核通过");
|
||||
|
||||
memberCommonService.compareChangeInfoAndUpdateMember(committeeParam.getProcessInstanceBusinessId());
|
||||
bpmService.completeTask(committeeParam.getProcessInstanceTaskId(), committeeParam.getBpmTaskApprovalTypeEnum(), null, null);
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("校工会审核撤回")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.change.schoolUnion.audit")
|
||||
@SLog(tag = "会员管理-校工会管理", type = "memberSchoolUnionAudit", msg = "校工会审核撤回")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
|
||||
// 审核通过的撤回,要将数据也改变回去
|
||||
BpmProcessTask oldTask = dao.fetch(BpmProcessTask.class, taskId);
|
||||
BpmProcessInstance fetch = dao.fetch(BpmProcessInstance.class, oldTask.getProcessInstanceId());
|
||||
String businessId = fetch.getProcessInstanceBusinessId();
|
||||
|
||||
// 先查询历史记录,然后再把历史记录赋值给现在数据库存储的记录
|
||||
Sys_user_history history = dao.fetch(Sys_user_history.class, Cnd.where(Sys_user_history::getRecordId, "=", businessId));
|
||||
Sys_user info = dao.fetch(Sys_user.class, Cnd.where(Sys_user::getLoginname, "=", history.getLoginname()));
|
||||
|
||||
String userId = info.getId();
|
||||
BeanUtil.copyProperties(history, info);
|
||||
info.setId(userId);
|
||||
dao.update(info);
|
||||
dao.delete(history);
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.change;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.controllers.open.commons.service.CommonService;
|
||||
import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberChangePageForm;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberCommonService;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
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.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:MemberUnionGroupAuditController
|
||||
* @Date 2025/9/29 11:12
|
||||
* @注释 会员变更,工会小组审核
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@At("/platform/member/change/unionGroup/audit")
|
||||
public class MemberUnionGroupAuditController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private CommonService commonService;
|
||||
@Inject
|
||||
private MemberCommonService memberCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/change/uniongroupaudit/index.html")
|
||||
@SaCheckPermission("member.change.unionGroup.audit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiModelProperty("会员变更申请,工会小组审核列表")
|
||||
@SaCheckPermission("member.change.unionGroup.audit")
|
||||
public Result pageData(MemberChangePageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.sex,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.userState,
|
||||
info.preparedBy,
|
||||
info.personType,
|
||||
info.changeTypes,
|
||||
info.applyDateTime,
|
||||
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 member_change_record info ON info.id = ins.businessNo
|
||||
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
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageForm.buildSearch(cnd, "info.");
|
||||
|
||||
cnd.and("t.taskName", "=", "cbe2a530-b806-467d-88ac-5defb058d403");
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
|
||||
if (pageForm.getAudit()) {
|
||||
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.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.desc("info.applyDateTime");
|
||||
} else {
|
||||
cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = memberCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.check;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberCheckPageForm;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberCheckTaskService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author zzr
|
||||
* @name:MemberCheckTaskSchoolController
|
||||
* @Date 2025/9/26 15:31
|
||||
* @注释 校工会核对
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@At("/platform/member/checkTask/school")
|
||||
public class MemberCheckTaskSchoolController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private MemberCheckTaskService memberCheckTaskService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/check/school/index.html")
|
||||
@SaCheckPermission("member.checkTask.school")
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("member.checkTask.school")
|
||||
public Result pageData(MemberCheckPageForm pageForm) {
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.interceptor;
|
||||
|
||||
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.sys.models.Sys_config;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:MemberApplyUnionGroupApprovalInterceptor
|
||||
* @Date 2025/9/29 11:32
|
||||
* @注释
|
||||
*/
|
||||
public class MemberApplyUnionGroupApprovalInterceptor implements FlowInterceptor {
|
||||
|
||||
@Override
|
||||
public void intercept(Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
// 是否需要分工会审核
|
||||
Sys_config config = dao.fetch(Sys_config.class, Cnd.where(Sys_config::getConfigKey, "=", "UnionGroupIsNeedBranchAudit"));
|
||||
if ("true".equals(config.getConfigValue())) {
|
||||
// 需要,流转到分工会审核
|
||||
execution.getArgs().set("groupAuditNext", "branchAudit");
|
||||
} else {
|
||||
// 不需要,流转到校工会审核
|
||||
execution.getArgs().set("groupAuditNext", "schoolAudit");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.interceptor;
|
||||
|
||||
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.sys.models.Sys_config;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author FKY
|
||||
* @name:MemberChangeUnionGroupApprovalInterceptor
|
||||
* @Date 2025/9/29 11:32
|
||||
* @注释
|
||||
*/
|
||||
public class MemberChangeUnionGroupApprovalInterceptor implements FlowInterceptor {
|
||||
|
||||
@Override
|
||||
public void intercept(Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
// 是否需要分工会审核
|
||||
Sys_config config = dao.fetch(Sys_config.class, Cnd.where(Sys_config::getConfigKey, "=", "UnionGroupIsNeedBranchAudit"));
|
||||
if ("true".equals(config.getConfigValue())) {
|
||||
// 需要,流转到分工会审核
|
||||
execution.getArgs().set("groupAuditNext", "branchAudit");
|
||||
} else {
|
||||
// 不需要,流转到校工会审核
|
||||
execution.getArgs().set("groupAuditNext", "schoolAudit");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -66,8 +66,10 @@ public class MemberManagePageForm extends PageForm {
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_OPERATOR.name())) {
|
||||
cnd.and("u.unionId", "=", SecurityUtil.getUnionId());
|
||||
} else if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_GROUP_LEADER.name())) {
|
||||
cnd.and("u.unionGroupId", "=", SecurityUtil.getUnionGroupId());
|
||||
} else {
|
||||
cnd.and("record.userId", "=", SecurityUtil.getUserId());
|
||||
cnd.and("u.id", "=", SecurityUtil.getUserId());
|
||||
}
|
||||
} else {
|
||||
cnd.andEX("u.unionId", "=", pageForm.getUnionId());
|
||||
|
||||
+1
-1
@@ -405,7 +405,7 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NutMap> getAllChangeInfo(String userId) {
|
||||
public List<NutMap> getAllChangeInfo(String userId) {
|
||||
List<NutMap> resultMapList = new ArrayList<>();
|
||||
|
||||
Sql sql = Sqls.fetchString(Sqls.create("select loginname from sys_user where id = @id").setParam("id", userId).toString());
|
||||
|
||||
@@ -87,6 +87,11 @@ layout("/layouts/platform.html"){
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<member-all-change-info ref="memberAllChangeInfoRef"></member-all-change-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
<el-dialog title="选择数据源" :visible.sync="updateDialog" width="70%">
|
||||
<el-timeline>
|
||||
@@ -127,6 +132,8 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../../../zhgh/staffmanage/member/change/common/memberAllChangeInfo.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
@@ -166,6 +173,9 @@ layout("/layouts/platform.html"){
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"member-all-change-info": MEMBER_ALL_CHANGE_INFO
|
||||
},
|
||||
methods: {
|
||||
// 更新单位数据
|
||||
updateUnits() {
|
||||
@@ -204,7 +214,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
openCurrentUserChangeInfo(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.memberAuditChangeInfoRef.onOpen({ userId: row.id, recordId: row.userHistoryId })
|
||||
this.$refs.memberAllChangeInfoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
getChangeTypes(changeTypes) {
|
||||
|
||||
@@ -21,10 +21,10 @@ const branchUnionGroupManage = {
|
||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter); margin-top: 10px">
|
||||
<el-table :data="tableData" border>
|
||||
<el-table-column type="index" width="50" label="序号"></el-table-column>
|
||||
<el-table-column prop="code" label="小组编码"></el-table-column>
|
||||
<el-table-column prop="name" label="小组名称"></el-table-column>
|
||||
<el-table-column prop="leaderUserName" label="组长姓名"></el-table-column>
|
||||
<el-table-column prop="leaderMobile" label="组长电话"></el-table-column>
|
||||
<el-table-column prop="code" label="小组编码" width="120px"></el-table-column>
|
||||
<el-table-column prop="name" label="小组名称" width="200px"></el-table-column>
|
||||
<el-table-column prop="leaderInfos" label="组长信息"></el-table-column>
|
||||
<el-table-column prop="unitInfos" label="组成单位"></el-table-column>
|
||||
<el-table-column label="操作" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" size="mini" @click="onEdit(row)">
|
||||
@@ -49,11 +49,17 @@ const branchUnionGroupManage = {
|
||||
<el-form-item label="小组名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="小组名称" maxlength="100"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="小组长" prop="leader">
|
||||
<el-form-item label="组成单位" prop="unitIds">
|
||||
<el-select clearable filterable placeholder="请选择组成单位" multiple
|
||||
style="width: 100%" v-model="formData.unitIds">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="小组长" prop="leaders">
|
||||
<el-select
|
||||
v-model="formData.leader"
|
||||
v-model="formData.leaders"
|
||||
filterable
|
||||
remote
|
||||
remote multiple
|
||||
reserve-keyword
|
||||
placeholder="请输入姓名查询"
|
||||
:remote-method="getUserOptions"
|
||||
@@ -88,22 +94,27 @@ const branchUnionGroupManage = {
|
||||
rules: {
|
||||
code: [{ required: true, message: "请输入小组编码", trigger: "blur" }],
|
||||
name: [{ required: true, message: "请输入小组名称", trigger: "blur" }],
|
||||
leader: [{ required: true, message: "请选择小组长", trigger: "change" }]
|
||||
leaders: [{ required: true, message: "请选择小组长", trigger: "change" }],
|
||||
unitIds: [{ required: true, message: "请选择组成单位", trigger: "change" }],
|
||||
},
|
||||
userOptions: []
|
||||
userOptions: [],
|
||||
units: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openAdd() {
|
||||
async openAdd() {
|
||||
this.dialogFormVisible = true
|
||||
await this.getUnits()
|
||||
this.$nextTick(() => {
|
||||
this.formData = {}
|
||||
this.$refs.formRef.clearValidate()
|
||||
})
|
||||
},
|
||||
|
||||
onEdit(row) {
|
||||
async onEdit(row) {
|
||||
this.formData = { ...row }
|
||||
await this.getUnits(row.id)
|
||||
this.getUserOptions(row.leaderUserName)
|
||||
this.dialogFormVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.formRef.clearValidate()
|
||||
@@ -115,7 +126,10 @@ const branchUnionGroupManage = {
|
||||
if (valid) {
|
||||
const { id } = this.formData
|
||||
const url = "/platform/sys/unionGroup" + (id ? "/update" : "/insert")
|
||||
$.post(url, { ...this.formData, unionId: this.union_id }).then((res) => {
|
||||
const formData = clone(this.formData)
|
||||
formData.unitIds = JSON.stringify(formData.unitIds)
|
||||
formData.leaders = JSON.stringify(formData.leaders)
|
||||
$.post(url, { ...formData, unionId: this.union_id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.dialogFormVisible = false
|
||||
@@ -158,6 +172,15 @@ const branchUnionGroupManage = {
|
||||
this.userOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
async getUnits(val) {
|
||||
const resp = await this.$axios.post("/platform/sys/unionGroup/getUnits", {
|
||||
unionId: this.union_id,
|
||||
groupId: val
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.units = resp.data
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+9
-3
@@ -102,9 +102,9 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "sign", label: "签字" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
@@ -145,6 +145,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
@@ -156,6 +157,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -165,12 +168,15 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).finally(()=>{
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
search(pageForm){
|
||||
|
||||
+4
-4
@@ -27,14 +27,14 @@ const COMMON_QUERY = {
|
||||
<dict-select v-model="pageForm.userStates" placeholder="在职状态" @change="doSearch"
|
||||
code="USER_STATE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select v-model="pageForm.preparedBys" placeholder="编制类别" @change="doSearch"
|
||||
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
<search-item label="教职工类别">
|
||||
<dict-select v-model="pageForm.personTypes" placeholder="教职工类别" @change="doSearch"
|
||||
code="USER_PERSON_TYPE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select v-model="pageForm.preparedBys" placeholder="编制类别" @change="doSearch"
|
||||
code="USER_PREPARED_BY_TYPE" multiple collapse-tags></dict-select>
|
||||
</search-item>
|
||||
</template>
|
||||
</search>
|
||||
`,
|
||||
|
||||
@@ -28,33 +28,34 @@ const INFO = {
|
||||
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教职工类别">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="编制类别">{{ viewData.preparedBy }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families&&viewData.families.length"
|
||||
:data="viewData.families" size="mini" border
|
||||
:header-cell-style="{background:'#eff3f6'}"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="relation" label="与本人关系" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" align="center" header-align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="个人简况" :span="3">
|
||||
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</el-descriptions-item>
|
||||
<template v-if="viewData.loginname == $store.state.user.loginname">
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families&&viewData.families.length"
|
||||
:data="viewData.families" size="mini" border
|
||||
:header-cell-style="{background:'#eff3f6'}"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="relation" label="与本人关系" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="个人简况" :span="3">
|
||||
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="签字信息" :span="3">
|
||||
<el-image v-if="viewData.sign" :src="viewData.sign"
|
||||
<el-descriptions-item label="签字信息" :span="3" v-if="viewData.sign">
|
||||
<el-image :src="viewData.sign"
|
||||
class="signature-image"></el-image>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
@@ -85,8 +85,8 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "sign", label: "签字" },
|
||||
@@ -119,9 +119,12 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -131,11 +134,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/platform/member/apply/mine/onDelete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
+8
-2
@@ -120,9 +120,9 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "sign", label: "签字" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
@@ -168,6 +168,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
@@ -179,6 +180,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -188,11 +191,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
@@ -294,11 +294,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/member/apply/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -310,6 +313,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/apply/submit/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
@@ -317,6 +321,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/member/apply/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -328,6 +334,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/apply/submit/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId,
|
||||
@@ -336,6 +343,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/member/apply/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<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" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='sign'">
|
||||
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<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="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<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>
|
||||
</info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
audit: false
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "sign", label: "签字" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
|
||||
// 审核相关
|
||||
showApprovalForm: false,
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO,
|
||||
"common-query": COMMON_QUERY,
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
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()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
search(pageForm){
|
||||
if (pageForm) {
|
||||
this.pageForm = {...this.pageForm, ...pageForm}
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+8
@@ -95,6 +95,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "sex", label: "性别", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: 'preparedBy', label: '编制类别', sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
|
||||
@@ -138,6 +139,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
@@ -149,6 +151,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -159,11 +163,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -176,6 +183,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
getChangeTypes(changeTypes) {
|
||||
const changeTypesList = JSON.parse(changeTypes)
|
||||
if (!changeTypesList) return null
|
||||
if (changeTypesList) {
|
||||
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
|
||||
return changeTypesList
|
||||
@@ -34,6 +34,10 @@ layout("/layouts/platform.html"){
|
||||
<dict-select v-model="pageForm.personType" placeholder="教职工类别" @change="doSearch"
|
||||
code="USER_PERSON_TYPE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select v-model="pageForm.preparedBy" placeholder="编制类别" @change="doSearch"
|
||||
code="USER_PREPARED_BY_TYPE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="更新日期">
|
||||
<el-date-picker :picker-options="pickerOptions" @change="changeDateRangeChange"
|
||||
align="right" end-placeholder="结束日期" format="yyyy-MM-dd"
|
||||
@@ -45,7 +49,7 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="人员列表">
|
||||
<table-tool label="人员列表(工会小组或分工会提交的变更还需校工会审核哦)">
|
||||
<el-radio-group @change="doSearch" class="mr5"
|
||||
size="small"
|
||||
v-model="pageForm.isMember">
|
||||
@@ -135,7 +139,7 @@ layout("/layouts/platform.html"){
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'change',data:row}"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN'])">
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_GROUP_LEADER'])">
|
||||
变更
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -215,8 +219,9 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'username', label: '姓名', sortable: true},
|
||||
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
|
||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||
{prop: 'personType', label: '教职工类别', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'personType', label: '教职工类别', sortable: true},
|
||||
{prop: 'preparedBy', label: '编制类别', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
],
|
||||
|
||||
@@ -69,6 +69,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "sex", label: "性别", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
|
||||
@@ -98,11 +99,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -113,11 +117,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/platform/member/change/mine/onDelete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
+8
@@ -97,6 +97,7 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "sex", label: "性别", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: 'preparedBy', label: '编制类别', sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
|
||||
@@ -140,6 +141,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
@@ -151,6 +153,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -161,11 +165,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -178,6 +185,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
getChangeTypes(changeTypes) {
|
||||
const changeTypesList = JSON.parse(changeTypes)
|
||||
if (!changeTypesList) return null
|
||||
if (changeTypesList) {
|
||||
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
|
||||
return changeTypesList
|
||||
+18
-29
@@ -142,32 +142,12 @@ layout("/layouts/platform.html"){
|
||||
:disabled="allowFields('personType')" style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
|
||||
<template v-if="formData.userState == '退休'">
|
||||
<el-descriptions-item label="退休日期">
|
||||
<el-form-item prop="retireDate">
|
||||
<el-date-picker v-model="formData.retireDate"
|
||||
type="date"
|
||||
placeholder="请选择出生日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="福利享受截止日期">
|
||||
<el-form-item prop="welfareStopDate">
|
||||
<el-date-picker v-model="formData.welfareStopDate"
|
||||
type="date"
|
||||
:disabled="isView"
|
||||
placeholder="请选择福利享受截止日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item label="编制类别">
|
||||
<el-form-item prop="preparedBy">
|
||||
<dict-select v-model="formData.preparedBy" code="USER_PREPARED_BY_TYPE"
|
||||
:disabled="allowFields('preparedBy')" style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="会员状态" :span="1.5">
|
||||
<el-form-item prop="member">
|
||||
@@ -390,11 +370,14 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/change/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
commonUtil.pjaxPush('/platform/member/change/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -406,6 +389,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/change/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
@@ -413,6 +397,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/member/change/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -423,6 +409,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/change/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
@@ -431,6 +418,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/member/change/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -508,14 +497,14 @@ layout("/layouts/platform.html"){
|
||||
families,
|
||||
personalData
|
||||
} = this.user
|
||||
|
||||
|
||||
this.$set(this.formData, "userId", id)
|
||||
this.$set(this.formData, "username", username)
|
||||
this.$set(this.formData, "loginname", loginname)
|
||||
this.$set(this.formData, "birthday", birthday)
|
||||
this.$set(this.formData, "sex", sex)
|
||||
this.$set(this.formData, "member", member === 1)
|
||||
this.$set(this.formData, "welfareMember", welfareMember === 1)
|
||||
this.$set(this.formData, "member", member)
|
||||
this.$set(this.formData, "welfareMember", welfareMember)
|
||||
this.$set(this.formData, "idCard", idCard)
|
||||
this.$set(this.formData, "nation", nation)
|
||||
this.$set(this.formData, "political", political)
|
||||
|
||||
+206
@@ -0,0 +1,206 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="审核列表">
|
||||
<el-radio-group @change="search" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<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" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column :label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns">
|
||||
<template scope="{row}" v-if="column.prop=='changeTypes'">
|
||||
<span style="color: #0e78c5;cursor: pointer" @click="openView(row)">
|
||||
{{getChangeTypes(row.changeTypes)}}
|
||||
</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<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="200px">
|
||||
<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>
|
||||
<info ref="infoRef">
|
||||
<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>
|
||||
</info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
audit: false
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "sex", label: "性别", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: 'preparedBy', label: '编制类别', sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "changeTypes", label: "变更类型", sortable: true, width: 200 },
|
||||
{ prop: "applyDateTime", label: "申请时间", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
],
|
||||
|
||||
changeTypeData: [],
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
'common-query': COMMON_QUERY,
|
||||
},
|
||||
methods: {
|
||||
openView(row){
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
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()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
search(pageForm){
|
||||
if (pageForm) {
|
||||
this.pageForm = {...this.pageForm, ...pageForm}
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
getChangeTypes(changeTypes) {
|
||||
const changeTypesList = JSON.parse(changeTypes)
|
||||
if (!changeTypesList) return null
|
||||
if (changeTypesList) {
|
||||
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
|
||||
return changeTypesList
|
||||
.map((v) => {
|
||||
return this.changeTypeData.find((item) => item.code === v).changeTypeName
|
||||
})
|
||||
.join(",")
|
||||
}
|
||||
return null
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.changeTypeData = await this.$businessTool.getEnumOptions("MemberChangeType")
|
||||
this.pageData()
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,28 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,26 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,26 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+16
-11
@@ -31,8 +31,8 @@
|
||||
|
||||
<!-- 退休补充 -->
|
||||
<template v-if="viewData.userState == '退休'">
|
||||
<el-descriptions-item label="退休日期">{{ viewData.retireDate ? moment(viewData.retireDate).format("YYYY-MM-DD") : '暂无' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="福利享受截止日期">{{ moment(viewData.welfareStopDate).format("YYYY-MM-DD") }}</el-descriptions-item>
|
||||
<el-descriptions-item label="退休日期">{{ viewData.retireDate ? $moment(viewData.retireDate).format("YYYY-MM-DD") : '暂无' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="福利享受截止日期">{{ viewData.welfareStopDate ? $moment(viewData.welfareStopDate).format("YYYY-MM-DD") : '暂无' }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
</template>
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
<template v-if="viewData.loginname === $store.state.user.loginname">
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families && viewData.families.length" :data="viewData.families" size="mini" border :header-cell-style="{background:'#eff3f6'}" style="width: 100%">
|
||||
<el-table-column prop="relation" label="与本人关系" align="center" header-align="center"/>
|
||||
<el-table-column prop="name" label="姓名" align="center" header-align="center"/>
|
||||
<el-table-column prop="unit" label="单位" align="center" header-align="center"/>
|
||||
<el-table-column prop="remark" label="备注" align="center" header-align="center"/>
|
||||
<el-table-column prop="relation" label="与本人关系" align="center"/>
|
||||
<el-table-column prop="name" label="姓名" align="center"/>
|
||||
<el-table-column prop="unit" label="单位" align="center"/>
|
||||
<el-table-column prop="remark" label="备注" align="center"/>
|
||||
</el-table>
|
||||
<el-empty v-else :image-size="50" description="暂无家庭成员信息"/>
|
||||
</el-descriptions-item>
|
||||
@@ -61,19 +61,24 @@
|
||||
<!-- 第 1 行 -->
|
||||
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
|
||||
|
||||
<!-- 第 2 行 -->
|
||||
<el-descriptions-item label="教职工类别">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
|
||||
<el-descriptions-item label="进校时间">{{ viewData.arrivalAtSchoolDate ? $moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD') : null }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="从教年月">{{ viewData.teachingTime ? $moment(viewData.teachingTime).format('YYYY-MM-DD') : null }}</el-descriptions-item>
|
||||
<el-descriptions-item label="预/已离校时间">{{ viewData.expectedLeaveSchoolDate ? $moment(viewData.expectedLeaveSchoolDate).format('YYYY-MM-DD') : null }}</el-descriptions-item>
|
||||
|
||||
<!-- 第 3 行 -->
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教职工类别">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="编制类别">{{ viewData.preparedBy }}</el-descriptions-item>
|
||||
|
||||
<!-- 第 4 行 -->
|
||||
<el-descriptions-item label="职称">{{ viewData.professionalTitle }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职级">{{ viewData.professionalLevel }}</el-descriptions-item>
|
||||
<el-descriptions-item label="岗位系列">{{ viewData.positionSeries }}</el-descriptions-item>
|
||||
|
||||
<!-- 第 4 行 -->
|
||||
<!-- 第 5 行 -->
|
||||
<el-descriptions-item label="行政级别(管理岗位)">{{ viewData.administrativeLevel }}</el-descriptions-item>
|
||||
<el-descriptions-item label="岗级">{{ viewData.positionLevel }}</el-descriptions-item>
|
||||
<el-descriptions-item label="行政岗级">{{ viewData.administrativePositionLevel }}</el-descriptions-item>
|
||||
|
||||
+23
-23
@@ -73,6 +73,29 @@ layout("/layouts/platform.html"){
|
||||
placeholder="多个请用英文逗号分隔"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
<div class="search-other mt20">
|
||||
<div class="search-other-label">在职状态</div>
|
||||
<div>
|
||||
<el-tag
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in dict.type.USER_STATE"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
:effect="pageForm.userStates.includes(item.name)?'dark':'plain'"
|
||||
@click="tagClick('userStates',item.name)">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
<el-link type="danger"
|
||||
v-if="dict.type.USER_STATE?.length && pageForm.userStates.length"
|
||||
:underline="false"
|
||||
@click="pageForm.userStates=[]; doSearch()">清空
|
||||
</el-link>
|
||||
<el-link :underline="false"
|
||||
@click="pageForm.userStates = dict.type.USER_STATE?.map(p=>p.code); doSearch()"
|
||||
type="success">全部
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-other mt20">
|
||||
<div class="search-other-label">教职工类别</div>
|
||||
<div>
|
||||
@@ -96,29 +119,6 @@ layout("/layouts/platform.html"){
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-other mt20">
|
||||
<div class="search-other-label">在职状态</div>
|
||||
<div>
|
||||
<el-tag
|
||||
style="margin-right: 10px;cursor: pointer"
|
||||
v-for="item in dict.type.USER_STATE"
|
||||
:key="item.code"
|
||||
:type="item.name"
|
||||
:effect="pageForm.userStates.includes(item.name)?'dark':'plain'"
|
||||
@click="tagClick('userStates',item.name)">
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
<el-link type="danger"
|
||||
v-if="dict.type.USER_STATE?.length && pageForm.userStates.length"
|
||||
:underline="false"
|
||||
@click="pageForm.userStates=[]; doSearch()">清空
|
||||
</el-link>
|
||||
<el-link :underline="false"
|
||||
@click="pageForm.userStates = dict.type.USER_STATE?.map(p=>p.code); doSearch()"
|
||||
type="success">全部
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
@@ -43,17 +43,17 @@ layout("/layouts/platform.html"){
|
||||
<search-item label="在职状态">
|
||||
<dict-select v-model="pageForm.userState" placeholder="在职状态" @change="doSearch" code="USER_STATE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select
|
||||
v-model="pageForm.preparedBy"
|
||||
placeholder="编制类别"
|
||||
@change="doSearch"
|
||||
code="USER_PREPARED_BY_TYPE"
|
||||
></dict-select>
|
||||
</search-item>
|
||||
<search-item label="教职工类别">
|
||||
<dict-select v-model="pageForm.personType" placeholder="教职工类别" @change="doSearch" code="USER_PERSON_TYPE"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select
|
||||
v-model="pageForm.preparedBy"
|
||||
placeholder="编制类别"
|
||||
@change="doSearch"
|
||||
code="USER_PREPARED_BY_TYPE"
|
||||
></dict-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -120,8 +120,8 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "sex", label: "性别" },
|
||||
{ prop: "mobile", label: "联系电话" },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user