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