liding
4 天以前 bd46f203b0d30a3d33b7c51ae9a528e4807477e1
inspect-server/src/main/resources/mapper/InsReportMapper.xml
@@ -66,9 +66,23 @@
        limit 1
    </select>
    <select id="selectDownloadableReport" resultType="com.ruoyi.inspect.pojo.InsReport">
        select ir.*
        from ins_report ir
        where ir.id = #{id}
          and ir.is_pass = 1
        <if test="createOrderUser != null">
          and (ir.write_user_id = #{createOrderUser}
               or ir.examine_user_id = #{createOrderUser}
               or ir.ratify_user_id = #{createOrderUser})
        </if>
        limit 1
    </select>
    <!-- 报告报表导出 -->
    <select id="reportAllExport" resultType="com.ruoyi.inspect.dto.InsReportExport">
        select code,
        case when report_type = 0 then '检测报告' else '检验报告' end                         report_type_name,
        case when type_source = 0 then '成品下单' else '原材料下单' end                    type_source,
        case
        when order_type = '抽检' then '抽检'