xiejun
2023-12-04 007e33dd8728b4557917a2ffa2e2449865602742
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vci.ubcs.code.mapper.CodeAllCodeMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="CodeAllcodeResultMap" type="com.vci.ubcs.code.entity.CodeAllCode">
    </resultMap>
 
    <select id="selectCodeAllCodePage" resultMap="CodeAllcodeResultMap">
        select * from PL_CODE_ALLCODE
    </select>
    <select id="selectGroupByClassify" resultMap="CodeAllcodeResultMap">
        select codeClassifyOid,
               codeRuleOid,
               serialUnit,
               max(unFillSerial) 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>