select id, code, task_id, back_person, phone, direct_audit_by, direct_audit_time, direct_audit_remark, create_by, create_time, update_by, update_time, remark, company_id, back_time, status, direct_id from back_apply_info
insert into back_apply_info
code,
task_id,
back_person,
phone,
direct_audit_by,
direct_audit_time,
direct_audit_remark,
create_by,
create_time,
update_by,
update_time,
remark,
company_id,
back_time,
status,
direct_id,
#{code},
#{taskId},
#{backPerson},
#{phone},
#{directAuditBy},
#{directAuditTime},
#{directAuditRemark},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
#{companyId},
#{backTime},
#{status},
#{directId},
insert into tm_task (
task_type,
task_status,
code,
create_by,
remark,
company_id,
create_time
) values (
#{taskType},
#{taskStatus},
#{code},
#{createBy},
#{remark},
#{companyId},
NOW()
)
insert into tm_task_agreement
(
task_id,
agreement_id,
create_by,
remark,
company_id,
create_time
) values (
#{taskId},
#{agreementId},
#{createBy},
#{remark},
#{companyId},
NOW()
)
insert into back_apply_details
code,
parent_id,
type_id,
pre_num,
audit_num,
use_num,
status,
create_by,
create_time,
ap_detection,
remark,
company_id,
#{code},
#{parentId},
#{typeId},
#{preNum},
#{auditNum},
#{num},
#{status},
#{createBy},
#{createTime},
#{apDetection},
#{remark},
#{companyId},
insert into back_check_details
parent_id,
type_id,
back_num,
ma_id,
status,
create_by,
create_time,
remark,
ap_detection,
company_id,
#{parentId},
#{typeId},
#{preNum},
#{maId},
#{status},
#{createBy},
#{createTime},
#{remark},
#{apDetection},
#{companyId},
update back_apply_info
code = #{code},
task_id = #{taskId},
back_person = #{backPerson},
phone = #{phone},
direct_audit_by = #{directAuditBy},
direct_audit_time = #{directAuditTime},
direct_audit_remark = #{directAuditRemark},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
company_id = #{companyId},
back_time = #{backTime},
status = #{status},
direct_id = #{directId},
where id = #{id}
delete from back_apply_info where id = #{id}
delete from back_apply_info where id in
#{id}
update tm_task set status = 0 where task_id = #{taskId}
delete from tm_task_agreement where task_id = #{taskId}
delete from back_apply_info where id = #{id}
delete from back_apply_details where parent_id = #{id}
delete from back_check_details where parent_id = #{id}