liujie
2026-01-21 2d368b1f587edfe4e1c87e9dc1d5345cd43b8841
admin-server/src/main/resources/mapper/OnDutyMapper.xml
@@ -38,4 +38,28 @@
                 left join client t4 on t1.client_id = t4.id
        where t1.id = #{id}
    </select>
    <select id="exportList" resultType="com.estate.expert.admin.domain.business.onduty.OnDutyVo">
        select t1.id,t1.plan_id,t1.project_id,t1.client_id,t1.content,t1.position_id,t1.position_name,t1.remark,t1.img,t1.time,t1.state,t1.create_time,
        t2.name as plan_name,
        t3.name as project_name,
        t4.name as client_name
        from on_duty t1
        left join plan t2 on t1.plan_id = t2.id
        left join project t3 on t1.project_id = t3.id
        left join client t4 on t1.client_id = t4.id
        where 1=1
        <if test="request.planId != null">
            and t1.plan_id = #{request.planId}
        </if>
        <if test="request.projectId != null">
            and t1.project_id = #{request.projectId}
        </if>
        <if test="request.clientId != null">
            and t1.client_id = #{request.clientId}
        </if>
        <if test="sTime !=null">
            and t1.time between #{sTime} and #{eTime}
        </if>
        order by t1.time desc
    </select>
</mapper>