liyong
9 小时以前 1ca5584d7e3200a9af65a099bd26d3593e2ba702
src/main/resources/mapper/device/DeviceMaintenanceMapper.xml
@@ -19,8 +19,9 @@
        dm.tenant_id,
        dm.maintenance_actually_name,
        dl.device_name,
        dm.machinery_category,
        dl.device_model,
        su.user_name as create_user_name
        su.nick_name as create_user_name
        from device_maintenance dm
        left join device_ledger dl on dm.device_ledger_id = dl.id
        left join sys_user su on dm.create_user = su.user_id
@@ -32,18 +33,25 @@
            <if test="deviceMaintenanceDto.deviceModel != null">
                and dl.device_model like concat('%',#{deviceMaintenanceDto.deviceModel},'%')
            </if>
            <if test="deviceMaintenanceDto.status != null">
                and dm.status = #{deviceMaintenanceDto.status}
            </if>
            <if test="deviceMaintenanceDto.maintenanceActuallyName != null">
                and dm.maintenance_actually_name like concat('%',#{deviceMaintenanceDto.maintenanceActuallyName},'%')
            </if>
            <if test="deviceMaintenanceDto.maintenancePlanTimeReq != null">
                and dm.maintenance_plan_time like concat('%',#{deviceMaintenanceDto.maintenancePlanTimeReq},'%')
            <if test="deviceMaintenanceDto.maintenancePlanTime != null">
                and dm.maintenance_plan_time like concat('%',#{deviceMaintenanceDto.maintenancePlanTime},'%')
            </if>
            <if test="deviceMaintenanceDto.maintenanceActuallyTimeReq != null">
                and dm.maintenance_actually_time like concat('%',#{deviceMaintenanceDto.maintenanceActuallyTimeReq},'%')
            <if test="deviceMaintenanceDto.maintenanceActuallyTime != null">
                and dm.maintenance_actually_time like concat('%',#{deviceMaintenanceDto.maintenanceActuallyTime},'%')
            </if>
            <if test="deviceMaintenanceDto.maintenanceActuallyTime != null">
                and dm.maintenance_actually_time >= str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d')
                and dm.maintenance_actually_time &lt; date_add(str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d'), interval 1 day)
            </if>
        </where>
    </select>
    <select id="detailById" resultType="com.ruoyi.device.dto.DeviceMaintenanceDto">
    <select id="detailById" resultType="com.ruoyi.device.vo.DeviceMaintenanceVo">
        select dm.id,
               dm.device_ledger_id,
               dm.maintenance_plan_time,
@@ -55,6 +63,7 @@
               dm.create_user,
               dm.update_user,
               dm.tenant_id,
               dm.machinery_category,
               dm.maintenance_actually_name,
               dl.device_name,
               dl.device_model,