| | |
| | | u.name checker, |
| | | ip.start_time starttime, |
| | | ip.end_time finishtime, |
| | | i.id deviceId, |
| | | u.id userId, |
| | | ip.test_state state |
| | | from instrument i |
| | | left join (select ip.* |
| | |
| | | left join inspection_material im on im.id = ip.inspection_material_id |
| | | left join user u on u.id = ip.user_id |
| | | <where> |
| | | <if test="deviceId != null"> |
| | | and i.id = #{deviceId} |
| | | <if test="device != null and device != null"> |
| | | and i.equipment_name = #{device} |
| | | </if> |
| | | <if test="userId != null"> |
| | | and u.id = #{userId} |
| | | <if test="user != null and user != null"> |
| | | and u.name = #{user} |
| | | </if> |
| | | <if test="beginTime != null and endTime != null"> |
| | | and ip.start_time between #{beginTime} and #{endTime} |