文书编码生成规则2012-1-000008

①通过sql语句来获取

select to_char(sysdate, 'yyyy') || '-' || #{type} || '-' ||
       lpad(count(*), 6, 0)
  from table1 t
 where t.type_id = #{type}
   and (t.first_audit_time is not null or t.final_audit_time is not null)

 

你可能感兴趣的:(2012)