| | |
| | | <!--不合格处置--> |
| | | <select id="selectDisposal" resultType="map"> |
| | | SELECT i.`id`, s.`type`, s.name productName, s.`specifications`, s.number, i.`tell` description, |
| | | o.`tell` opinions, s.user_name, DATE_FORMAT(i.`create_time`, '%Y-%m-%d') `date`, i.`deal_state` |
| | | i.`tell` opinions, s.user_name, DATE_FORMAT(i.`create_time`, '%Y-%m-%d') `date`, i.`deal_state` |
| | | FROM inspect_unaccepted i |
| | | LEFT JOIN |
| | | ( |
| | |
| | | AND p.`material` LIKE CONCAT('%', #{productName}, '%') |
| | | </if> |
| | | )AS s ON s.`id` = i.`raw_inspect_id` AND s.`type` = i.type |
| | | LEFT JOIN opinion o ON i.`id` = o.`raw_unaccepted_id` |
| | | WHERE i.`state` = 1 |
| | | <if test="state != null"> |
| | | AND i.`deal_state` = #{state} |