Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
practical_train
Commits
28afb558
Commit
28afb558
authored
Nov 20, 2026
by
wujipeng
Browse files
优化项
parent
2af67ae4
Changes
1
Hide whitespace changes
Inline
Side-by-side
practical-business/src/main/java/com/platform/business/service/impl/ClassAdminServiceImpl.java
View file @
28afb558
...
...
@@ -795,7 +795,7 @@ public class ClassAdminServiceImpl implements ClassAdminService {
private
void
enrichStudent
(
ClassAdminStudentVO
student
,
String
classStatus
)
{
List
<
String
>
personTypes
=
parsePersonTypes
(
student
);
student
.
setPersonTypes
(
personTypes
);
student
.
setPersonTypeName
(
personTypes
.
isEmpty
()
?
null
:
String
.
join
(
"、"
,
personTypes
));
student
.
setPersonTypeName
(
resolveLegacyPersonTypeName
(
student
));
String
accountStatus
=
trimToNull
(
student
.
getAccountStatus
());
if
(
accountStatus
!=
null
)
{
...
...
@@ -873,6 +873,26 @@ public class ClassAdminServiceImpl implements ClassAdminService {
return
new
ArrayList
<>(
values
);
}
/**
* 按历史人员类别字段的勾选位置生成名单展示值。
*
* <p>{@code user_type1}和{@code user_type2}中保存的是“√”等勾选标记,
* 而不是需要直接展示的文本。因此只判断字段是否有值:类别1有值展示“1”,
* 类别2有值展示“2”。正常导入数据两者互斥;若历史异常数据同时勾选,
* 则完整展示为“1、2”,避免隐藏已保存的数据。两个字段都为空时返回{@code null},
* 前端表格单元格因此保持空白。</p>
*/
private
String
resolveLegacyPersonTypeName
(
ClassAdminStudentVO
student
)
{
List
<
String
>
selectedTypes
=
new
ArrayList
<>(
2
);
if
(
trimToNull
(
student
.
getLegacyPersonType1
())
!=
null
)
{
selectedTypes
.
add
(
"1"
);
}
if
(
trimToNull
(
student
.
getLegacyPersonType2
())
!=
null
)
{
selectedTypes
.
add
(
"2"
);
}
return
selectedTypes
.
isEmpty
()
?
null
:
String
.
join
(
"、"
,
selectedTypes
);
}
private
List
<
String
>
normalizePersonTypes
(
List
<
String
>
values
)
{
if
(
values
==
null
||
values
.
isEmpty
())
{
return
Collections
.
emptyList
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment