|
@@ -73,7 +73,7 @@ CREATE TABLE `temp_subject` (
|
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
|
检查是否有包含公式的题
|
|
|
-select q.id,q.question_type,q.topic,q.difficulty,q.answer
|
|
|
+select q.id,q.question_type,q.topic,q.answer,an.answer_text
|
|
|
from wq_question_bank_subject t left join wq_subject sub on t.subject_id=sub.id
|
|
|
left join wq_question_bank b on t.question_bank_id=b.id
|
|
|
left join wq_question_question_bank f on t.question_bank_id=f.question_bank_id
|
|
@@ -84,7 +84,16 @@ and sub.subject_code in (select yun_code from temp_subject)
|
|
|
and b.rent_id=811 and b.is_deleted=0 and q.is_deleted=0 and q.rent_id=811
|
|
|
and (q.topic like '%$$%' or q.answer like '%$$%' or an.answer_text like '%$$%');
|
|
|
|
|
|
-java代码更新属性树wq_knowledge_system新加的字段root_id
|
|
|
+处理公式的临时表
|
|
|
+CREATE TABLE `temp_gs` (
|
|
|
+ `id` bigint NOT NULL,
|
|
|
+ `content1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
|
|
|
+ `content2` text COLLATE utf8mb4_bin,
|
|
|
+ `content3` text COLLATE utf8mb4_bin,
|
|
|
+ `content4` text COLLATE utf8mb4_bin,
|
|
|
+ PRIMARY KEY (`id`)
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
|
+
|
|
|
update wq_question INNER JOIN temp_gs on wq_question.id=temp_gs.id
|
|
|
set wq_question.topic= CONCAT_WS('',temp_gs.content1,temp_gs.content2,temp_gs.content3,temp_gs.content4);
|
|
|
|
|
@@ -94,6 +103,9 @@ set wq_question.answer= CONCAT_WS('',temp_gs.content1,temp_gs.content2,temp_gs.c
|
|
|
update wq_question_answer_item INNER JOIN temp_gs on wq_question_answer_item.id=temp_gs.id
|
|
|
set wq_question_answer_item.answer_text= CONCAT_WS('',temp_gs.content1,temp_gs.content2,temp_gs.content3,temp_gs.content4);
|
|
|
|
|
|
+java代码更新属性树wq_knowledge_system新加的字段root_id
|
|
|
+
|
|
|
+
|
|
|
#查询wq_question表中question_id!=-1的数据,将有效的question补入wq_question_question_bank。将套题作为单独的题处理
|
|
|
#insert into wq_question_question_bank (question_bank_id,question_id)
|
|
|
#select question_bank_id,question_id from temp_childer;
|