insert into pj_evaluate_details(evaluate_id,sub_evaluate_id,post_id,person_id,json,title_list,is_project,is_active)
values(#{evaluateId},#{templateId},#{deptId},#{userId},#{jsonData},#{titleFiled},#{isProject},'1')
update pj_evaluate_details set json = #{jsonData},title_list = #{titleFiled},is_project = #{isProject}
where evaluate_id = #{evaluateId} and sub_evaluate_id = #{templateId} and post_id = #{deptId}
delete from pj_evaluate_details_child where evaluate_id = #{evaluateId} and template_id = #{templateId} and
post_id = #{deptId}
and person_id = #{userId}
insert into pj_evaluate_details_child(details_id,template_id,evaluate_id,post_id,person_id,sub_id,
sub_name,pro_id,pro_name,title_id,score)values
(#{item.parentId},#{item.templateId},#{item.evaluateId},#{item.deptId},#{item.userId},
#{item.subId},#{item.subName},#{item.proId},#{item.proName},#{item.titleId},
NULL
#{item.score}
)
insert into
pj_evaluate_result(details_id,evaluate_id,sub_evaluate_id,sub_id,pro_id,dept_id,person_id,json,title_list,is_project,
check_one,check_person_one,is_active,person_ids)
values(#{parentId},#{evaluateId},#{templateId},#{subId},#{proId},#{deptId},#{userId},#{jsonData},#{titleFiled},#{isProject},'0','0','1',#{userId})
update pj_evaluate_result set check_one = #{type},reject_one = #{rejectReason},check_person_one = #{userId}
where id = #{id}
update pj_evaluate_result set check_two = #{type},reject_two = #{rejectReason},check_person_two = #{userId},
check_one = #{type}
where id = #{id}
update pj_evaluate_result set check_three = #{type},reject_three = #{rejectReason},check_person_three = #{userId},
check_one = #{type},check_two = #{type}
where id = #{id}
update pj_evaluate_result set check_one = #{type},reject_one = #{rejectReason},check_person_one = #{userId}
where evaluate_id = #{evaluateId} and sub_evaluate_id = #{templateId} and dept_id = #{deptId}
update pj_evaluate_result set check_two = #{type},reject_two = #{rejectReason},check_person_two = #{userId},
check_one = #{type}
where evaluate_id = #{evaluateId} and sub_evaluate_id = #{templateId} and dept_id = #{deptId}
update pj_evaluate_result set check_three = #{type},reject_three = #{rejectReason},check_person_three = #{userId},
check_two = #{type},check_one = #{type}
where evaluate_id = #{evaluateId} and sub_evaluate_id = #{templateId} and dept_id = #{deptId}
update pj_evaluate_result set json = #{jsonData},title_list = #{titleFiled},is_project =
#{isProject},check_one = '0',check_person_one = '0',reject_one = '',check_two = '0',check_person_two =
'0',reject_two = '',person_id = #{userId},person_ids =
CASE
WHEN person_ids IS NULL OR person_ids = '' THEN #{userId}
ELSE CONCAT(person_ids, ',', #{userId})
END
where id = #{id}
update pj_evaluate_details set check_one = #{isApprove} where details_id = #{detailsId}
update pj_evaluate_details set check_two = #{isApprove},check_one = #{isApprove} where details_id = #{detailsId}
update pj_evaluate_details set check_three = #{isApprove}, check_two = #{isApprove},check_one = #{isApprove} where details_id = #{detailsId}
update pj_evaluate_details set check_one = #{isApprove} where evaluate_id = #{evaluateId} and post_id = #{deptId} and sub_evaluate_id = #{templateId}
update pj_evaluate_details set check_two = #{isApprove},check_one = #{isApprove} where evaluate_id = #{evaluateId} and post_id = #{deptId} and sub_evaluate_id = #{templateId}
update pj_evaluate_details set check_three = #{isApprove},check_two = #{isApprove},check_one = #{isApprove} where evaluate_id = #{evaluateId} and post_id = #{deptId} and sub_evaluate_id = #{templateId}
update pj_evaluate_record set json = #{jsonData} where evaluate_id = #{evaluateId}
update pj_evaluate_details set check_two = #{isApprove} where evaluate_id = #{evaluateId} and sub_evaluate_id =
#{templateId} and post_id = #{deptId}
update pj_evaluate_result set check_two = #{type},reject_two = #{rejectReason},check_person_two = #{userId}
where evaluate_id = #{evaluateId} and sub_evaluate_id =
#{templateId} and dept_id = #{deptId}
update pj_evaluate_record set task_status = #{isApprove}
where evaluate_id = #{evaluateId} and template_id = #{templateId} and dept_id = #{businessDivisionId}
insert into pj_task_examine(evaluat_task_id,evaluate_id,post_id,user_list,evaluate_type,evaluate_node)
values (#{evaluatTaskId},#{evaluateId},#{postId},#{userList},#{evaluateType},#{evaluateNode})
insert into
pj_summary_compare(business_id,evaluate_id,sub_id,sub_name,leader_name,evaluate_date,year,month,title_name,score,user_id,user_name) values
(#{bean.deptId}, #{bean.evaluateId}, #{item.subId}, #{item.subName}, #{item.leaderName},
#{item.evaluateDate}, #{item.year}, #{item.month},
#{item.titleName}, #{item.totalScore}, #{bean.userId}, #{bean.userName})
update pj_evaluate_record set task_status = #{taskStatus} where evaluate_id = #{evaluateId}
update pj_evaluate_record
set status=#{status} where evaluate_id=#{id}