| | |
| | | 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 inspection_url is not null and inspection_url != '' then '检测报告、检验报告' |
| | | 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 '抽检' |
| | | when order_type = 'Commissioned testing' then '委托检测' |
| | | when order_type = 'Inter-laboratory comparison' then '实验室间比对' |
| | | when order_type = 'Proficiency testing' then '能力验证' |
| | | when order_type = 'Customer-ordered test' then '委托检验' |
| | | when order_type = '进厂检验' then '进厂检验' |
| | | when order_type = 'Quarterly inspection' then '季度检验' |