|
@@ -45,6 +45,7 @@ public class ScScoreYmViolationService extends ArtService {
|
|
|
|
|
|
public void upload(List<List<String>> values, FrameOptr optr) {
|
|
public void upload(List<List<String>> values, FrameOptr optr) {
|
|
int row = 2;
|
|
int row = 2;
|
|
|
|
+ int total = 0;
|
|
for (List<String> list : values) {
|
|
for (List<String> list : values) {
|
|
String std_name = list.get(0) == null ? null : list.get(0).trim();
|
|
String std_name = list.get(0) == null ? null : list.get(0).trim();
|
|
String cert_id = list.get(1) == null ? null : list.get(1).trim();
|
|
String cert_id = list.get(1) == null ? null : list.get(1).trim();
|
|
@@ -129,19 +130,33 @@ public class ScScoreYmViolationService extends ArtService {
|
|
if (StringHelper.isEmpty(exam_subject)) {
|
|
if (StringHelper.isEmpty(exam_subject)) {
|
|
throw new BusinessException("第【" + row + "】行,考生考试科目不能为空");
|
|
throw new BusinessException("第【" + row + "】行,考生考试科目不能为空");
|
|
}
|
|
}
|
|
|
|
+ if(exam_subject.length() > 200) {
|
|
|
|
+ throw new BusinessException("第【" + row + "】行,考生考试科目过长");
|
|
|
|
+ }
|
|
|
|
|
|
if (StringHelper.isEmpty(violation_remark)) {
|
|
if (StringHelper.isEmpty(violation_remark)) {
|
|
throw new BusinessException("第【" + row + "】行,考生违规行为不能为空");
|
|
throw new BusinessException("第【" + row + "】行,考生违规行为不能为空");
|
|
}
|
|
}
|
|
|
|
+ if(violation_remark.length() > 200) {
|
|
|
|
+ throw new BusinessException("第【" + row + "】行,考生违规行为过长");
|
|
|
|
+ }
|
|
|
|
|
|
if (StringHelper.isEmpty(country_rule)) {
|
|
if (StringHelper.isEmpty(country_rule)) {
|
|
throw new BusinessException("第【" + row + "】行,国家处理办法不能为空");
|
|
throw new BusinessException("第【" + row + "】行,国家处理办法不能为空");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if(country_rule.length() > 200) {
|
|
|
|
+ throw new BusinessException("第【" + row + "】行,国家处理办法过长");
|
|
|
|
+ }
|
|
|
|
+
|
|
if (StringHelper.isEmpty(school_rule)) {
|
|
if (StringHelper.isEmpty(school_rule)) {
|
|
throw new BusinessException("第【" + row + "】行,学校处理办法不能为空");
|
|
throw new BusinessException("第【" + row + "】行,学校处理办法不能为空");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if(school_rule.length() > 200) {
|
|
|
|
+ throw new BusinessException("第【" + row + "】行,学校处理办法过长");
|
|
|
|
+ }
|
|
|
|
+
|
|
//判断是否已经存在
|
|
//判断是否已经存在
|
|
ScScoreYmViolation existViolation = scScoreYmViolationDao.findByCertAndAspect(cert_id, aspect_name);
|
|
ScScoreYmViolation existViolation = scScoreYmViolationDao.findByCertAndAspect(cert_id, aspect_name);
|
|
if (existViolation != null) {
|
|
if (existViolation != null) {
|
|
@@ -168,9 +183,10 @@ public class ScScoreYmViolationService extends ArtService {
|
|
scScoreYmViolationDao.insert(violation);
|
|
scScoreYmViolationDao.insert(violation);
|
|
}
|
|
}
|
|
row++;
|
|
row++;
|
|
|
|
+ total++;
|
|
}
|
|
}
|
|
|
|
|
|
- this.log(optr, ArtOptrLogType.VIOLATION_IMPORT.toString());
|
|
|
|
|
|
+ this.log(optr, ArtOptrLogType.VIOLATION_IMPORT.toString(), total);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|