人员
This commit is contained in:
+24
-10
@@ -29,6 +29,7 @@ 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;
|
||||
@@ -58,6 +59,11 @@ public class MemberApplyBranchUnionAuditController {
|
||||
@RequiresPermissions("member.apply.branchUnion.audit")
|
||||
public void index() {}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/mobile/member/apply/branchUnionAudit/index.html")
|
||||
@RequiresPermissions("member.apply.branchUnion.audit")
|
||||
public void h5() {}
|
||||
|
||||
|
||||
@At
|
||||
@RequiresPermissions("member.apply.branchUnion.audit")
|
||||
@@ -123,18 +129,26 @@ public class MemberApplyBranchUnionAuditController {
|
||||
} else if (audit.getAuditType() == 1) {
|
||||
MemberApplyToDoHandler.COMPLETE_PROCESS.exec(record, null);
|
||||
// 判断是否改变了工会关系
|
||||
|
||||
User user = dao.fetch(User.class, Cnd.where("id", "=", record.getUserId()));
|
||||
if (!ObjectUtil.equals(user.getUnionid(), record.getAllocationUnionId())) {
|
||||
Sys_union union = dao.fetch(Sys_union.class, Cnd.where("id", "=", record.getAllocationUnionId()));
|
||||
SpecialStaff staff = new SpecialStaff();
|
||||
staff.setUserId(record.getUserId());
|
||||
staff.setPersonnelRelationUnitId(user.getUnitid());
|
||||
staff.setPersonnelRelationUnitName(user.getUnitname());
|
||||
staff.setUnionRelationUnionId(union.getId());
|
||||
staff.setUnionRelationUnionName(union.getUnionname());
|
||||
staff.setIsManyUnit(false);
|
||||
staff.setSpecialStaffType("HMC_RELATION");
|
||||
dao.insert(staff);
|
||||
if (dao.count(SpecialStaff.class, Cnd.where("userId", "=", record.getUserId())) > 0) {
|
||||
dao.clear(SpecialStaff.class, Cnd.where("userId", "=", record.getUserId()));
|
||||
user = dao.fetch(User.class, Cnd.where("id", "=", record.getUserId()));
|
||||
}
|
||||
|
||||
if (!ObjectUtil.equals(user.getUnionid(), record.getAllocationUnionId())) {
|
||||
Sys_union union = dao.fetch(Sys_union.class, Cnd.where("id", "=", record.getAllocationUnionId()));
|
||||
SpecialStaff staff = new SpecialStaff();
|
||||
staff.setUserId(record.getUserId());
|
||||
staff.setPersonnelRelationUnitId(user.getUnitid());
|
||||
staff.setPersonnelRelationUnitName(user.getUnitname());
|
||||
staff.setUnionRelationUnionId(union.getId());
|
||||
staff.setUnionRelationUnionName(union.getUnionname());
|
||||
staff.setIsManyUnit(false);
|
||||
staff.setSpecialStaffType("HMC_RELATION");
|
||||
dao.insert(staff);
|
||||
}
|
||||
}
|
||||
|
||||
Sys_user sysUser = new Sys_user();
|
||||
|
||||
+23
-7
@@ -18,6 +18,7 @@ import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@@ -50,7 +51,7 @@ public class MemberApplyController {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/member/apply/submit/index.html")
|
||||
@Ok("beetl:/mobile/member/apply/submit/index.html")
|
||||
@RequiresPermissions("member.apply.submit")
|
||||
public void h5() {
|
||||
}
|
||||
@@ -86,7 +87,9 @@ public class MemberApplyController {
|
||||
record.setChangeType(MemberChangeType.RESTORE.name());
|
||||
record.setChangeTypes(List.of(MemberChangeType.RESTORE.name()));
|
||||
// 待提交
|
||||
record.setApplyStateId(10);
|
||||
if (record.getApplyStateId() == null) {
|
||||
record.setApplyStateId(10);
|
||||
}
|
||||
dao.insertOrUpdate(record);
|
||||
return null;
|
||||
}
|
||||
@@ -103,6 +106,10 @@ public class MemberApplyController {
|
||||
record.setChangeOrigin(MemberChangeOrigin.PERSONAL.name());
|
||||
record.setChangeType(MemberChangeType.RESTORE.name());
|
||||
record.setChangeTypes(List.of(MemberChangeType.RESTORE.name()));
|
||||
|
||||
if (record.getApplyStateId() != null && List.of(30, 60).contains(record.getApplyStateId())) {
|
||||
MemberApplyToDoHandler.COMPLETE_APPLY_RE_MODIFY_TASK.exec(record, NutMap.NEW().addv("nodeName", "重新修改申请"));
|
||||
}
|
||||
// 待校工会审核
|
||||
record.setApplyStateId(20);
|
||||
dao.insertOrUpdate(record);
|
||||
@@ -111,11 +118,20 @@ public class MemberApplyController {
|
||||
MemberApplyToDoHandler.START_PROCESS.exec(record, null);
|
||||
MemberApplyToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
|
||||
|
||||
List<String> schoolLoginNameList = commonService.getSchoolOrBranchUnionMemberAdminLoginNames("school", null);
|
||||
String schoolLoginNameListStr = schoolLoginNameList.stream().distinct().collect(Collectors.joining(","));
|
||||
|
||||
String content = "%s老师正申请加入工会,请您点击此条消息或前往智慧工会进行审核";
|
||||
msgApi.sendMsg(List.of("DingTalk"), schoolLoginNameListStr, 2, "协会入会邀请", content, "", "");
|
||||
// 短信通知
|
||||
// List<String> schoolLoginNameList = commonService.getSchoolOrBranchUnionMemberAdminLoginNames("school", null);
|
||||
// String schoolLoginNameListStr = schoolLoginNameList.stream().distinct().collect(Collectors.joining(","));
|
||||
//
|
||||
// String content = "%s老师正申请加入工会,请您点击此条消息或前往智慧工会进行审核";
|
||||
// msgApi.sendMsg(List.of("DingTalk"), schoolLoginNameListStr, 2, "协会入会邀请", content, "", "");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object validateApply(){
|
||||
return dao.count(MemberApplyRecord.class, Cnd.where("userId", "=", ShiroUtil.getUserId()).and("applyStateId", "in", List.of(10, 20, 30, 50, 60)));
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -53,6 +53,11 @@ public class MemberApplyMineController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/mobile/member/apply/mine/index.html")
|
||||
@RequiresPermissions("member.apply.mine")
|
||||
public void h5() {
|
||||
}
|
||||
|
||||
@At
|
||||
@RequiresPermissions("member.apply.mine")
|
||||
|
||||
+13
-6
@@ -53,6 +53,10 @@ public class MemberApplySchoolUnionAuditController {
|
||||
@RequiresPermissions("member.apply.schoolUnion.audit")
|
||||
public void index() {}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/mobile/member/apply/schoolUnionAudit/index.html")
|
||||
@RequiresPermissions("member.apply.schoolUnion.audit")
|
||||
public void h5() {}
|
||||
|
||||
@At
|
||||
@RequiresPermissions("member.apply.schoolUnion.audit")
|
||||
@@ -112,7 +116,8 @@ public class MemberApplySchoolUnionAuditController {
|
||||
|
||||
if (audit.getAuditType() == 2) {
|
||||
MemberApplyToDoHandler.CREATE_APPLY_RE_MODIFY_TASK.exec(record, null);
|
||||
String content = "%s老师您好,您的入会申请被校工会退回,您可根据退回原因修改后再次提交,如有疑问请及时联系校工会".formatted(record.getUsername());
|
||||
// 短信通知
|
||||
// String content = "%s老师您好,您的入会申请被校工会退回,您可根据退回原因修改后再次提交,如有疑问请及时联系校工会".formatted(record.getUsername());
|
||||
} else if (audit.getAuditType() == 1) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -131,13 +136,15 @@ public class MemberApplySchoolUnionAuditController {
|
||||
List<String> unionLeaderLoginNames = list.stream().map(v -> v.getString("loginname")).toList();
|
||||
MemberApplyToDoHandler.CREATE_UNION_TASK.exec(record, NutMap.NEW().addv("unionLeaderLoginNames", unionLeaderLoginNames));
|
||||
|
||||
for (NutMap map : list) {
|
||||
String content = "%s老师您好,%s老师的入会申请校工会已通过,现将工会关系划入本工会,请您点击此消息或前往智慧工会进行接收"
|
||||
.formatted(map.getString("username"), record.getUsername());
|
||||
}
|
||||
// 短信通知
|
||||
// for (NutMap map : list) {
|
||||
// String content = "%s老师您好,%s老师的入会申请校工会已通过,现将工会关系划入本工会,请您点击此消息或前往智慧工会进行接收"
|
||||
// .formatted(map.getString("username"), record.getUsername());
|
||||
// }
|
||||
} else {
|
||||
MemberApplyToDoHandler.REFUSE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "校工会审核拒绝"));
|
||||
String content = "%s老师您好,您的入会申请被校工会拒绝,如有疑问请及时联系校工会".formatted(record.getUsername());
|
||||
// 短信通知
|
||||
// String content = "%s老师您好,您的入会申请被校工会拒绝,如有疑问请及时联系校工会".formatted(record.getUsername());
|
||||
}
|
||||
MemberApplyToDoHandler.COMPLETE_SCHOOL_TASK.exec(record, NutMap.NEW().addv("nodeName", "校工会审核完成"));
|
||||
return null;
|
||||
|
||||
+8
-11
@@ -1,19 +1,14 @@
|
||||
package io.v.nutz.zhgh.staffmanage.member.controller.change;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
import io.v.nutz.sys.models.Sys_unit;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.models.User;
|
||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.staffmanage.member.constant.MemberChangeOrigin;
|
||||
import io.v.nutz.zhgh.staffmanage.member.constant.MemberChangeType;
|
||||
import io.v.nutz.zhgh.staffmanage.member.handle.MemberChangeToDoHandler;
|
||||
import io.v.nutz.zhgh.staffmanage.member.model.MemberChangeRecord;
|
||||
import io.v.nutz.zhgh.staffmanage.member.service.MemberCommonService;
|
||||
@@ -22,18 +17,13 @@ import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
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.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@@ -85,7 +75,9 @@ public class MemberChangeApplyController {
|
||||
// 变更来源 个人
|
||||
record.setChangeOrigin(MemberChangeOrigin.PERSONAL.name());
|
||||
// 待提交
|
||||
record.setApplyStateId(10010);
|
||||
if (record.getApplyStateId() == null) {
|
||||
record.setApplyStateId(10010);
|
||||
}
|
||||
dao.insertOrUpdate(record);
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
@@ -115,6 +107,11 @@ public class MemberChangeApplyController {
|
||||
record.setUserId(ShiroUtil.getUserId());
|
||||
// 变更来源 个人
|
||||
record.setChangeOrigin(MemberChangeOrigin.PERSONAL.name());
|
||||
|
||||
|
||||
if (List.of(10030, 10060).contains(record.getApplyStateId())) {
|
||||
MemberChangeToDoHandler.COMPLETE_APPLY_RE_MODIFY_TASK.exec(record, NutMap.NEW().addv("nodeName", "重新修改申请"));
|
||||
}
|
||||
// 待分工会审核
|
||||
record.setApplyStateId(10020);
|
||||
dao.insertOrUpdate(record);
|
||||
|
||||
+42
-46
@@ -154,9 +154,9 @@ public class MemberChangeManageController {
|
||||
}
|
||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||
}
|
||||
|
||||
} else {
|
||||
cnd.andEX("u.unionid", "=", unionId);
|
||||
}
|
||||
cnd.andEX("u.unionid", "=", unionId);
|
||||
cnd.andEX("u.unitid", "=", unitId);
|
||||
cnd.andEX("u.threeUnitId", "=", threeUnitId);
|
||||
cnd.andEX("u.unionGroupId", "=", unionGroupId);
|
||||
@@ -275,6 +275,7 @@ public class MemberChangeManageController {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("member.change.mange")
|
||||
@SLog(tag = "会员高级管理-会员变更", msg = "分工会/校工会会员管理员提交变更")
|
||||
@@ -288,54 +289,49 @@ public class MemberChangeManageController {
|
||||
return Result.error("未校验到变更数据,请确认数据是否存在变更");
|
||||
}
|
||||
|
||||
try {
|
||||
// 变更就表明,当前审核人审核通过
|
||||
Audit audit = new Audit();
|
||||
audit.setAuditor(ShiroUtil.getUserId());
|
||||
audit.setLoginname(ShiroUtil.getPlatformLoginname());
|
||||
audit.setUsername(ShiroUtil.getPlatformUsername());
|
||||
audit.setAuditOpinion("通过");
|
||||
audit.setAuditTime(DateUtil.date());
|
||||
dao.insert(audit);
|
||||
// 变更就表明,当前审核人审核通过
|
||||
Audit audit = new Audit();
|
||||
audit.setAuditor(ShiroUtil.getUserId());
|
||||
audit.setLoginname(ShiroUtil.getPlatformLoginname());
|
||||
audit.setUsername(ShiroUtil.getPlatformUsername());
|
||||
audit.setAuditOpinion("通过");
|
||||
audit.setAuditTime(DateUtil.date());
|
||||
dao.insert(audit);
|
||||
|
||||
User user = dao.fetch(User.class, Cnd.where("id", "=", record.getUserId()));
|
||||
// 比较有哪些变更类型
|
||||
List<String> changeTypes = memberService.compareChangeType(record, user);
|
||||
record.setChangeTypes(changeTypes);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin, SchoolUnionMemberAdmin")) {
|
||||
// 分工会变更,分工会审核通过,转为校工会审核
|
||||
record.setChangeOrigin(MemberChangeOrigin.BRANCH_UNION.name());
|
||||
record.setApplyStateId(10050);
|
||||
record.setBranchUnionAuditId(audit.getId());
|
||||
dao.insert(record);
|
||||
User user = dao.fetch(User.class, Cnd.where("id", "=", record.getUserId()));
|
||||
// 比较有哪些变更类型
|
||||
List<String> changeTypes = memberService.compareChangeType(record, user);
|
||||
record.setChangeTypes(changeTypes);
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin, SchoolUnionMemberAdmin")) {
|
||||
// 分工会变更,分工会审核通过,转为校工会审核
|
||||
record.setChangeOrigin(MemberChangeOrigin.BRANCH_UNION.name());
|
||||
record.setApplyStateId(10050);
|
||||
record.setBranchUnionAuditId(audit.getId());
|
||||
dao.insert(record);
|
||||
|
||||
// 创建流程任务
|
||||
MemberChangeToDoHandler.START_PROCESS.exec(record, null);
|
||||
MemberChangeToDoHandler.CREATE_UNION_TASK.exec(record, null);
|
||||
MemberChangeToDoHandler.COMPLETE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "分工会审核完成"));
|
||||
MemberChangeToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
|
||||
} else {
|
||||
// 校工会变更,变更直接完成
|
||||
record.setChangeOrigin(MemberChangeOrigin.SCHOOL_UNION.name());
|
||||
record.setApplyStateId(10080);
|
||||
record.setBranchUnionAuditId(audit.getId());
|
||||
record.setSchoolUnionAuditId(audit.getId());
|
||||
dao.insert(record);
|
||||
// 创建流程任务
|
||||
MemberChangeToDoHandler.START_PROCESS.exec(record, null);
|
||||
MemberChangeToDoHandler.CREATE_UNION_TASK.exec(record, null);
|
||||
MemberChangeToDoHandler.COMPLETE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "分工会审核完成"));
|
||||
MemberChangeToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
|
||||
} else {
|
||||
// 校工会变更,变更直接完成
|
||||
record.setChangeOrigin(MemberChangeOrigin.SCHOOL_UNION.name());
|
||||
record.setApplyStateId(10080);
|
||||
record.setBranchUnionAuditId(audit.getId());
|
||||
record.setSchoolUnionAuditId(audit.getId());
|
||||
dao.insert(record);
|
||||
|
||||
// 创建流程任务
|
||||
MemberChangeToDoHandler.START_PROCESS.exec(record, null);
|
||||
MemberChangeToDoHandler.CREATE_UNION_TASK.exec(record, null);
|
||||
MemberChangeToDoHandler.COMPLETE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "分工会审核完成"));
|
||||
MemberChangeToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
|
||||
MemberChangeToDoHandler.COMPLETE_SCHOOL_TASK.exec(record, NutMap.NEW().addv("nodeName", "校工会审核完成"));
|
||||
MemberChangeToDoHandler.COMPLETE_PROCESS.exec(record, null);
|
||||
memberService.compareChangeInfoAndUpdateMember(record.getId());
|
||||
}
|
||||
return Result.success("操作成功");
|
||||
} catch (Exception e) {
|
||||
log.error("分工会/校工会会员管理员提交变更:", e);
|
||||
return Result.error("操作失败");
|
||||
// 创建流程任务
|
||||
MemberChangeToDoHandler.START_PROCESS.exec(record, null);
|
||||
MemberChangeToDoHandler.CREATE_UNION_TASK.exec(record, null);
|
||||
MemberChangeToDoHandler.COMPLETE_UNION_TASK.exec(record, NutMap.NEW().addv("nodeName", "分工会审核完成"));
|
||||
MemberChangeToDoHandler.CREATE_SCHOOL_TASK.exec(record, null);
|
||||
MemberChangeToDoHandler.COMPLETE_SCHOOL_TASK.exec(record, NutMap.NEW().addv("nodeName", "校工会审核完成"));
|
||||
MemberChangeToDoHandler.COMPLETE_PROCESS.exec(record, null);
|
||||
memberService.compareChangeInfoAndUpdateMember(record.getId());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -139,7 +139,7 @@ public class MemberDataBoardController {
|
||||
sys_dict dict
|
||||
LEFT JOIN sys_dict parent ON dict.parentId = parent.id
|
||||
WHERE
|
||||
parent.`code` = 'UserType'
|
||||
parent.`code` = 'PERSON_TYPE'
|
||||
ORDER BY
|
||||
dict.location
|
||||
""");
|
||||
@@ -164,7 +164,7 @@ public class MemberDataBoardController {
|
||||
sys_dict dict
|
||||
LEFT JOIN sys_dict parent ON dict.parentId = parent.id
|
||||
WHERE
|
||||
parent.`code` = 'UserState'
|
||||
parent.`code` = 'USER_STATE'
|
||||
ORDER BY
|
||||
dict.location
|
||||
""");
|
||||
|
||||
+14
-14
@@ -41,8 +41,8 @@ public enum MemberApplyToDoHandler {
|
||||
"MEMBER_APPLY@" + record.getId(),
|
||||
"",
|
||||
record.getUserId(),
|
||||
"/platform/member/apply",
|
||||
"/platform/member/apply/h5"
|
||||
"/platform/member/apply/mine",
|
||||
"/platform/member/apply/mine"
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -64,10 +64,10 @@ public enum MemberApplyToDoHandler {
|
||||
"退回重新修改",
|
||||
ShiroUtil.getUserId(),
|
||||
List.of(loginname),
|
||||
"/platform/member/apply",
|
||||
"/platform/member/apply",
|
||||
"/platform/member/apply",
|
||||
"/platform/member/apply"
|
||||
"/platform/member/apply/mine",
|
||||
"/platform/member/apply/mine",
|
||||
"/platform/member/apply/mine",
|
||||
"/platform/member/apply/mine"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("MEMBER_APPLY@" + record.getId(), "退回重新修改");
|
||||
@@ -107,10 +107,10 @@ public enum MemberApplyToDoHandler {
|
||||
"校工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
schoolLeaderLoginNames,
|
||||
"/platform/member/apply/audit/school",
|
||||
"/platform/member/apply/audit/school",
|
||||
"/platform/member/apply/audit/school",
|
||||
"/platform/member/apply/audit/school"
|
||||
"/platform/member/apply/schoolUnion/audit",
|
||||
"/platform/member/apply/schoolUnion/audit",
|
||||
"/platform/member/apply/schoolUnion/audit",
|
||||
"/platform/member/apply/schoolUnion/audit"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("MEMBER_APPLY@" + record.getId(), "校工会审核");
|
||||
@@ -149,10 +149,10 @@ public enum MemberApplyToDoHandler {
|
||||
"分工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
unionLeaderLoginNames,
|
||||
"/platform/member/apply/audit/union",
|
||||
"/platform/member/apply/audit/union",
|
||||
"/platform/member/apply/audit/union",
|
||||
"/platform/member/apply/audit/union"
|
||||
"/platform/member/apply/branchUnion/audit",
|
||||
"/platform/member/apply/branchUnion/audit",
|
||||
"/platform/member/apply/branchUnion/audit",
|
||||
"/platform/member/apply/branchUnion/audit"
|
||||
);
|
||||
localProcessService.updateProcessNodeName("MEMBER_APPLY@" + record.getId(), "分工会审核");
|
||||
}
|
||||
|
||||
+14
-14
@@ -34,8 +34,8 @@ public enum MemberChangeToDoHandler {
|
||||
"MEMBER_CHANGE@" + record.getId(),
|
||||
"",
|
||||
record.getUserId(),
|
||||
"/platform/member/change/apply",
|
||||
"/platform/member/change/apply"
|
||||
"/platform/member/change/mine",
|
||||
"/platform/member/change/mine"
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -67,10 +67,10 @@ public enum MemberChangeToDoHandler {
|
||||
nodeName,
|
||||
ShiroUtil.getUserId(),
|
||||
List.of(loginname),
|
||||
"/platform/member/change/apply",
|
||||
"/platform/member/change/apply",
|
||||
"/platform/member/change/apply",
|
||||
"/platform/member/change/apply"
|
||||
"/platform/member/change/mine",
|
||||
"/platform/member/change/mine",
|
||||
"/platform/member/change/mine",
|
||||
"/platform/member/change/mine"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("MEMBER_CHANGE@" + record.getId(), nodeName);
|
||||
@@ -108,10 +108,10 @@ public enum MemberChangeToDoHandler {
|
||||
"分工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
branchLeaders,
|
||||
"/platform/member/change/audit/union",
|
||||
"/platform/member/change/audit/union",
|
||||
"/platform/member/change/audit/union",
|
||||
"/platform/member/change/audit/union"
|
||||
"/platform/member/change/branchUnion/audit",
|
||||
"/platform/member/change/branchUnion/audit",
|
||||
"/platform/member/change/branchUnion/audit",
|
||||
"/platform/member/change/branchUnion/audit"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("MEMBER_CHANGE@" + record.getId(), "分工会审核");
|
||||
@@ -150,10 +150,10 @@ public enum MemberChangeToDoHandler {
|
||||
"校工会审核",
|
||||
ShiroUtil.getUserId(),
|
||||
schoolLeaders,
|
||||
"/platform/member/change/audit/school",
|
||||
"/platform/member/change/audit/school",
|
||||
"/platform/member/change/audit/school",
|
||||
"/platform/member/change/audit/school"
|
||||
"/platform/member/change/schoolUnion/audit",
|
||||
"/platform/member/change/schoolUnion/audit",
|
||||
"/platform/member/change/schoolUnion/audit",
|
||||
"/platform/member/change/schoolUnion/audit"
|
||||
);
|
||||
|
||||
localProcessService.updateProcessNodeName("MEMBER_CHANGE@" + record.getId(), "校工会审核");
|
||||
|
||||
@@ -163,6 +163,11 @@ public class MemberChangeRecord {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String campus;
|
||||
|
||||
@Column
|
||||
@Comment("退休日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date retireDate;
|
||||
|
||||
@Column
|
||||
@Comment("家庭主要成员及其工作单位")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
|
||||
+32
-15
@@ -251,11 +251,7 @@ public class MemberCommonServiceImpl extends ViServiceImpl<Sys_user> implements
|
||||
history.setChangeTime(DateUtil.date());
|
||||
history.setChangeTypes(record.getChangeTypes());
|
||||
history.setChangeOrigin(record.getChangeOrigin());
|
||||
history.setChangeInfos(changeList);
|
||||
String changeInfos = changeList.stream().map(v -> {
|
||||
return "(变更字段:" + v.getString("fieldName") + ",变更前:" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + ",变更后:" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + ")";
|
||||
}).collect(Collectors.joining(";"));
|
||||
history.setChangeInfosStr(changeInfos);
|
||||
|
||||
|
||||
// 加入会员
|
||||
if (record.getMember()) {
|
||||
@@ -314,18 +310,39 @@ public class MemberCommonServiceImpl extends ViServiceImpl<Sys_user> implements
|
||||
|
||||
// 如果工会发生变更了,就是工会关系变更,记录到特殊人员表中
|
||||
if (record.getChangeTypes().contains(MemberChangeType.UNION_CHANGE.getType())) {
|
||||
Sys_union union = dao().fetch(Sys_union.class, Cnd.where("id", "=", record.getUnionId()));
|
||||
SpecialStaff staff = new SpecialStaff();
|
||||
staff.setUserId(userId);
|
||||
staff.setPersonnelRelationUnitId(user.getUnitid());
|
||||
staff.setPersonnelRelationUnitName(user.getUnitname());
|
||||
staff.setUnionRelationUnionId(union.getId());
|
||||
staff.setUnionRelationUnionName(union.getUnionname());
|
||||
staff.setIsManyUnit(false);
|
||||
staff.setSpecialStaffType("HMC_RELATION");
|
||||
dao().insert(staff);
|
||||
if (dao().count(SpecialStaff.class, Cnd.where("userId", "=", record.getUserId())) > 0) {
|
||||
dao().clear(SpecialStaff.class, Cnd.where("userId", "=", record.getUserId()));
|
||||
user = dao().fetch(User.class, Cnd.where("id", "=", record.getUserId()));
|
||||
}
|
||||
|
||||
if (!ObjectUtil.equals(user.getUnionid(), record.getUnionId())) {
|
||||
Sys_union union = dao().fetch(Sys_union.class, Cnd.where("id", "=", record.getUnionId()));
|
||||
// 记录工会关系变更的数据
|
||||
NutMap map = NutMap.NEW();
|
||||
map.put("field", "unionId");
|
||||
map.put("fieldName", "工会");
|
||||
map.put("sourceValue", record.getUnionName());
|
||||
map.put("newValue", union.getUnionname());
|
||||
changeList.add(map);
|
||||
|
||||
SpecialStaff staff = new SpecialStaff();
|
||||
staff.setUserId(userId);
|
||||
staff.setPersonnelRelationUnitId(user.getUnitid());
|
||||
staff.setPersonnelRelationUnitName(user.getUnitname());
|
||||
staff.setUnionRelationUnionId(union.getId());
|
||||
staff.setUnionRelationUnionName(union.getUnionname());
|
||||
staff.setIsManyUnit(false);
|
||||
staff.setSpecialStaffType("HMC_RELATION");
|
||||
dao().insert(staff);
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有工会关系变更,也需要记录变更了什么工会
|
||||
history.setChangeInfos(changeList);
|
||||
String changeInfos = changeList.stream().map(v -> {
|
||||
return v.getString("fieldName") + ":" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + ";";
|
||||
}).collect(Collectors.joining(";"));
|
||||
history.setChangeInfosStr(changeInfos);
|
||||
dao().updateIgnoreNull(info);
|
||||
dao().insert(history);
|
||||
|
||||
|
||||
+1
@@ -79,6 +79,7 @@ public class SourceChangeManageController {
|
||||
scmt.changeTypes,
|
||||
scmt.changeOrigin,
|
||||
scmt.isOperate,
|
||||
scmt.changeInfosStr,
|
||||
u.id AS userId
|
||||
FROM
|
||||
source_change_middle_table scmt
|
||||
|
||||
+39
-19
@@ -60,6 +60,8 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void doSourceChange(SourceChangeMiddleTable middleTable) {
|
||||
User user = dao().fetch(User.class, Cnd.where("loginname", "=", middleTable.getLoginname()));
|
||||
// 当前工会,用于记录记录是工会关系异动的上一个工会
|
||||
String unionname = user.getUnionname();
|
||||
|
||||
//获取可变更字段
|
||||
NutMap map = commonService.getDictAllowChangeFields();
|
||||
@@ -104,11 +106,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
||||
if (Lang.isNotEmpty(history)) {
|
||||
history.setChangeTime(DateUtil.date());
|
||||
history.setChangeOrigin(MemberChangeOrigin.HAND_MOVEMENT.name());
|
||||
history.setChangeInfos(changeList);
|
||||
String changeInfos = changeList.stream().map(v -> {
|
||||
return "(变更字段:" + v.getString("fieldName") + ",变更前:" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + ",变更后:" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + ")";
|
||||
}).collect(Collectors.joining(";"));
|
||||
history.setChangeInfosStr(changeInfos);
|
||||
|
||||
|
||||
// 加入会员
|
||||
if (middleTable.getMember() == 1) {
|
||||
@@ -116,7 +114,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
||||
int memberCount = dao().count(Sys_user_role.class, Cnd.where("userId", "=", userId).and("roleId", "=", Roles.MEMBER));
|
||||
if (activityCount <= 0) {
|
||||
// 取消或加入会员组别
|
||||
if (middleTable.getIsJoinActivityMemberScope()) {
|
||||
if (middleTable.getIsJoinActivityMemberScope() != null && middleTable.getIsJoinActivityMemberScope()) {
|
||||
ActivityUserScope scope = new ActivityUserScope();
|
||||
scope.setUserId(userId);
|
||||
scope.setGroupId(1);
|
||||
@@ -133,7 +131,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
||||
// 杭医特有,其他学校请删除
|
||||
middleTable.setPreparedBy("会员");
|
||||
} else {
|
||||
if (middleTable.getIsExitActivityMemberScope()) {
|
||||
if (middleTable.getIsExitActivityMemberScope() != null && middleTable.getIsExitActivityMemberScope()) {
|
||||
dao().clear(ActivityUserScope.class, Cnd.where("userId", "=", userId).and("groupId", "=", 1));
|
||||
}
|
||||
dao().clear(Sys_user_role.class, Cnd.where("userId", "=", userId).and("roleId", "=", Roles.MEMBER));
|
||||
@@ -142,7 +140,7 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
||||
}
|
||||
|
||||
// 加入福利会员 是否加入福利项目
|
||||
if (middleTable.getWelfareMember() == 1 && middleTable.getIsJoinWelfareProject()) {
|
||||
if (middleTable.getWelfareMember() == 1 && middleTable.getIsJoinWelfareProject() != null && middleTable.getIsJoinWelfareProject()) {
|
||||
WelfareList welfareList = new WelfareList();
|
||||
welfareList.setId(R.UU32());
|
||||
welfareList.setProjectId(middleTable.getWelfareProjectId());
|
||||
@@ -168,20 +166,42 @@ public class SourceChangeManageServiceImpl extends BaseServiceImpl<SourceChangeM
|
||||
|
||||
// 如果工会发生变更了,就是工会关系变更,记录到特殊人员表中
|
||||
if (!ObjectUtil.equals(user.getUnionid(), middleTable.getUnionid())) {
|
||||
changeTypes.add(MemberChangeType.UNION_CHANGE.getType());
|
||||
Sys_union union = dao().fetch(Sys_union.class, Cnd.where("id", "=", middleTable.getUnionid()));
|
||||
SpecialStaff staff = new SpecialStaff();
|
||||
staff.setUserId(userId);
|
||||
staff.setPersonnelRelationUnitId(user.getUnitid());
|
||||
staff.setPersonnelRelationUnitName(user.getUnitname());
|
||||
staff.setUnionRelationUnionId(union.getId());
|
||||
staff.setUnionRelationUnionName(union.getUnionname());
|
||||
staff.setIsManyUnit(false);
|
||||
staff.setSpecialStaffType("HMC_RELATION");
|
||||
dao().insert(staff);
|
||||
if (dao().count(SpecialStaff.class, Cnd.where("userId", "=", userId)) > 0) {
|
||||
dao().clear(SpecialStaff.class, Cnd.where("userId", "=", userId));
|
||||
user = dao().fetch(User.class, Cnd.where("id", "=", userId));
|
||||
}
|
||||
|
||||
if (!ObjectUtil.equals(user.getUnionid(), middleTable.getUnionid())) {
|
||||
changeTypes.add(MemberChangeType.UNION_CHANGE.getType());
|
||||
Sys_union union = dao().fetch(Sys_union.class, Cnd.where("id", "=", middleTable.getUnionid()));
|
||||
|
||||
// 记录工会关系变更的数据
|
||||
NutMap changeMap = NutMap.NEW();
|
||||
changeMap.put("field", "unionId");
|
||||
changeMap.put("fieldName", "工会");
|
||||
changeMap.put("sourceValue", unionname);
|
||||
changeMap.put("newValue", union.getUnionname());
|
||||
changeList.add(changeMap);
|
||||
|
||||
SpecialStaff staff = new SpecialStaff();
|
||||
staff.setUserId(userId);
|
||||
staff.setPersonnelRelationUnitId(user.getUnitid());
|
||||
staff.setPersonnelRelationUnitName(user.getUnitname());
|
||||
staff.setUnionRelationUnionId(union.getId());
|
||||
staff.setUnionRelationUnionName(union.getUnionname());
|
||||
staff.setIsManyUnit(false);
|
||||
staff.setSpecialStaffType("HMC_RELATION");
|
||||
dao().insert(staff);
|
||||
}
|
||||
}
|
||||
|
||||
dao().updateIgnoreNull(info);
|
||||
|
||||
history.setChangeInfos(changeList);
|
||||
String changeInfos = changeList.stream().map(v -> {
|
||||
return v.getString("fieldName") + ":" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue")) + ";";
|
||||
}).collect(Collectors.joining(";"));
|
||||
history.setChangeInfosStr(changeInfos);
|
||||
history.setChangeTypes(changeTypes);
|
||||
dao().insert(history);
|
||||
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ public class SpecialStaffManageController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.where("id", "not in", "(select userId from special_staff)");
|
||||
cnd.and("id", "not in", "(select userId from special_staff)");
|
||||
if (StrUtil.isNotBlank(keyWord)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("username", keyWord);
|
||||
|
||||
Reference in New Issue
Block a user