|
|
@@ -777,19 +777,39 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
777
|
777
|
}
|
|
778
|
778
|
|
|
779
|
779
|
/** 11. 成绩收集 → ledger_exam_score
|
|
780
|
|
- * R2: 类别(0) 期数(1) 考试人员(2) 理论成绩(3) 图像成绩(4) 班组(5) 分类(6) 备注(7)
|
|
|
780
|
+ * R2: 类别(0) 期数(1) 考试人员(2) 理论成绩(3) 图像成绩(4) 班组(5) 分类(6) 备注(7) 队室教员(8)
|
|
781
|
781
|
*/
|
|
782
|
782
|
private int doExamScore(Sheet sheet, String batchNo, String username) {
|
|
783
|
783
|
List<LedgerExamScore> list = new ArrayList<>();
|
|
784
|
784
|
for (Object[] c : dataRows(sheet, 2)) {
|
|
785
|
785
|
LedgerExamScore o = new LedgerExamScore();
|
|
786
|
|
- o.setExamCategory(str(c, 0));
|
|
787
|
|
- o.setExamPeriod(str(c, 1));
|
|
788
|
|
- o.setPersonName(str(c, 2));
|
|
789
|
|
- o.setTheoryScore(decimal(c, 3));
|
|
790
|
|
- o.setImageScore(decimal(c, 4));
|
|
791
|
|
- o.setTeamName(str(c, 5));
|
|
792
|
|
- o.setRemark(str(c, 7));
|
|
|
786
|
+
|
|
|
787
|
+ // 按导入顺序映射字段
|
|
|
788
|
+ o.setExamCategory(str(c, 0)); // 类别
|
|
|
789
|
+ o.setExamPeriod(str(c, 1)); // 期数
|
|
|
790
|
+ String personName = str(c, 2); // 考试人员
|
|
|
791
|
+ o.setPersonName(personName);
|
|
|
792
|
+ o.setTheoryScore(decimal(c, 3)); // 理论成绩
|
|
|
793
|
+ o.setImageScore(decimal(c, 4)); // 图像成绩
|
|
|
794
|
+ o.setTeamName(str(c, 5)); // 班组
|
|
|
795
|
+ o.setClassification(str(c, 6)); // 分类
|
|
|
796
|
+ o.setRemark(str(c, 7)); // 备注(补考分数)
|
|
|
797
|
+ o.setTeamInstructor(str(c, 8)); // 队室教员
|
|
|
798
|
+
|
|
|
799
|
+ // 根据考试人员名称查找组织信息和ID
|
|
|
800
|
+ if (personName != null && !personName.trim().isEmpty()) {
|
|
|
801
|
+ Map<String, Object> orgInfo = resolveOrgInfoByNameWithCache(personName);
|
|
|
802
|
+ if (!orgInfo.isEmpty()) {
|
|
|
803
|
+ o.setPersonId((Long) orgInfo.get("userId"));
|
|
|
804
|
+ o.setDeptId((Long) orgInfo.get("deptId"));
|
|
|
805
|
+ o.setDeptName((String) orgInfo.get("deptName"));
|
|
|
806
|
+ o.setTeamId((Long) orgInfo.get("teamId"));
|
|
|
807
|
+ o.setTeamName((String) orgInfo.get("teamName"));
|
|
|
808
|
+ o.setGroupId((Long) orgInfo.get("groupId"));
|
|
|
809
|
+ o.setGroupName((String) orgInfo.get("groupName"));
|
|
|
810
|
+ }
|
|
|
811
|
+ }
|
|
|
812
|
+
|
|
793
|
813
|
o.setImportBatch(batchNo);
|
|
794
|
814
|
o.setSourceType("1");
|
|
795
|
815
|
o.setCreateBy(username);
|