|
@@ -1328,7 +1328,7 @@
|
|
select t.*,
|
|
select t.*,
|
|
if(t.unGenerated = 0 and t.unPrinted = 0,'FINISH','UN_FINISH') as finishStatus from(select
|
|
if(t.unGenerated = 0 and t.unPrinted = 0,'FINISH','UN_FINISH') as finishStatus from(select
|
|
t.*,
|
|
t.*,
|
|
- ec.type as cardType,
|
|
|
|
|
|
+ GROUP_CONCAT(distinct ec.type) as cardType,
|
|
(<include refid="printStatusCount" />)) as totalExamination,
|
|
(<include refid="printStatusCount" />)) as totalExamination,
|
|
(<include refid="printStatusCount" /> and ed.status in ('READY', 'WAITING', 'PRINTING', 'FINISH'))) as generate,
|
|
(<include refid="printStatusCount" /> and ed.status in ('READY', 'WAITING', 'PRINTING', 'FINISH'))) as generate,
|
|
(<include refid="printStatusCount" /> and ed.status in ('NEW', 'CREATING'))) as unGenerated,
|
|
(<include refid="printStatusCount" /> and ed.status in ('NEW', 'CREATING'))) as unGenerated,
|
|
@@ -1345,7 +1345,7 @@
|
|
bc.name as courseName,
|
|
bc.name as courseName,
|
|
bc.code as courseCode,
|
|
bc.code as courseCode,
|
|
et.paper_number as paperNumber,
|
|
et.paper_number as paperNumber,
|
|
- replace(substring_index(substring_index(convert((etd.paper_attachment_ids ->>'$[*].cardId') using utf8), ']', 1), '[',-1), '"', '') as cardId,
|
|
|
|
|
|
+ concat(replace(substring_index(substring_index(convert((etd.paper_attachment_ids ->>'$[*].cardId') using utf8), ']', 1), '[',-1), '"', ''),', ') as cardId,
|
|
so.name as college
|
|
so.name as college
|
|
from exam_task et
|
|
from exam_task et
|
|
left join basic_course bc on bc.id = et.course_id
|
|
left join basic_course bc on bc.id = et.course_id
|
|
@@ -1394,13 +1394,18 @@
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</where>) t
|
|
</where>) t
|
|
- left join exam_card ec on ec.id = t.cardId
|
|
|
|
|
|
+ left join tmp_help_topic b on b.help_topic_id <![CDATA[ < ]]> (LENGTH(t.cardId) - LENGTH( REPLACE (t.cardId, ', ', '' ) ) + 1 )
|
|
|
|
+ left join exam_card ec on ec.id in (SUBSTRING_INDEX(SUBSTRING_INDEX(t.cardId, ', ', b.help_topic_id), ', ',-1))
|
|
<where>
|
|
<where>
|
|
<if test="cardType != null and cardType != ''">
|
|
<if test="cardType != null and cardType != ''">
|
|
AND ec.type = #{cardType}
|
|
AND ec.type = #{cardType}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
- ) t
|
|
|
|
|
|
+ group by t.id,
|
|
|
|
+ t.college,
|
|
|
|
+ t.courseName,
|
|
|
|
+ t.courseCode,
|
|
|
|
+ t.paperNumber) t
|
|
<where>
|
|
<where>
|
|
<if test="finishStatus != null and finishStatus != ''">
|
|
<if test="finishStatus != null and finishStatus != ''">
|
|
<choose>
|
|
<choose>
|
|
@@ -1437,7 +1442,7 @@
|
|
t.paperNumber,
|
|
t.paperNumber,
|
|
t.studentCount,
|
|
t.studentCount,
|
|
t.absentCount,
|
|
t.absentCount,
|
|
- ec.type as cardType,
|
|
|
|
|
|
+ GROUP_CONCAT(distinct ec.type) as cardType,
|
|
ROUND(sum(t.sheetCount) / 2, 2) as sheetCount,
|
|
ROUND(sum(t.sheetCount) / 2, 2) as sheetCount,
|
|
sum(case when t.isUpload = 1 then 1 else 0 end) as scanUploadCount
|
|
sum(case when t.isUpload = 1 then 1 else 0 end) as scanUploadCount
|
|
from
|
|
from
|
|
@@ -1453,7 +1458,7 @@
|
|
IFNULL(ms.sheet_count, 0) as sheetCount,
|
|
IFNULL(ms.sheet_count, 0) as sheetCount,
|
|
IFNULL(mp.absent_count, 0) as absentCount,
|
|
IFNULL(mp.absent_count, 0) as absentCount,
|
|
IFNULL(ms.is_upload, 0) as isUpload,
|
|
IFNULL(ms.is_upload, 0) as isUpload,
|
|
- replace(substring_index(substring_index(convert((etd.paper_attachment_ids ->>'$[*].cardId') using utf8), ']', 1), '[',-1), '"', '') as cardId
|
|
|
|
|
|
+ concat(replace(substring_index(substring_index(convert((etd.paper_attachment_ids ->>'$[*].cardId') using utf8), ']', 1), '[',-1), '"', ''),', ') as cardId
|
|
from mark_paper mp
|
|
from mark_paper mp
|
|
left join basic_exam be on be.id = mp.exam_id and be.enable = true
|
|
left join basic_exam be on be.id = mp.exam_id and be.enable = true
|
|
left join basic_semester bs on bs.id = be.semester_id and bs.enable = true
|
|
left join basic_semester bs on bs.id = be.semester_id and bs.enable = true
|
|
@@ -1500,7 +1505,8 @@
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</where>) t
|
|
</where>) t
|
|
- left join exam_card ec on ec.id = t.cardId
|
|
|
|
|
|
+ left join tmp_help_topic b on b.help_topic_id <![CDATA[ < ]]> (LENGTH(t.cardId) - LENGTH( REPLACE (t.cardId, ', ', '' ) ) + 1 )
|
|
|
|
+ left join exam_card ec on ec.id in (SUBSTRING_INDEX(SUBSTRING_INDEX(t.cardId, ', ', b.help_topic_id), ', ',-1))
|
|
<where>
|
|
<where>
|
|
<if test="cardType != null and cardType != ''">
|
|
<if test="cardType != null and cardType != ''">
|
|
AND ec.type = #{cardType}
|
|
AND ec.type = #{cardType}
|