|
@@ -728,9 +728,17 @@
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <!-- to_char(nvl(max(substr(ID, 15, 2) + 1), 1), 'fm00') as ID 2022-02-11更改为3位 -->
|
|
|
<select id="getMaxid" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh" resultType="java.lang.String">
|
|
|
- select #{type} || #{startTime} || '-' ||
|
|
|
- to_char(nvl(max(substr(ID, 15, 2) + 1), 1), 'fm00') as ID
|
|
|
+ select
|
|
|
+ <choose>
|
|
|
+ <when test='tag != null and tag != "" and tag != "1"'>
|
|
|
+ #{type} || #{startTime} || '-' || to_char(nvl(max(substr(ID, 15, 2) + 1), 1), 'fm00') as ID
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ #{type} || #{startTime} || '-' || to_char(nvl(max(substr(ID, 15, 3) + 1), 1), 'fm000') as ID
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
from ems_gm_pc_jh
|
|
|
where WORKPROC_TYPE = #{workprocType}
|
|
|
and ID like '%' || #{type} || '%'
|