|
|
|
@ -22,12 +22,12 @@ SELECT
|
|
|
|
|
<sql id="keyBySggAndYear">
|
|
|
|
|
SELECT
|
|
|
|
|
CONCAT(
|
|
|
|
|
#{sggCd}
|
|
|
|
|
${sggCd}
|
|
|
|
|
, <include refid="utility.currentYear" />
|
|
|
|
|
, LPAD(CAST(IFNULL(MAX(SUBSTRING(${TABLE_KEY}, 9+1)) + 1, 1) AS INT), ${pad}-9, '0')
|
|
|
|
|
) AS NEW_ID
|
|
|
|
|
FROM ${TABLE_NAME}
|
|
|
|
|
WHERE ${TABLE_KEY} LIKE CONCAT(#{sggCd}, <include refid="utility.currentYear" />, '%')
|
|
|
|
|
WHERE ${TABLE_KEY} LIKE CONCAT(${sggCd}, <include refid="utility.currentYear" />, '%')
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
</mapper>
|