소스 검색

ledger_exam_score字段删除和调整、相关代码调整、一键导入功能导入模版调整调整

wangxx 2 주 전
부모
커밋
1c10d23968

+ 1 - 1
airport-admin/src/main/java/com/sundot/airport/web/controller/ledger/LedgerTemplateController.java

@@ -123,7 +123,7 @@ public class LedgerTemplateController extends BaseController {
123
         nm.put("examScore", "成绩收集");
123
         nm.put("examScore", "成绩收集");
124
         hm.put("examScore", 2);
124
         hm.put("examScore", 2);
125
         cm.put("examScore", new String[]{
125
         cm.put("examScore", new String[]{
126
-            "类别","期数","考试人员","理论成绩","图像成绩","班组","分类","备注(补考分数)","队室教员"
126
+            "类别","期数","考试人员","理论成绩","图像成绩"
127
         });
127
         });
128
 
128
 
129
         // 12. 小额奖励审批单(1行表头)
129
         // 12. 小额奖励审批单(1行表头)

+ 20 - 40
airport-ledger/src/main/java/com/sundot/airport/ledger/domain/LedgerExamScore.java

@@ -27,23 +27,21 @@ public class LedgerExamScore extends BaseEntity {
27
     @Excel(name = "部门名称")
27
     @Excel(name = "部门名称")
28
     private String deptName;
28
     private String deptName;
29
 
29
 
30
-    @Excel(name = "队室/班组")
30
+    private Long deptId;
31
+
31
     private String teamName;
32
     private String teamName;
32
 
33
 
33
-    @Excel(name = "小组")
34
+    private Long teamId;
35
+
34
     private String groupName;
36
     private String groupName;
35
 
37
 
36
-    @Excel(name = "用户名称")
38
+    private Long groupId;
39
+
40
+    @Excel(name = "考试人员")
37
     private String personName;
41
     private String personName;
38
 
42
 
39
     private Long personId;
43
     private Long personId;
40
 
44
 
41
-    private Long deptId;
42
-
43
-    private Long teamId;
44
-
45
-    private Long groupId;
46
-
47
     @Excel(name = "类别")
45
     @Excel(name = "类别")
48
     private String examCategory;
46
     private String examCategory;
49
 
47
 
@@ -56,15 +54,6 @@ public class LedgerExamScore extends BaseEntity {
56
     @Excel(name = "图像成绩")
54
     @Excel(name = "图像成绩")
57
     private BigDecimal imageScore;
55
     private BigDecimal imageScore;
58
 
56
 
59
-    @Excel(name = "分类")
60
-    private String classification;
61
-
62
-    @Excel(name = "队室教员")
63
-    private String teamInstructor;
64
-
65
-    @Excel(name = "备注")
66
-    private String remark;
67
-
68
     private String importBatch;
57
     private String importBatch;
69
 
58
 
70
     @Excel(name = "数据来源")
59
     @Excel(name = "数据来源")
@@ -82,15 +71,27 @@ public class LedgerExamScore extends BaseEntity {
82
     public String getDeptName() { return deptName; }
71
     public String getDeptName() { return deptName; }
83
     public void setDeptName(String deptName) { this.deptName = deptName; }
72
     public void setDeptName(String deptName) { this.deptName = deptName; }
84
 
73
 
74
+    public Long getDeptId() { return deptId; }
75
+    public void setDeptId(Long deptId) { this.deptId = deptId; }
76
+
85
     public String getTeamName() { return teamName; }
77
     public String getTeamName() { return teamName; }
86
     public void setTeamName(String teamName) { this.teamName = teamName; }
78
     public void setTeamName(String teamName) { this.teamName = teamName; }
87
 
79
 
80
+    public Long getTeamId() { return teamId; }
81
+    public void setTeamId(Long teamId) { this.teamId = teamId; }
82
+
88
     public String getGroupName() { return groupName; }
83
     public String getGroupName() { return groupName; }
89
     public void setGroupName(String groupName) { this.groupName = groupName; }
84
     public void setGroupName(String groupName) { this.groupName = groupName; }
90
 
85
 
86
+    public Long getGroupId() { return groupId; }
87
+    public void setGroupId(Long groupId) { this.groupId = groupId; }
88
+
91
     public String getPersonName() { return personName; }
89
     public String getPersonName() { return personName; }
92
     public void setPersonName(String personName) { this.personName = personName; }
90
     public void setPersonName(String personName) { this.personName = personName; }
93
 
91
 
92
+    public Long getPersonId() { return personId; }
93
+    public void setPersonId(Long personId) { this.personId = personId; }
94
+
94
     public String getExamCategory() { return examCategory; }
95
     public String getExamCategory() { return examCategory; }
95
     public void setExamCategory(String examCategory) { this.examCategory = examCategory; }
96
     public void setExamCategory(String examCategory) { this.examCategory = examCategory; }
96
 
97
 
@@ -103,27 +104,6 @@ public class LedgerExamScore extends BaseEntity {
103
     public BigDecimal getImageScore() { return imageScore; }
104
     public BigDecimal getImageScore() { return imageScore; }
104
     public void setImageScore(BigDecimal imageScore) { this.imageScore = imageScore; }
105
     public void setImageScore(BigDecimal imageScore) { this.imageScore = imageScore; }
105
 
106
 
106
-    public String getClassification() { return classification; }
107
-    public void setClassification(String classification) { this.classification = classification; }
108
-
109
-    public String getTeamInstructor() { return teamInstructor; }
110
-    public void setTeamInstructor(String teamInstructor) { this.teamInstructor = teamInstructor; }
111
-
112
-    public String getRemark() { return remark; }
113
-    public void setRemark(String remark) { this.remark = remark; }
114
-
115
-    public Long getPersonId() { return personId; }
116
-    public void setPersonId(Long personId) { this.personId = personId; }
117
-
118
-    public Long getDeptId() { return deptId; }
119
-    public void setDeptId(Long deptId) { this.deptId = deptId; }
120
-
121
-    public Long getTeamId() { return teamId; }
122
-    public void setTeamId(Long teamId) { this.teamId = teamId; }
123
-
124
-    public Long getGroupId() { return groupId; }
125
-    public void setGroupId(Long groupId) { this.groupId = groupId; }
126
-
127
     public String getImportBatch() { return importBatch; }
107
     public String getImportBatch() { return importBatch; }
128
     public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
108
     public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
129
 
109
 
@@ -132,4 +112,4 @@ public class LedgerExamScore extends BaseEntity {
132
 
112
 
133
     public String getSyncFlag() { return syncFlag; }
113
     public String getSyncFlag() { return syncFlag; }
134
     public void setSyncFlag(String syncFlag) { this.syncFlag = syncFlag; }
114
     public void setSyncFlag(String syncFlag) { this.syncFlag = syncFlag; }
135
-}
115
+}

+ 18 - 4
airport-ledger/src/main/java/com/sundot/airport/ledger/service/impl/LedgerCombinedImportServiceImpl.java

@@ -805,7 +805,7 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
805
     }
805
     }
806
 
806
 
807
     /** 11. 成绩收集 → ledger_exam_score
807
     /** 11. 成绩收集 → ledger_exam_score
808
-     * R2: 类别(0) 期数(1) 考试人员(2) 理论成绩(3) 图像成绩(4) 班组(5) 分类(6) 备注(7)
808
+     * R2: 类别(0) 期数(1) 考试人员(2) 理论成绩(3) 图像成绩(4)
809
      */
809
      */
810
     private int doExamScore(Sheet sheet, String batchNo, String username) {
810
     private int doExamScore(Sheet sheet, String batchNo, String username) {
811
         List<LedgerExamScore> list = new ArrayList<>();
811
         List<LedgerExamScore> list = new ArrayList<>();
@@ -813,11 +813,25 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
813
             LedgerExamScore o = new LedgerExamScore();
813
             LedgerExamScore o = new LedgerExamScore();
814
             o.setExamCategory(str(c, 0));
814
             o.setExamCategory(str(c, 0));
815
             o.setExamPeriod(str(c, 1));
815
             o.setExamPeriod(str(c, 1));
816
-            o.setPersonName(str(c, 2));
816
+            String personName = str(c, 2);
817
+            o.setPersonName(personName);
817
             o.setTheoryScore(decimal(c, 3));
818
             o.setTheoryScore(decimal(c, 3));
818
             o.setImageScore(decimal(c, 4));
819
             o.setImageScore(decimal(c, 4));
819
-            o.setTeamName(str(c, 5));
820
-            o.setRemark(str(c, 7));
820
+
821
+            // 根据姓名查找组织信息
822
+            if (personName != null && !personName.trim().isEmpty()) {
823
+                Map<String, Object> orgInfo = resolveOrgInfoByNameWithCache(personName);
824
+                if (!orgInfo.isEmpty()) {
825
+                    o.setPersonId((Long) orgInfo.get("userId"));
826
+                    o.setDeptId((Long) orgInfo.get("deptId"));
827
+                    o.setDeptName((String) orgInfo.get("deptName"));
828
+                    o.setTeamId((Long) orgInfo.get("teamId"));
829
+                    o.setTeamName((String) orgInfo.get("teamName"));
830
+                    o.setGroupId((Long) orgInfo.get("groupId"));
831
+                    o.setGroupName((String) orgInfo.get("groupName"));
832
+                }
833
+            }
834
+
821
             o.setImportBatch(batchNo);
835
             o.setImportBatch(batchNo);
822
             o.setSourceType("1");
836
             o.setSourceType("1");
823
             o.setCreateBy(username);
837
             o.setCreateBy(username);

+ 9 - 10
airport-ledger/src/main/resources/mapper/ledger/LedgerExamScoreMapper.xml

@@ -6,20 +6,17 @@
6
         <id property="id" column="id" />
6
         <id property="id" column="id" />
7
         <result property="examDate" column="exam_date" />
7
         <result property="examDate" column="exam_date" />
8
         <result property="deptName" column="dept_name" />
8
         <result property="deptName" column="dept_name" />
9
+        <result property="deptId" column="dept_id" />
9
         <result property="teamName" column="team_name" />
10
         <result property="teamName" column="team_name" />
11
+        <result property="teamId" column="team_id" />
10
         <result property="groupName" column="group_name" />
12
         <result property="groupName" column="group_name" />
13
+        <result property="groupId" column="group_id" />
11
         <result property="personName" column="person_name" />
14
         <result property="personName" column="person_name" />
12
         <result property="personId" column="person_id" />
15
         <result property="personId" column="person_id" />
13
-        <result property="deptId" column="dept_id" />
14
-        <result property="teamId" column="team_id" />
15
-        <result property="groupId" column="group_id" />
16
         <result property="examCategory" column="exam_category" />
16
         <result property="examCategory" column="exam_category" />
17
         <result property="examPeriod" column="exam_period" />
17
         <result property="examPeriod" column="exam_period" />
18
         <result property="theoryScore" column="theory_score" />
18
         <result property="theoryScore" column="theory_score" />
19
         <result property="imageScore"  column="image_score"  />
19
         <result property="imageScore"  column="image_score"  />
20
-        <result property="classification" column="classification" />
21
-        <result property="teamInstructor" column="team_instructor" />
22
-        <result property="remark" column="remark" />
23
         <result property="importBatch" column="import_batch" />
20
         <result property="importBatch" column="import_batch" />
24
         <result property="sourceType" column="source_type" />
21
         <result property="sourceType" column="source_type" />
25
         <result property="syncFlag" column="sync_flag" />
22
         <result property="syncFlag" column="sync_flag" />
@@ -30,7 +27,9 @@
30
     </resultMap>
27
     </resultMap>
31
 
28
 
32
     <sql id="selectVo">
29
     <sql id="selectVo">
33
-        SELECT id, exam_date, dept_name, team_name, group_name, person_name, person_id, dept_id, team_id, group_id, exam_category, exam_period, theory_score, image_score, classification, team_instructor, remark, import_batch, source_type, sync_flag, create_by, create_time, update_by, update_time
30
+        SELECT id, exam_date, dept_name, dept_id, team_name, team_id, group_name, group_id,
31
+               person_name, person_id, exam_category, exam_period, theory_score, image_score,
32
+               import_batch, source_type, sync_flag, create_by, create_time, update_by, update_time
34
         FROM ledger_exam_score
33
         FROM ledger_exam_score
35
         WHERE del_flag = '0'
34
         WHERE del_flag = '0'
36
     </sql>
35
     </sql>
@@ -41,10 +40,10 @@
41
         <if test="teamName != null and teamName != ''">AND team_name LIKE CONCAT('%', #{teamName}, '%')</if>
40
         <if test="teamName != null and teamName != ''">AND team_name LIKE CONCAT('%', #{teamName}, '%')</if>
42
         <if test="syncFlag != null and syncFlag != ''">AND sync_flag = #{syncFlag}</if>
41
         <if test="syncFlag != null and syncFlag != ''">AND sync_flag = #{syncFlag}</if>
43
         <if test="params != null and params.beginTime != null and params.beginTime != ''">
42
         <if test="params != null and params.beginTime != null and params.beginTime != ''">
44
-            AND (record_date &gt;= #{params.beginTime} OR approve_date &gt;= #{params.beginTime} OR exam_date &gt;= #{params.beginTime})
43
+            AND record_date &gt;= #{params.beginTime}
45
         </if>
44
         </if>
46
         <if test="params != null and params.endTime != null and params.endTime != ''">
45
         <if test="params != null and params.endTime != null and params.endTime != ''">
47
-            AND (record_date &lt;= #{params.endTime} OR approve_date &lt;= #{params.endTime} OR exam_date &lt;= #{params.endTime})
46
+            AND record_date &lt;= #{params.endTime}
48
         </if>
47
         </if>
49
         ORDER BY id DESC
48
         ORDER BY id DESC
50
     </select>
49
     </select>
@@ -54,4 +53,4 @@
54
         set sync_flag = '1'
53
         set sync_flag = '1'
55
         where sync_flag = '0'
54
         where sync_flag = '0'
56
     </update>
55
     </update>
57
-</mapper>
56
+</mapper>