Fixiaobai
2023-08-10 c9c4976f4e1e553edc98e4171a1d1741bde542f5
inspection-server/src/main/resources/mapper/PlanMapper.xml
@@ -14,8 +14,6 @@
        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.*
@@ -28,11 +26,11 @@
        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}