zss
2024-06-21 7ea524a6d99e7c1d9be17c88e24b2e860e5ba351
设备的检测项目多加一层检验对象
已修改1个文件
18 ■■■■ 文件已修改
cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
@@ -58,7 +58,7 @@
        END,
        CAST(code AS UNSIGNED),
        case when man_hour_group is NULL then 1
        when man_hour_group ='' then 1  else 0 end,
        when man_hour_group ='' then 1 else 0 end,
        CASE
        WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 如果以数字开头,则按照数字大小排序
        WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 提取字母后面的数字部分
@@ -66,15 +66,27 @@
    </select>
    <resultMap id="getInsProductions" type="map">
        <result property="name" column="inspection_item"/>
        <result property="name" column="sample"/>
        <collection property="children" resultMap="seProInsListByIdmaps" javaType="List"/>
    </resultMap>
    <resultMap id="seProInsListByIdmaps" type="map">
        <result property="name" column="inspection_item"/>
        <collection property="children" resultMap="seProInsListByIdmaps2" javaType="List"/>
    </resultMap>
    <resultMap id="seProInsListByIdmaps2" type="map">
        <id property="id" column="id"/>
        <result property="name" column="subclass"/>
    </resultMap>
    <select id="getInsProduction" resultMap="getInsProductions">
        select id,
        select distinct id,
               CASE
                   WHEN INSTR(sample, ',') > 0 THEN
                       SUBSTRING_INDEX(SUBSTRING_INDEX(sample, '","', 1), '"', -1)
                   when sample = '[""]' then '*'
                   ELSE
                       TRIM(BOTH '["]' FROM SUBSTRING_INDEX(REPLACE(sample, '[["', ''), '"]]', 1))
                   END
                as sample,
               inspection_item,
               case
                   when inspection_item_subclass is null then inspection_item