select distinct a.billno,a.stepname,a.dealname,
CASE a.dealremark
WHEN '同意' THEN 'NULL'
ELSE dealremark END dealremark,
CASE a.dealresult
WHEN '1' THEN '通过'
WHEN '2' THEN '不通过'
ELSE '处理中' END dealresult,
b.statusname,a.starttime,a.endtime,a.dealno,c.stepid,a.processid,e.satisfaction,e.evaluate
from sys_flow_processes a,SYS_FLOW_BILL e,tb_sys_billstatus b,sys_flow_step c,SYS_FLOW_BUS d
where a.flowcode=d.flowcode and d.flowid=c.flowid and a.stepname=c.stepname AND b.billstatus=a.flowstatus
and a.BILLNO=e.billno
and a.billno='20191200077'
order by a.dealno desc;