select bei.id, bei.com_id, sd.dept_name as com_name, bei.project_id, pi.project_name, bei.exam_title, bei.exam_type, bei.craft_type, bei.craft_post, bei.single_num, bei.single_mark, bei.multiple_num, bei.multiple_mark, bei.estimate_num, bei.estimate_mark, bei.full_mark, bei.pass_mark, bei.use_number, bei.is_del, bei.create_by, bei.create_time, bei.update_by, bei.update_time, bei.remark from bus_exam_info bei
left join pro_project_info pi on pi.id = bei.project_id
left join sys_dept sd on sd.dept_id = pi.com_id
insert into bus_exam_info
com_id,
project_id,
exam_title,
exam_type,
craft_type,
craft_post,
single_num,
single_mark,
multiple_num,
multiple_mark,
estimate_num,
estimate_mark,
full_mark,
pass_mark,
use_number,
is_del,
create_by,
create_time,
update_by,
update_time,
remark,
#{comId},
#{projectId},
#{examTitle},
#{examType},
#{craftType},
#{craftPost},
#{singleNum},
#{singleMark},
#{multipleNum},
#{multipleMark},
#{estimateNum},
#{estimateMark},
#{fullMark},
#{passMark},
#{useNumber},
#{isDel},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
update bus_exam_info
com_id = #{comId},
project_id = #{projectId},
exam_title = #{examTitle},
exam_type = #{examType},
craft_type = #{craftType},
craft_post = #{craftPost},
single_num = #{singleNum},
single_mark = #{singleMark},
multiple_num = #{multipleNum},
multiple_mark = #{multipleMark},
estimate_num = #{estimateNum},
estimate_mark = #{estimateMark},
full_mark = #{fullMark},
pass_mark = #{passMark},
use_number = #{useNumber},
is_del = #{isDel},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
where id = #{id}
update bus_exam_info set use_number = use_number+1 where id = #{id}
update bus_exam_info set is_del=2 where id = #{id}
update bus_exam_info set is_del=2 where id in
#{id}
delete from bus_exam_info_ques where exam_id in
#{examId}
delete from bus_exam_info_ques where exam_id = #{examId}
insert into bus_exam_info_ques( exam_id, question_id, marks, sort_by) values
( #{item.examId}, #{item.questionId}, #{item.marks}, #{item.sortBy})