From 9a1843b565b97326c78b2e41fc6b7953f5af84d9 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 23 七月 2024 10:15:34 +0800 Subject: [PATCH] 运维阈值key --- ycl-server/src/main/resources/mapper/zgyw/YwThresholdMapper.xml | 17 +++++--- ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java | 4 +- ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwThreshold.java | 5 ++ ycl-common/src/main/java/constant/YwThreadConstants.java | 64 +++++++++++++++++++++----------- 4 files changed, 59 insertions(+), 31 deletions(-) diff --git a/ycl-common/src/main/java/constant/YwThreadConstants.java b/ycl-common/src/main/java/constant/YwThreadConstants.java index 59beead..c32dba7 100644 --- a/ycl-common/src/main/java/constant/YwThreadConstants.java +++ b/ycl-common/src/main/java/constant/YwThreadConstants.java @@ -4,29 +4,49 @@ * 闃堝�煎父閲� */ public class YwThreadConstants { + //鏃堕挓鍑嗙‘鐜� + public static final String Car_ClockPercent = "Car_ClockPercent"; + //鏁版嵁鍙婃椂鐜� + public static final String Car_TimelyPercent = "Car_TimelyPercent"; + //鐧藉ぉ杞﹁締鏈瘑鍒噺 + public static final String Car_DayNoNumberCount = "Car_DayNoNumberCount"; + //涓嶅敮涓�鏁版嵁閲� + public static final String Car_NouniqueCount = "Car_NouniqueCount"; + //鍏」鏁版嵁涓嶅畬鏁撮噺 + public static final String Car_NoIntegrityCount = "Car_NoIntegrityCount"; + //鎸佺画鏃犳暟鎹ぉ鏁� + public static final String Car_ContinueNoDataCount = "Car_ContinueNoDataCount"; - public static final String Car_ClockPercent = "鏃堕挓鍑嗙‘鐜�"; - public static final String Car_TimelyPercent = "鏁版嵁鍙婃椂鐜�"; - public static final String Car_DayNoNumberCount = "杞﹁締鏈瘑鍒噺"; - public static final String Car_NouniqueCount = "涓嶅敮涓�鏁版嵁閲�"; - public static final String Car_NoIntegrityCount = "杞﹁締鍏」灞炴�т笉瀹屾暣閲�"; - public static final String Car_ContinueNoDataCount = "鎸佺画鏃犳暟鎹ぉ鏁�"; + //鏃堕挓鍑嗙‘鐜� + public static final String Face_ClockPercent = "Face_ClockPercent"; + //鏁版嵁鍙婃椂鐜� + public static final String Face_TimelyPercent = "Face_TimelyPercent"; + //涓嶅敮涓�鏁版嵁閲� + public static final String Face_NouniqueCount = "Face_NouniqueCount"; + //寤烘ā澶辫触鐜� + public static final String Face_FailPercent = "Face_FailPercent"; + //骞冲潎浜鸿劯浣庡钩鍒嗙巼 + public static final String Face_LowScorePercent = "Face_LowScorePercent"; + //鎸佺画鏃犳暟鎹ぉ鏁� + public static final String Face_ContinueNoDataCount = "Face_ContinueNoDataCount"; - public static final String Face_ClockPercent = "鏃堕挓鍑嗙‘鐜�"; - public static final String Face_TimelyPercent = "鏁版嵁鍙婃椂鐜�"; - public static final String Face_NouniqueCount = "涓嶅敮涓�鏁版嵁閲�"; - public static final String Face_FailPercent = "寤烘ā澶辫触鐜�"; - public static final String Face_LowScorePercent = "骞冲潎浜鸿劯浣庡钩鍒嗙巼"; - public static final String Face_ContinueNoDataCount = "鎸佺画鏃犳暟鎹ぉ鏁�"; - - public static final String Video_Blur = "妯$硦鍒嗗��"; - public static final String Video_Color = "棰滆壊鍒嗗��"; - public static final String Video_Light = "浜害鍒嗗��"; - public static final String Video_Shade = "閬尅鍒嗗��"; - public static final String Video_Shake = "鎶栧姩鍒嗗��"; - public static final String Video_Snow = "闆姳鍒嗗��"; - public static final String Video_stripe = "鏉$汗鍒嗗��"; - public static final String Video_signal = "淇″彿鍒嗗��"; - public static final String Video_diffTime = "鏍囨敞鏃堕棿宸�"; + //妯$硦鍒嗗�� + public static final String Video_Blur = "Video_Blur"; + //棰滆壊鍒嗗�� + public static final String Video_Color = "Video_Color"; + //浜害鍒嗗�� + public static final String Video_Light = "Video_Light"; + //閬尅鍒嗗�� + public static final String Video_Shade = "Video_Shade"; + //鎶栧姩鍒嗗�� + public static final String Video_Shake = "Video_Shake"; + //闆姳鍒嗗�� + public static final String Video_Snow = "Video_Snow"; + //鏉$汗鍒嗗�� + public static final String Video_Stripe = "Video_Stripe"; + //淇″彿鍒嗗�� + public static final String Video_Signal = "Video_Signal"; + //鏍囨敞鏃堕棿宸� + public static final String Video_DiffTime = "Video_DiffTime"; } diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwThreshold.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwThreshold.java index ae804d7..53583c0 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwThreshold.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwThreshold.java @@ -39,6 +39,11 @@ @TableField("count_type") private String countType; + /** 閿�煎搴擸wThreadConstants */ + @Excel(name = "閿��") + @TableField("key") + private String key; + /** 闃堝�煎悕 */ @Excel(name = "闃堝�煎悕") @TableField("name") diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java index f3752af..549e453 100644 --- a/ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java +++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java @@ -125,8 +125,8 @@ List<YwThreshold> ywThresholds = ywThresholdMapper.selectList(wrapper); Map<String, YwThreshold> map = new HashMap<>(); for (YwThreshold ywThreshold : ywThresholds) { - String name = ywThreshold.getName(); - map.put(name, ywThreshold); + String key = ywThreshold.getKey(); + map.put(key, ywThreshold); } //鏃堕挓鍑嗙‘鐜囬槇鍊� Float clockPercent = Float.valueOf(map.get(YwThreadConstants.Car_ClockPercent).getValue()); diff --git a/ycl-server/src/main/resources/mapper/zgyw/YwThresholdMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/YwThresholdMapper.xml index e969c66..dc3787c 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/YwThresholdMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/YwThresholdMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.ycl.platform.mapper.YwThresholdMapper"> - + <resultMap type="YwThreshold" id="YwThresholdResult"> <result property="id" column="id" /> <result property="monitorType" column="monitor_type" /> @@ -18,12 +18,12 @@ </resultMap> <sql id="selectYwThresholdVo"> - select id, monitor_type, count_type, name, value, value_auto, create_time, update_time, description, deleted from t_yw_threshold + select id, monitor_type, count_type , key, name, value, value_auto, create_time, update_time, description, deleted from t_yw_threshold </sql> <select id="selectYwThresholdList" parameterType="YwThreshold" resultMap="YwThresholdResult"> <include refid="selectYwThresholdVo"/> - <where> + <where> <if test="monitorType != null and monitorType != ''"> and monitor_type = #{monitorType}</if> <if test="countType != null and countType != ''"> and count_type = #{countType}</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> @@ -33,17 +33,18 @@ <if test="deleted != null and deleted != ''"> and deleted = #{deleted}</if> </where> </select> - + <select id="selectYwThresholdById" parameterType="Long" resultMap="YwThresholdResult"> <include refid="selectYwThresholdVo"/> where id = #{id} </select> - + <insert id="insertYwThreshold" parameterType="YwThreshold" useGeneratedKeys="true" keyProperty="id"> insert into t_yw_threshold <trim prefix="(" suffix=")" suffixOverrides=","> <if test="monitorType != null and monitorType != ''">monitor_type,</if> <if test="countType != null">count_type,</if> + <if test="key != null">key,</if> <if test="name != null">name,</if> <if test="value != null">value,</if> <if test="valueAuto != null">value_auto,</if> @@ -55,6 +56,7 @@ <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="monitorType != null and monitorType != ''">#{monitorType},</if> <if test="countType != null">#{countType},</if> + <if test="key != null">#{key},</if> <if test="name != null">#{name},</if> <if test="value != null">#{value},</if> <if test="valueAuto != null">#{valueAuto},</if> @@ -70,6 +72,7 @@ <trim prefix="SET" suffixOverrides=","> <if test="monitorType != null and monitorType != ''">monitor_type = #{monitorType},</if> <if test="countType != null">count_type = #{countType},</if> + <if test="key != null">key = #{key},</if> <if test="name != null">name = #{name},</if> <if test="value != null">value = #{value},</if> <if test="valueAuto != null">value_auto = #{valueAuto},</if> @@ -86,9 +89,9 @@ </delete> <delete id="deleteYwThresholdByIds" parameterType="String"> - delete from t_yw_threshold where id in + delete from t_yw_threshold where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> -</mapper> \ No newline at end of file +</mapper> -- Gitblit v1.8.0