这边单引号去掉试试
==============
select * from ( SELECT ID,TYPE,PHE,COMPANY,PROPOS_DATE,PROPOSER,REPORT_DATE,TIME,CONT_MEASURE,ROOT_CAUSE,ZT,PRIORITIES,APPEAR,STEP,ID01,HEBING, case when HEBING is null then TO_CHAR(id01) else SUBSTR(HEBING,1,INSTR(HEBING,'''')-1) end as 前面, trim(replace(substr(replace(HEBING,',',lpad(' ',40,' ')) ,15,35),chr(39),'')) as 中间,trim(replace(substr(replace(HEBING,',',lpad(' ',40,' ')) ,70,35),chr(39),'')) as 最后 from QRQC_TRACK_REPORT FOR UPDATE
)
where 1=1
${if(len(para1)==0,"","and (前面 in('"+para1+"') or 中间 in ('"+para1+"') or 最后 in ('"+para1+"'))")}
${if(len(para2) == 0,"","and to_char(TIME,'yyyy-mm-dd') like '%" + para2 + "%'")} ${if(len(para3) == 0,"","and COMPANY like '%" + para3 + "%'")}
order by id01 asc