select beq.id, beq.com_id, sd.dept_name as com_name, beq.project_id, pi.project_name, beq.craft_type, beq.craft_post, beq.question_diff, beq.question_type, beq.question_scope, beq.question_desc, beq.question_answer, beq.is_del, beq.create_by, beq.create_time, beq.update_by, beq.update_time, beq.remark from bus_exam_question beq
left join pro_project_info pi on pi.id = beq.project_id
left join sys_dept sd on sd.dept_id = pi.com_id
insert into bus_exam_question
com_id,
project_id,
craft_type,
craft_post,
question_diff,
question_type,
question_scope,
question_desc,
question_answer,
is_del,
create_by,
create_time,
update_by,
update_time,
remark,
#{comId},
#{projectId},
#{craftType},
#{craftPost},
#{questionDiff},
#{questionType},
#{questionScope},
#{questionDesc},
#{questionAnswer},
#{isDel},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
update bus_exam_question
com_id = #{comId},
project_id = #{projectId},
craft_type = #{craftType},
craft_post = #{craftPost},
question_diff = #{questionDiff},
question_type = #{questionType},
question_scope = #{questionScope},
question_desc = #{questionDesc},
question_answer = #{questionAnswer},
is_del = #{isDel},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
where id = #{id}
update bus_exam_question set is_del=2 where id = #{id}
update bus_exam_question set is_del=2 where id in
#{id}
delete from bus_exam_question_result where question_id in
#{questionId}
delete from bus_exam_question_result where question_id = #{questionId}
insert into bus_exam_question_result( id, question_id, opt, result, is_ok, create_by, create_time, update_by, update_time) values
( #{item.id}, #{item.questionId}, #{item.opt}, #{item.result}, #{item.isOk}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})