|
@@ -605,7 +605,7 @@
|
|
|
h.name semesterName,
|
|
|
case #{source} when 'REVIEW' then ifnull(c.paper_type, a.paper_type) else a.paper_type end paperType,
|
|
|
case #{source} when 'REVIEW' then ifnull(c.paper_attachment_ids, a.paper_attachment_ids) else a.paper_attachment_ids end paperAttachmentIds,
|
|
|
- case #{source} when 'REVIEW' then ifnull(c.card_id, a.card_id) else a.card_id end cardId,
|
|
|
+ case #{source} when 'REVIEW' then ifnull(c.card_id, b.card_id) else b.card_id end cardId,
|
|
|
a.paper_confirm_attachment_ids paperConfirmAttachmentIds,
|
|
|
a.remark,
|
|
|
a.exposed_paper_type exposedPaperType,
|
|
@@ -622,7 +622,8 @@
|
|
|
LEFT JOIN
|
|
|
exam_task_paper_log c ON a.exam_task_id = c.exam_task_id and c.review = false
|
|
|
LEFT JOIN
|
|
|
- exam_card b ON a.card_id = b.id
|
|
|
+ exam_card b ON FIND_IN_SET(b.id, REPLACE(substring_index(substring_index(CONVERT((a.paper_attachment_ids ->>'$[*].cardId')
|
|
|
+ USING utf8), ']', 1), '[',-1),'"',''))
|
|
|
left join
|
|
|
exam_card d on c.card_id = d.id
|
|
|
left join
|
|
@@ -709,14 +710,16 @@
|
|
|
LEFT JOIN
|
|
|
exam_task_detail b ON a.id = b.exam_task_id
|
|
|
WHERE
|
|
|
- b.card_id = #{cardId}
|
|
|
+ FIND_IN_SET(#{cardId}, REPLACE(substring_index(substring_index(CONVERT((b.paper_attachment_ids ->>'$[*].cardId')
|
|
|
+ USING utf8), ']', 1), '[',-1),'"',''))
|
|
|
</select>
|
|
|
<select id="listReviewSampleInfoByExamTaskId"
|
|
|
resultType="com.qmth.distributed.print.business.bean.dto.ReviewSampleDto">
|
|
|
SELECT
|
|
|
IFNULL(log.paper_attachment_ids,
|
|
|
det.paper_attachment_ids) AS paperAttachmentIds,
|
|
|
- IFNULL(log.card_id, det.card_id) AS cardId,
|
|
|
+ IFNULL(log.card_id, REPLACE(substring_index(substring_index(CONVERT((det.paper_attachment_ids ->>'$[*].cardId')
|
|
|
+ USING utf8), ']', 1), '[',-1)) AS cardId,
|
|
|
det.paper_confirm_attachment_ids AS paperConfirmAttachmentIds
|
|
|
FROM
|
|
|
exam_task_detail det
|
|
@@ -1116,7 +1119,8 @@
|
|
|
IFNULL(b.exposed_paper_type,'') exposedPaperType,
|
|
|
IFNULL(b.unexposed_paper_type,'') unexposedPaperType,
|
|
|
so.name orgName,
|
|
|
- b.card_id examCardId,
|
|
|
+ REPLACE(substring_index(substring_index(CONVERT((b.paper_attachment_ids ->>'$[*].cardId')
|
|
|
+ USING utf8), ']', 1), '[',-1) examCardId,
|
|
|
b.paper_attachment_ids paperAttachmentIds
|
|
|
FROM
|
|
|
exam_task a
|