xiangpei
2024-08-24 25c0f523fccd89da32077f8f9b3da2a0d2502de2
ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
@@ -89,9 +89,9 @@
        yu.unit_name,
        yp.start_time,
        yp.end_time,
        yp.province_tag,
        yp.important_tag,
        yp.important_command_image_tag
        CASE WHEN yp.province_tag = 0 THEN '否' ELSE '是' END AS provinceTagString,
        CASE WHEN yp.important_tag = 0 THEN '否' ELSE '是' END AS importantTagString,
        CASE WHEN yp.important_command_image_tag = 0 THEN '否' ELSE '是' END AS importantCommandImageTagString
        FROM
        t_yw_point yp
        INNER JOIN t_monitor m ON yp.serial_number = m.serial_number
@@ -101,9 +101,26 @@
                AND m.name like concat('%', #{query.pointName} ,'%')
            </if>
        </where>
        ORDER BY yu.unit_name
    </select>
    <delete id="deleteAll">
        delete from t_yw_point
    </delete>
    <update id="updatePoint">
        <foreach collection="pointList" separator=";" item="point">
            UPDATE t_yw_point
            SET
            <if test="point.pointName != null and point.pointName != ''">
                point_name = #{point.pointName},
            </if>
            unit_id = #{point.unitId},
            start_time = #{point.startTime},
            end_time = #{point.endTime},
            province_tag = #{point.provinceTag},
            important_command_image_tag = #{point.importantCommandImageTag}
            WHERE serial_number = #{point.serialNumber}
        </foreach>
    </update>
</mapper>