Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李丛阳
education
Commits
9a97ed2e
Commit
9a97ed2e
authored
May 15, 2018
by
李博今
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新教室导入的筛选,返回正确信息
parent
7fb73128
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
BRoomsServiceImpl.java
...isoft/business/brooms/service/impl/BRoomsServiceImpl.java
+17
-1
room.xls
src/main/resources/excel-template/room.xls
+0
-0
No files found.
src/main/java/org/rcisoft/business/brooms/service/impl/BRoomsServiceImpl.java
View file @
9a97ed2e
...
...
@@ -148,6 +148,17 @@ public class BRoomsServiceImpl implements BRoomsService {
result
+=
"编号 "
+
value
[
1
]
+
" 在表中重复 "
;
continue
;
}
//Int最大值为2147483648,所以不能超过9位数
if
(
value
[
5
].
length
()
>=
9
){
result
+=
"编号 "
+
value
[
1
]
+
" 的数据座位数不合法 "
;
continue
;
}
try
{
int
seat
=
Integer
.
valueOf
(
value
[
5
]);
}
catch
(
Exception
e
){
result
+=
"编号 "
+
value
[
1
]
+
" 的数据座位数不合法 "
;
continue
;
}
BRooms
bRooms
=
new
BRooms
();
String
classroomName
=
""
;
if
(
value
[
0
].
equals
(
"校本部"
)){
...
...
@@ -192,13 +203,18 @@ public class BRoomsServiceImpl implements BRoomsService {
currentlyCode
.
add
(
value
[
1
]);
list
.
add
(
bRooms
);
}
int
flag
=
1
;
if
(!
result
.
equals
(
""
)){
flag
=
0
;
}
if
(
list
.
size
()
!=
0
){
int
i
=
bRoomsRepository
.
addExcel
(
list
);
result
+=
"成功插入了 "
+
i
+
"条数据"
;
}
else
{
result
+=
"没有输入被插入"
;
}
return
new
PersistModel
(
1
,
result
);
return
new
PersistModel
(
flag
,
result
);
}
}
src/main/resources/excel-template/room.xls
View file @
9a97ed2e
No preview for this file type
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