龚焕茏
2024-08-22 cb7d99d810f2356096b67fbccd3fac556e638d83
ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -113,7 +113,7 @@
            <if test="civilCode != null  and civilCode != ''">and civil_code = #{civilCode}</if>
            <if test="integratedDevice != null ">and integrated_device = #{integratedDevice}</if>
            <if test="cameraBrand != null ">and camera_brand = #{cameraBrand}</if>
            <if test="address != null  and address != ''">and address like concat('%',#{address},'%')</if>
            <if test="address != null  and address != ''">and d.dept_id = #{address}</if>
            <if test="netWorking != null ">and net_working = #{netWorking}</if>
            <if test="publicSecurity != null  and publicSecurity != ''">and public_security = #{publicSecurity}</if>
            <if test="installedTime != null ">and installed_time = #{installedTime}</if>
@@ -354,7 +354,7 @@
        LEFT JOIN t_work_order w ON w.serial_number = p.serial_number
        WHERE u.id = #{unitId} AND MONTH(w.create_time) IS NOT NULL
        <if test="dateRange != null and dateRange.size > 0">
            AND DATE_FORMAT(w.create_time, '%Y-%m') BETWEEN #{dateRange[0]} AND #{dateRange[1]}
            AND DATE_FORMAT(w.create_time, '%Y-%m') BETWEEN DATE_FORMAT(#{dateRange[0]}, '%Y-%m') AND DATE_FORMAT(#{dateRange[1]}, '%Y-%m')
        </if>
        GROUP BY months
        ORDER BY months