|
@@ -101,12 +101,13 @@ public class ScoreYmService extends ArtService {
|
|
FrameThreadHelper.updateThread(thread, 1, "初试成绩", FrameThreadStatus.Running);
|
|
FrameThreadHelper.updateThread(thread, 1, "初试成绩", FrameThreadStatus.Running);
|
|
int row = 2;
|
|
int row = 2;
|
|
int total = 0;
|
|
int total = 0;
|
|
- List<Map<String, Object>> enrolList = this.daoEnrol.listMapBySql("select s.std_id,s.cert_id,e.aspect_ticket_num,e.aspect_name,e.aspect_id from std_enrol e,std_reg s where e.std_id=s.std_id");
|
|
|
|
- Map<String, Map<String, Object>> enrolMap = new HashMap<String, Map<String, Object>>();
|
|
|
|
|
|
+ List<Map<String, Object>> enrolList = this.daoEnrol.listMapBySql(
|
|
|
|
+ "select s.std_id,s.cert_id,e.aspect_ticket_num,e.aspect_name,e.aspect_id from std_enrol e,std_reg s where e.std_id=s.std_id");
|
|
|
|
+ Map<String, Map<String, Object>> enrolMap = new HashMap<>();
|
|
for (Map<String, Object> map : enrolList) {
|
|
for (Map<String, Object> map : enrolList) {
|
|
enrolMap.put(map.get("cert_id").toString(), map);
|
|
enrolMap.put(map.get("cert_id").toString(), map);
|
|
}
|
|
}
|
|
- Map<String, List<ScScoreYm>> scoreListMap = new HashMap<String, List<ScScoreYm>>();
|
|
|
|
|
|
+ Map<String, List<ScScoreYm>> scoreListMap = new HashMap<>();
|
|
for (List<String> list : values) {
|
|
for (List<String> list : values) {
|
|
String no = list.get(0) == null ? null : list.get(0).trim();//序号
|
|
String no = 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();//身份证号
|
|
@@ -122,7 +123,7 @@ public class ScoreYmService extends ArtService {
|
|
String aspect_level = list.get(11) == null ? null : list.get(11).trim();//专业排名
|
|
String aspect_level = list.get(11) == null ? null : list.get(11).trim();//专业排名
|
|
String aspect_qualified = list.get(12) == null ? null : list.get(12).trim();//是否合格
|
|
String aspect_qualified = list.get(12) == null ? null : list.get(12).trim();//是否合格
|
|
String wei_gui = list.get(13) == null ? null : list.get(13).trim();//是否违规
|
|
String wei_gui = list.get(13) == null ? null : list.get(13).trim();//是否违规
|
|
- String pdf = list.get(14) == null ? null : list.get(14).trim();//是否违规
|
|
|
|
|
|
+ String pdf = list.get(14) == null ? null : list.get(14).trim();//违规证据
|
|
String remark = list.get(15) == null ? null : list.get(15).trim();//成绩备注
|
|
String remark = list.get(15) == null ? null : list.get(15).trim();//成绩备注
|
|
|
|
|
|
if (StringHelper.isEmpty(cert_id)) {
|
|
if (StringHelper.isEmpty(cert_id)) {
|
|
@@ -148,12 +149,10 @@ public class ScoreYmService extends ArtService {
|
|
if (stdMap == null) {
|
|
if (stdMap == null) {
|
|
uploadError(thread, "第【" + row + "】行,身份证号【" + cert_id + "】对应的报考数据不存在,请确认");
|
|
uploadError(thread, "第【" + row + "】行,身份证号【" + cert_id + "】对应的报考数据不存在,请确认");
|
|
}
|
|
}
|
|
- List<ScScoreYm> scoreList = scoreListMap.get(aspect_name);
|
|
|
|
- if (scoreList == null) {
|
|
|
|
- scoreList = new ArrayList<ScScoreYm>();
|
|
|
|
- scoreListMap.put(aspect_name, scoreList);
|
|
|
|
- }
|
|
|
|
- try {
|
|
|
|
|
|
+
|
|
|
|
+ List<ScScoreYm> scoreList = scoreListMap.computeIfAbsent(aspect_name, k -> new ArrayList<>());
|
|
|
|
+
|
|
|
|
+ try {
|
|
ScScoreYm score = new ScScoreYm();
|
|
ScScoreYm score = new ScScoreYm();
|
|
score.setBatch("first");
|
|
score.setBatch("first");
|
|
score.setStd_id(Integer.valueOf(stdMap.get("std_id").toString()));
|
|
score.setStd_id(Integer.valueOf(stdMap.get("std_id").toString()));
|
|
@@ -178,11 +177,12 @@ public class ScoreYmService extends ArtService {
|
|
uploadError(thread, "第【" + row + "】行,身份证号【" + cert_id + "】" + e.getMessage());
|
|
uploadError(thread, "第【" + row + "】行,身份证号【" + cert_id + "】" + e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // 专业名称
|
|
for (String key : scoreListMap.keySet()) {
|
|
for (String key : scoreListMap.keySet()) {
|
|
List<ScScoreYm> scoreList = scoreListMap.get(key);
|
|
List<ScScoreYm> scoreList = scoreListMap.get(key);
|
|
//Collections.sort(scoreList);
|
|
//Collections.sort(scoreList);
|
|
int level = 1;
|
|
int level = 1;
|
|
- for (int i=0; i<scoreList.size(); i++) {
|
|
|
|
|
|
+ for (int i = 0; i < scoreList.size(); i++) {
|
|
ScScoreYm ym = scoreList.get(i);
|
|
ScScoreYm ym = scoreList.get(i);
|
|
/*if (i == 0) {
|
|
/*if (i == 0) {
|
|
ym.setAspect_level(String.valueOf(level));
|
|
ym.setAspect_level(String.valueOf(level));
|
|
@@ -199,7 +199,7 @@ public class ScoreYmService extends ArtService {
|
|
}
|
|
}
|
|
}*/
|
|
}*/
|
|
row++;
|
|
row++;
|
|
- total ++;
|
|
|
|
|
|
+ total++;
|
|
this.daoEnrol.insert(ym);
|
|
this.daoEnrol.insert(ym);
|
|
if (total % 500 == 0) {
|
|
if (total % 500 == 0) {
|
|
FrameThreadHelper.updateThread(thread, total * 100 / values.size(),
|
|
FrameThreadHelper.updateThread(thread, total * 100 / values.size(),
|
|
@@ -207,6 +207,12 @@ public class ScoreYmService extends ArtService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 更新准考证号
|
|
|
|
+ String sql = "update sc_score_ym s ,std_enrol e set s.ticket_no=e.aspect_ticket_num where s.std_id=e.std_id "
|
|
|
|
+ + " and s.aspect_name=e.aspect_name and s.batch='first'";
|
|
|
|
+ this.daoEnrol.update(sql);
|
|
|
|
+
|
|
FrameThreadHelper.completeThread(thread, "导入成功:已处理【" + total + "】条初试成绩信息");
|
|
FrameThreadHelper.completeThread(thread, "导入成功:已处理【" + total + "】条初试成绩信息");
|
|
this.log(optr, ArtOptrLogType.StdScore_Import.toString(), values.size());
|
|
this.log(optr, ArtOptrLogType.StdScore_Import.toString(), values.size());
|
|
}
|
|
}
|