commit
This commit is contained in:
@@ -13,17 +13,32 @@ public class ClubRegistAuditState {
|
||||
public static final Integer NOT_SUBMIT = 800;
|
||||
|
||||
/**
|
||||
* 待宣体办公室审核
|
||||
* 待二级单位党委书记审核
|
||||
*/
|
||||
public static final Integer UNIT_PART_READY = 801;
|
||||
|
||||
/**
|
||||
* 二级单位党委书记退回修改
|
||||
*/
|
||||
public static final Integer UNIT_PART_BACK_MODIFY = 802;
|
||||
|
||||
/**
|
||||
* 二级单位党委书记审核拒绝
|
||||
*/
|
||||
public static final Integer UNIT_PART_REJECTED = 803;
|
||||
|
||||
/**
|
||||
* 待校办公室主管审核
|
||||
*/
|
||||
public static final Integer XT_READY = 810;
|
||||
|
||||
/**
|
||||
* 宣体办公室退回修改
|
||||
* 校办公室主管退回修改
|
||||
*/
|
||||
public static final Integer XT_BACK_MODIFY = 820;
|
||||
|
||||
/**
|
||||
* 宣体办公室审核拒绝
|
||||
* 校办公室主管审核拒绝
|
||||
*/
|
||||
public static final Integer XT_REJECTED = 830;
|
||||
|
||||
|
||||
+15
-7
@@ -7,6 +7,7 @@ import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.controllers.platform.sys.handler.ClubEvaluateToDoHandler;
|
||||
import io.v.nutz.sys.controllers.platform.sys.handler.ClubExamineToDoHandler;
|
||||
import io.v.nutz.sys.models.Sys_club;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.models.sys_club_examine_register;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
@@ -69,7 +70,8 @@ public class ClubExamineRegisterHzAuditController {
|
||||
u.username,
|
||||
sc.concatPersonMobile,
|
||||
st.stateName,
|
||||
st.stateColor
|
||||
st.stateColor,
|
||||
sc.sponsorType
|
||||
FROM
|
||||
`sys_club_examine_register` scer
|
||||
LEFT JOIN sys_club sc ON sc.id = scer.clubId
|
||||
@@ -93,10 +95,10 @@ public class ClubExamineRegisterHzAuditController {
|
||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
baseService.dao().insert(audit);
|
||||
sys_club_examine_register examineRegister = baseService.dao().fetch(sys_club_examine_register.class, id);
|
||||
Sys_club sysClub = baseService.dao().fetch(Sys_club.class, examineRegister.getClubId());
|
||||
int auditId;
|
||||
//审核通过1.完成任务,2.给校工会发任务
|
||||
//审核拒绝1.完成任务,2.给申请人发任务
|
||||
ClubExamineToDoHandler.COMPLETE_CLUB_TASK.exec(examineRegister);
|
||||
if (flag == 1) {
|
||||
auditId = 5095;
|
||||
ClubExamineToDoHandler.CREATE_APPLY_TASK.exec(examineRegister);
|
||||
@@ -104,10 +106,18 @@ public class ClubExamineRegisterHzAuditController {
|
||||
auditId = 5093;
|
||||
ClubExamineToDoHandler.CREATE_APPLY_TASK.exec(examineRegister);
|
||||
} else {
|
||||
auditId = 6010;
|
||||
ClubExamineToDoHandler.CREATE_SCHOOL_TASK.exec(examineRegister);
|
||||
if(sysClub.getSponsorType() == 1) {
|
||||
auditId = 6007;
|
||||
ClubExamineToDoHandler.CREATE_UNIT_PART_TASK.exec(examineRegister);
|
||||
} else {
|
||||
auditId = 6010;
|
||||
ClubExamineToDoHandler.CREATE_SCHOOL_TASK.exec(examineRegister);
|
||||
}
|
||||
}
|
||||
baseService.dao().update(sys_club_examine_register.class, Chain.make("auditId", auditId).add("hzAuditId", audit.getId()), Cnd.where("id", "=", id));
|
||||
examineRegister.setHzAuditId(audit.getId());
|
||||
examineRegister.setAuditId(auditId);
|
||||
baseService.dao().update(examineRegister);
|
||||
ClubExamineToDoHandler.COMPLETE_CLUB_TASK.exec(examineRegister);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -115,9 +125,7 @@ public class ClubExamineRegisterHzAuditController {
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.club.examine.registerHzAudit")
|
||||
public Object doRecall(String id) {
|
||||
|
||||
baseService.dao().update(sys_club_examine_register.class, Chain.make("auditId", 5090).add("hzAuditId", null), Cnd.where("id", "=", id));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
package io.v.nutz.sys.controllers.platform.sys.club.examine;
|
||||
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.sys.controllers.platform.sys.handler.ClubExamineToDoHandler;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.models.sys_club_examine_register;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
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.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/sys/club/examine/register/unitPartAudit")
|
||||
@Ok("json:full")
|
||||
public class ClubExamineRegisterUnitPartAuditController {
|
||||
|
||||
@Inject
|
||||
private BaseService baseService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/sys/club/examine/registerUnitPartAudit.html")
|
||||
@RequiresPermissions("sys.club.examine.unitPartAudit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.club.examine.unitPartAudit")
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "clubId", required = false) String clubId,
|
||||
@Param(value = "flag", required = false) boolean flag) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
scer.*,
|
||||
u.username,
|
||||
sc.concatPersonMobile,
|
||||
st.stateName,
|
||||
st.stateColor
|
||||
FROM
|
||||
`sys_club_examine_register` scer
|
||||
LEFT JOIN sys_club sc ON sc.id = scer.clubId
|
||||
LEFT JOIN `user` u ON u.id = sc.concatPerson
|
||||
LEFT JOIN `user` u1 ON u1.id = sc.userid
|
||||
LEFT JOIN audit_state st ON st.stateId = scer.auditId
|
||||
$condition
|
||||
""");
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06", "xxhgly"})) {
|
||||
cnd.and("u1.unitId", "=", ShiroUtil.getUnitId());
|
||||
}
|
||||
cnd.andEX("YEAR(scer.registerDate)", "=", year);
|
||||
cnd.andEX("scer.clubId", "=", clubId);
|
||||
cnd.and("scer.auditId", flag ? ">" : "=", 6007);
|
||||
sql.setCondition(cnd);
|
||||
return baseService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@RequiresPermissions("sys.club.examine.unitPartAudit")
|
||||
public Object doReview(String id, Integer flag, Audit audit) {
|
||||
audit.setAuditor(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
audit.setLoginname(ShiroUtil.getPrincipalProperty("loginname").toString());
|
||||
baseService.dao().insert(audit);
|
||||
sys_club_examine_register examineRegister = baseService.dao().fetch(sys_club_examine_register.class, id);
|
||||
int auditId;
|
||||
//审核通过1.完成任务,2.给校工会发任务
|
||||
//审核拒绝1.完成任务,2.给申请人发任务
|
||||
|
||||
if (flag == 1) {
|
||||
auditId = 6009;
|
||||
ClubExamineToDoHandler.CREATE_APPLY_TASK.exec(examineRegister);
|
||||
} else if (flag == 2) {
|
||||
auditId = 6008;
|
||||
ClubExamineToDoHandler.CREATE_APPLY_TASK.exec(examineRegister);
|
||||
} else {
|
||||
auditId = 6010;
|
||||
ClubExamineToDoHandler.CREATE_SCHOOL_TASK.exec(examineRegister);
|
||||
}
|
||||
examineRegister.setAuditId(auditId);
|
||||
examineRegister.setUnitPartAuditId(audit.getId());
|
||||
baseService.dao().update(examineRegister);
|
||||
ClubExamineToDoHandler.COMPLETE_UNIT_PART_TASK.exec(examineRegister);
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.club.examine.unitPartAudit")
|
||||
public Object doRecall(String id) {
|
||||
baseService.dao().update(sys_club_examine_register.class, Chain.make("auditId", 6007).add("unitPartAuditId", null), Cnd.where("id", "=", id));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+3
@@ -133,6 +133,9 @@ public class ClubMyApplyController {
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
dao.execute(sql);
|
||||
NutMap result = (NutMap) sql.getResult();
|
||||
if (Strings.isNotBlank(result.getString("unitPartAuditId"))) {
|
||||
result.put("unitPartAudit", dao.fetch(Audit.class, result.getString("unitPartAuditId")));
|
||||
}
|
||||
if (Strings.isNotBlank(result.getString("xghAuditId"))) {
|
||||
result.put("xghAudit", dao.fetch(Audit.class, result.getString("xghAuditId")));
|
||||
}
|
||||
|
||||
+7
-5
@@ -58,7 +58,7 @@ public class ClubRegistApplyController {
|
||||
@RequiresPermissions("sys.club.clubRegist.clubRegistApply")
|
||||
public Object getClubCode() {
|
||||
String maxNum = (String) dao.func2(Sys_club.class, "max", "code", Cnd.where("year(create_time)", "=", DateUtil.getYear()));
|
||||
if(StrUtil.isNotBlank(maxNum)) {
|
||||
if(StrUtil.isBlank(maxNum)) {
|
||||
maxNum = DateUtil.getYear() + "000";
|
||||
}
|
||||
return Integer.parseInt(maxNum) + 1;
|
||||
@@ -77,7 +77,11 @@ public class ClubRegistApplyController {
|
||||
club.setFoundTime(DateUtil.getDateTime());
|
||||
club.setState(isSave ? ClubRegistAuditState.NOT_SUBMIT : ClubRegistAuditState.SCHOOL_PASS);
|
||||
} else {
|
||||
club.setState(isSave ? ClubRegistAuditState.NOT_SUBMIT : ClubRegistAuditState.XLD_READY);
|
||||
if(isSave) {
|
||||
club.setState(ClubRegistAuditState.NOT_SUBMIT);
|
||||
} else {
|
||||
club.setState(club.getSponsorType() == 1 ? ClubRegistAuditState.UNIT_PART_READY : ClubRegistAuditState.XT_READY);
|
||||
}
|
||||
}
|
||||
club.setUserid(ShiroUtil.getPlatformUid());
|
||||
club.setCreate_time(DateUtil.getDateTime());
|
||||
@@ -143,14 +147,12 @@ public class ClubRegistApplyController {
|
||||
@Param(value = "::managePerson", required = false) List<NutMap> managePerson) throws IOException {
|
||||
|
||||
if (!isSave && !ShiroUtil.hasAnyRoles("sysadmin, A06, xxhgly")) {
|
||||
club.setState(ClubRegistAuditState.XT_READY);
|
||||
club.setState(club.getSponsorType() == 1 ? ClubRegistAuditState.UNIT_PART_READY : ClubRegistAuditState.XT_READY);
|
||||
club.setXtAuditId("");
|
||||
club.setXldAuditId("");
|
||||
}
|
||||
if (!isSave && ShiroUtil.hasAnyRoles("sysadmin, A06, xxhgly")) {
|
||||
club.setState(ClubRegistAuditState.SCHOOL_PASS);
|
||||
club.setXtAuditId("");
|
||||
club.setXldAuditId("");
|
||||
}
|
||||
sysClubService.update(club);
|
||||
dao.clear(Sys_club_sponsor.class, Cnd.where("clubId", "=", club.getId()));
|
||||
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
package io.v.nutz.sys.controllers.platform.sys.club.regist;
|
||||
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.constant.club.ClubRegistAuditState;
|
||||
import io.v.nutz.sys.models.Sys_club;
|
||||
import io.v.nutz.sys.services.SysClubService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
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;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author JyuHsin
|
||||
* @Date 2022/4/14
|
||||
* @Description 二级单位审核
|
||||
*/
|
||||
@IocBean
|
||||
@At("/platform/sys/club/unitPartAudit")
|
||||
@Ok("json")
|
||||
public class ClubUnitPartAuditController {
|
||||
|
||||
@Inject
|
||||
private SysClubService sysClubService;
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/sys/club/regist/unitPartAudit.html")
|
||||
@RequiresPermissions("sys.club.clubRegist.unitPartAudit")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.club.clubRegist.unitPartAudit")
|
||||
public Object pageData(PageForm pageForm,
|
||||
@Param(value = "name", required = false) String name,
|
||||
@Param(value = "year", required = false) Integer year,
|
||||
@Param(value = "isAudit", required = false) Boolean isAudit) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06", "xxhgly"})) {
|
||||
cnd.and("u.unitId", "=", ShiroUtil.getUnitId());
|
||||
}
|
||||
if (isAudit == null) {
|
||||
cnd.and("c.state", ">=", ClubRegistAuditState.UNIT_PART_READY);
|
||||
} else if (isAudit) {
|
||||
cnd.and("c.state", ">", ClubRegistAuditState.UNIT_PART_READY);
|
||||
} else {
|
||||
cnd.and("c.state", "=", ClubRegistAuditState.UNIT_PART_READY);
|
||||
}
|
||||
Pagination pagination = sysClubService.pageData(cnd, pageForm, year, name);
|
||||
return pagination;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.club.clubRegist.unitPartAudit")
|
||||
public Object doReview(Audit audit, String clubId, Integer pass) {
|
||||
audit.setAuditor(ShiroUtil.getPlatformUid());
|
||||
audit.setLoginname(ShiroUtil.getPlatformLoginname());
|
||||
audit.setUsername(ShiroUtil.getPlatformUsername());
|
||||
audit.setAuditTime(new Date());
|
||||
audit = dao.insert(audit);
|
||||
Sys_club club = dao.fetch(Sys_club.class, clubId);
|
||||
|
||||
if (pass == 1) {
|
||||
club.setState(ClubRegistAuditState.UNIT_PART_REJECTED);
|
||||
} else if (pass == 2) {
|
||||
club.setState(ClubRegistAuditState.UNIT_PART_BACK_MODIFY);
|
||||
} else {
|
||||
club.setState(ClubRegistAuditState.XT_READY);
|
||||
}
|
||||
club.setUnitPartAuditId(audit.getId());
|
||||
dao.updateIgnoreNull(club);
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.club.clubRegist.unitPartAudit")
|
||||
public Object rollback(String id) {
|
||||
dao.update(Sys_club.class, Chain.make("state", ClubRegistAuditState.UNIT_PART_READY), Cnd.where("id", "=", id));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -79,7 +79,7 @@ public class ClubXTAuditController {
|
||||
} else if (pass == 2) {
|
||||
club.setState(ClubRegistAuditState.XT_BACK_MODIFY);
|
||||
} else {
|
||||
club.setState(ClubRegistAuditState.XLD_READY);
|
||||
club.setState(ClubRegistAuditState.XGH_READY);
|
||||
}
|
||||
club.setXtAuditId(audit.getId());
|
||||
dao.updateIgnoreNull(club);
|
||||
|
||||
+51
@@ -130,6 +130,57 @@ public enum ClubExamineToDoHandler {
|
||||
);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 给二级单位发任务
|
||||
*/
|
||||
CREATE_UNIT_PART_TASK() {
|
||||
@Override
|
||||
public void exec(sys_club_examine_register examineRegister) {
|
||||
//查询二级单位党委书记
|
||||
Sql sqlStr = Sqls.create("""
|
||||
SELECT
|
||||
u.loginname
|
||||
FROM
|
||||
sys_user_role sur
|
||||
LEFT JOIN `user` u ON u.id = sur.userid
|
||||
$condition
|
||||
GROUP BY
|
||||
sur.userId
|
||||
""");
|
||||
sqlStr.setCondition(Cnd.NEW().and("sur.roleId", "=", Roles.GH03));
|
||||
Sql sql = Sqls.queryString(sqlStr.toString());
|
||||
dao.execute(sql);
|
||||
List<String> loginNames = sql.getList(String.class);
|
||||
localProcessService.createTask(
|
||||
"sys_club_examine_register@" + examineRegister.getId(),
|
||||
"unitPartAuditId",
|
||||
"二级单位审核",
|
||||
ShiroUtil.getUserId(),
|
||||
loginNames,
|
||||
"/platform/sys/club/examine/register/xghAudit",
|
||||
"/platform/sys/club/examine/register/xghAudit",
|
||||
"",
|
||||
""
|
||||
);
|
||||
localProcessService.updateProcessNodeName("sys_club_examine_register@" + examineRegister.getId(), "二级单位审核");
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 二级单位任务完成
|
||||
*/
|
||||
COMPLETE_UNIT_PART_TASK() {
|
||||
@Override
|
||||
public void exec(sys_club_examine_register examineRegister) {
|
||||
Audit audit = dao.fetch(Audit.class, examineRegister.getUnitPartAuditId());
|
||||
localProcessService.completeTask(
|
||||
"unitPartAuditId",
|
||||
"sys_club_examine_register@" + examineRegister.getId(),
|
||||
ShiroUtil.getUserId(),
|
||||
audit.getAuditOpinion()
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 给校工会发任务
|
||||
*/
|
||||
|
||||
@@ -129,6 +129,11 @@ public class Sys_club {
|
||||
@Many(field = "clubId")
|
||||
private List<Sys_club_sponsor> sponsors;
|
||||
|
||||
@Column
|
||||
@Comment("二级单位党委书记审核记录id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitPartAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("宣体办公室审核记录id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@@ -163,4 +168,9 @@ public class Sys_club {
|
||||
@Comment("修改章程状态(1.待校工会审核 2.校工会审核拒绝 3.审核通过)")
|
||||
@ColDefine(type = ColType.INT, width = 10)
|
||||
private Integer ruleState;
|
||||
|
||||
@Column
|
||||
@Comment("发起类型(1.基层单位申请,2.协会发起人申请)")
|
||||
@ColDefine(type = ColType.INT, width = 10)
|
||||
private Integer sponsorType;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ public class sys_club_examine_register {
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<NutMap> incomeCensus;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("审核状态")
|
||||
@ColDefine(type = ColType.INT)
|
||||
@@ -94,6 +93,11 @@ public class sys_club_examine_register {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String hzAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("二级单位审核意见id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unitPartAuditId;
|
||||
|
||||
@Column
|
||||
@Comment("校工会审核意见id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
|
||||
@@ -50,12 +50,15 @@ public class ClubExamineRegisterServiceImpl extends ViServiceImpl implements Clu
|
||||
Audit hzAudit = dao().fetch(Audit.class, register.getHzAuditId());
|
||||
map.addv("hzAudit", hzAudit);
|
||||
}
|
||||
if (StrUtil.isNotBlank(register.getUnitPartAuditId())) {
|
||||
Audit unitPartAudit = dao().fetch(Audit.class, register.getUnitPartAuditId());
|
||||
map.addv("unitPartAudit", unitPartAudit);
|
||||
}
|
||||
if (StrUtil.isNotBlank(register.getXghAuditId())) {
|
||||
Audit xghAudit = dao().fetch(Audit.class, register.getXghAuditId());
|
||||
map.addv("xghAudit", xghAudit);
|
||||
}
|
||||
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,14 +11,11 @@ import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.base.service.ViService;
|
||||
import io.v.nutz.base.utils.ViResource;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
import io.v.nutz.sys.models.Sys_unit;
|
||||
import io.v.nutz.sys.models.*;
|
||||
import io.v.nutz.sys.services.*;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.activity.models.ActivityBasicUnit;
|
||||
import io.v.nutz.zhgh.jdh.model.zzjg.Jdh_dbt;
|
||||
import io.v.nutz.sys.models.SysUnionGroup;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.zhgh.jdh.model.zzjg.Jdh_dbt_zcdw;
|
||||
import io.v.nutz.zhgh.workersCongress.model.workersCongressSession;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -429,6 +426,7 @@ public class ViCommonCon {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
club.sponsorType,
|
||||
club.id as stid,
|
||||
role.userId,
|
||||
club.`name`,
|
||||
@@ -441,8 +439,13 @@ public class ViCommonCon {
|
||||
$condition
|
||||
""");
|
||||
if (!ShiroUtil.hasRole("sysadmin")) {
|
||||
cnd.and("role.roleId", "in", Lang.array(Roles.club01, Roles.club02, Roles.club03, Roles.club04));
|
||||
cnd.and("role.userId", "=", ShiroUtil.getUserId());
|
||||
if(ShiroUtil.hasRole("gh03")) {
|
||||
List<Sys_user> sysUsers = dao.query(Sys_user.class, Cnd.where("unitId", "=", ShiroUtil.getUnitId()));
|
||||
cnd.and("club.userId", "in", sysUsers.stream().map(Sys_user::getId).collect(Collectors.toList()));
|
||||
} else {
|
||||
cnd.and("role.roleId", "in", Lang.array(Roles.club01, Roles.club02, Roles.club03, Roles.club04));
|
||||
cnd.and("role.userId", "=", ShiroUtil.getUserId());
|
||||
}
|
||||
}
|
||||
cnd.and("club.isjs", "=", false);
|
||||
cnd.and("club.state", "=", 930);
|
||||
|
||||
Reference in New Issue
Block a user