yuxc
2023-12-08 6e9a060403844b37c73d20a13b6d8468fc4a181b
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeALlCodeMapper.xml
@@ -8,11 +8,18 @@
    <select id="selectCodeAllCodePage" resultMap="CodeAllcodeResultMap">
        select * from PL_CODE_ALLCODE
        <where>
            <if test="tenantId != null and tenantId != ''">
                TENANT_ID = #{tenantId}
            </if>
        </where>
    </select>
    <select id="selectGroupByClassify" resultMap="CodeAllcodeResultMap">
        select codeClassifyOid,
               codeRuleOid,
               serialUnit,
               nvl(max(unFillSerial),0) unFillSerial
        from (select codeClassifyOid,
                     codeRuleOid,
                     serialUnit,
                     to_number(replace(unFillSerial, ${replaceString}, '')) unFillSerial
              from PL_CODE_ALLCODE where codeClassifyOid in (${codeClassifyOid}))
        group by codeClassifyOid, codeRuleOid, serialUnit
    </select>
</mapper>