Browse Source

客观分分数保留2位小数

wangliang 2 years ago
parent
commit
702e6ff85e

+ 1 - 1
themis-business/src/main/resources/mapper/TEStudentMapper.xml

@@ -57,7 +57,7 @@
             tees.course_name as courseName,
             tees.`identity`,
             tees.name,
-            toer.objective_score as objectiveScore,
+            cast(toer.objective_score as DECIMAL(10,2)) as objectiveScore,
             toer.status,
             toer.first_start_time as firstStartTime,
             toer.finish_time as finishTime,

+ 2 - 2
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -1225,7 +1225,7 @@
     <select id="findExamRecordNeedMark" resultType="com.qmth.themis.business.bean.admin.OpenRecordNeedMarkBean">
         SELECT t.id              as id,
                t.paper_id        as paperId,
-               t.objective_score as objectiveScore,
+               cast(t.objective_score as DECIMAL(10,2)) as objectiveScore,
                t.finish_time     as finishTime
         FROM t_oe_exam_record t
         where t.exam_student_id = #{examStudentId}
@@ -1235,7 +1235,7 @@
 
     <select id="findMaxObjectiveScore" resultType="com.qmth.themis.business.entity.TOeExamRecord">
         select
-        max(toer.objective_score) as objectiveScore,
+        cast(max(toer.objective_score) as DECIMAL(10,2)) as objectiveScore,
         toer.id,toer.paper_id as paperId,toer.finish_time as finishTime,toer.first_start_time as firstStartTime
         from
         t_oe_exam_record toer