| | |
| | | <collection property="reportDtos" ofType="com.yuanchu.mom.dto.ReportDto" resultMap="reportDto"/> |
| | | </resultMap> |
| | | <resultMap id="reportDto" type="com.yuanchu.mom.dto.ReportDto"> |
| | | <result property="reportId" column="reportId"/> |
| | | <result property="reportId" column="report_id"/> |
| | | <result property="url" column="url"/> |
| | | <result property="urlS" column="urlS"/> |
| | | <result property="name" column="name"/> |
| | | <result property="codeUrl" column="codeUrl"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectInsOrderPage" resultMap="SampleOrderDto"> |
| | | select * |
| | | select *from (select a.* , |
| | | ir.id report_id, |
| | | ir.url, |
| | | ir.url_s, |
| | | ir.sample_code as codeUrl |
| | | from ( |
| | | SELECT |
| | | io.*, |
| | | isau.user_id assign, |
| | | ir.id report_id, |
| | | ir.url, |
| | | ir.url_s, |
| | | sample_counts.sample_num, |
| | | CONCAT(ROUND(approved_product_counts.approved_count / total_product_counts.total_count * 100, 2), '%') AS |
| | | insProgress, |
| | |
| | | ins_sample isa ON io.id = isa.ins_order_id |
| | | LEFT JOIN |
| | | ins_sample_user isau ON isau.ins_sample_id = io.id |
| | | LEFT JOIN |
| | | (SELECT id, ins_order_id, is_ratify, url, url_s FROM ins_report WHERE is_ratify = 1) ir ON io.id = |
| | | ir.ins_order_id |
| | | LEFT JOIN |
| | | user u ON io.create_user = u.id |
| | | LEFT JOIN |
| | |
| | | GROUP BY io.id,type |
| | | order by type desc,io.id desc |
| | | ) a |
| | | LEFT JOIN |
| | | (SELECT r.id, r.ins_order_id, is_ratify, url, url_s,sample_code FROM ins_report r left join ins_sample isa on r.ins_sample_id = isa.id WHERE is_ratify = 1) ir ON a.id = |
| | | ir.ins_order_id )b |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |