|
@@ -116,22 +116,22 @@ public class ExamRoomServiceImpl extends ServiceImpl<ExamRoomDao, ExamRoomEntity
|
|
|
String name = trimAndNullIfBlank(line.get(EXCEL_HEADER[1]));
|
|
|
if (StringUtils.isBlank(name)) {
|
|
|
msg.append(" 考场名称不能为空");
|
|
|
- } else if (name.length() > 100) {
|
|
|
- msg.append(" 考场名称不能超过100个字符");
|
|
|
+ } else if (name.length() > 50) {
|
|
|
+ msg.append(" 考场名称不能超过50个字符");
|
|
|
} else {
|
|
|
room.setName(name);
|
|
|
}
|
|
|
String address = trimAndNullIfBlank(line.get(EXCEL_HEADER[2]));
|
|
|
if (StringUtils.isBlank(address)) {
|
|
|
msg.append(" 考场地址不能为空");
|
|
|
- } else if (address.length() > 200) {
|
|
|
- msg.append(" 考场地址不能超过200个字符");
|
|
|
+ } else if (address.length() > 100) {
|
|
|
+ msg.append(" 考场地址不能超过100个字符");
|
|
|
} else {
|
|
|
room.setAddress(address);
|
|
|
}
|
|
|
String capacity = trimAndNullIfBlank(line.get(EXCEL_HEADER[3]));
|
|
|
- if (StringUtils.isBlank(capacity) || !capacity.matches("\\d+") || Integer.parseInt(capacity) <= 0) {
|
|
|
- msg.append(" 考场容量必须为大于0的整数");
|
|
|
+ if (StringUtils.isBlank(capacity) || !capacity.matches("\\d+") || Integer.parseInt(capacity) <= 0 || Integer.parseInt(capacity) > 99999) {
|
|
|
+ msg.append(" 考场容量必须为大于0且小于100000的整数");
|
|
|
} else {
|
|
|
room.setCapacity(Integer.parseInt(capacity));
|
|
|
}
|