insert into sys_approvallog(active,create_time,update_time,update_by,approvalstate,approvalperson,approvaldate,approvalreason,processInstanceId,approvalorg)
select 1,ahc.TIME_,ahc.TIME_,'system',IF(sa.approvalstate='004','不通过','通过'),ahc.USER_ID_,ahc.TIME_,ahc.MESSAGE_,ahc.proc_inst_id_ ,''
from sys_approval sa,act_hi_comment ahc where sa.processInstanceId= ahc.proc_inst_id_