This commit is contained in:
=
2025-12-24 17:54:17 +08:00
parent 8ac6baf211
commit 8bb3130481
3 changed files with 24 additions and 3 deletions
@@ -123,7 +123,7 @@ public class TeacherCongressDelegateServiceImpl extends BaseServiceImpl<Teacher_
delegationSql.setParam("sessionId", pageForm.getSessionId());
List<NutMap> delegationList = listMap(delegationSql);
//查询所有的团长、副团长
//查询所有的团长
Sys_role tzRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_DELEGATION_HEAD);
Sql tzSql = Sqls.create("""
SELECT
@@ -142,6 +142,25 @@ public class TeacherCongressDelegateServiceImpl extends BaseServiceImpl<Teacher_
tzSql.setParam("tzRoles", List.of(tzRole.getId()));
List<NutMap> tzList = listMap(tzSql);
//查询所有的副团长
Sys_role ftzRole = sysRoleService.getByCode(RoleConstant.TEACHER_CONGRESS_VICE_DELEGATION_HEAD);
Sql ftzSql = Sqls.create("""
SELECT
t2.id,
t2.username,
t2.sex,
t1.tcDelegationId
FROM
sys_user_role t1
LEFT JOIN sys_user t2 ON t2.id = t1.userId
WHERE
t1.tcSessionId = @sessionId
AND t1.roleId IN (@ftzRoles)
""");
ftzSql.setParam("sessionId", pageForm.getSessionId());
ftzSql.setParam("ftzRoles", List.of(ftzRole.getId()));
List<NutMap> ftzList = listMap(ftzSql);
//查询代表
Sql delegateSql = Sqls.create("""
SELECT
@@ -161,6 +180,7 @@ public class TeacherCongressDelegateServiceImpl extends BaseServiceImpl<Teacher_
for (NutMap delegation : delegationList) {
delegation.put("tz", tzList.stream().filter(tz -> tz.getString("tcDelegationId").equals(delegation.getString("id"))).toList());
delegation.put("ftz", ftzList.stream().filter(ftz -> ftz.getString("tcDelegationId").equals(delegation.getString("id"))).toList());
//过滤本代表团的代表
List<NutMap> delegateList = delegateAllList.stream().filter(delegate -> delegate.getString("delegationId").equals(delegation.getString("id"))).toList();
//按5人平均分组
@@ -238,7 +238,7 @@ layout("/layouts/platform.html"){
} else {
tf_helpunitreply = 'NO_HELP_UNIT'
}
const loading = createLoading('提交中')
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
@@ -412,7 +412,7 @@ layout("/layouts/platform_h5.html"){
} else if (this.viewData.userNumberLimit === 2) {
//分工会人数限制
const union = this.viewData.unionUserNumberLimit.find(v => v.id === this.$store.state.user.union.id)
this.viewData.unionTeamNum = union.limitNum
this.viewData.unionLimitNum = union.limitNum
}
if (this.viewData.signUpMethod === 3) {
this.listTeamUserUnion()
@@ -768,6 +768,7 @@ layout("/layouts/platform_h5.html"){
},
created() {
this.init()
}
})
</script>