| @ -0,0 +1,71 @@ | |||
| package com.inspect.simulator.domain.result; | |||
| import com.inspect.simulator.domain.BaseEntity; | |||
| import lombok.*; | |||
| import java.util.Objects; | |||
| @Getter | |||
| @Setter | |||
| public class PatrolPresetPos extends BaseEntity { | |||
| private static final long serialVersionUID = 1L; | |||
| private String presetPosId; | |||
| private String presetPosCode; | |||
| private String presetPosName; | |||
| private Long patrolPointId; | |||
| private String channelId; | |||
| private String coordinateType; | |||
| private Long stopTime; | |||
| private String channelImg; | |||
| private String description; | |||
| private String isEnable; | |||
| private String algSubtypeCode; | |||
| private String eqpBookId; | |||
| private String channelCode; | |||
| private String channelType; | |||
| private String patrolDeviceCode; | |||
| private String stdParolPointId; | |||
| private String deviceId; | |||
| private String patrolDeviceName; | |||
| private String videoNvrCode; | |||
| private String channelContent; | |||
| @Override | |||
| public boolean equals(Object object) { | |||
| if (this == object) return true; | |||
| if (object == null || getClass() != object.getClass()) return false; | |||
| PatrolPresetPos that = (PatrolPresetPos) object; | |||
| return Objects.equals(presetPosId, that.presetPosId) && Objects.equals(presetPosCode, that.presetPosCode) && Objects.equals(presetPosName, that.presetPosName) && Objects.equals(patrolPointId, that.patrolPointId) && Objects.equals(channelId, that.channelId) && Objects.equals(coordinateType, that.coordinateType) && Objects.equals(stopTime, that.stopTime) && Objects.equals(channelImg, that.channelImg) && Objects.equals(description, that.description) && Objects.equals(isEnable, that.isEnable) && Objects.equals(algSubtypeCode, that.algSubtypeCode) && Objects.equals(eqpBookId, that.eqpBookId) && Objects.equals(channelCode, that.channelCode) && Objects.equals(channelType, that.channelType) && Objects.equals(patrolDeviceCode, that.patrolDeviceCode) && Objects.equals(stdParolPointId, that.stdParolPointId) && Objects.equals(deviceId, that.deviceId) && Objects.equals(patrolDeviceName, that.patrolDeviceName) && Objects.equals(videoNvrCode, that.videoNvrCode) && Objects.equals(channelContent, that.channelContent); | |||
| } | |||
| @Override | |||
| public int hashCode() { | |||
| return Objects.hash(presetPosId, presetPosCode, presetPosName, patrolPointId, channelId, coordinateType, stopTime, channelImg, description, isEnable, algSubtypeCode, eqpBookId, channelCode, channelType, patrolDeviceCode, stdParolPointId, deviceId, patrolDeviceName, videoNvrCode, channelContent); | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return "PatrolPresetPos{" + | |||
| "presetPosId='" + presetPosId + '\'' + | |||
| ", presetPosCode='" + presetPosCode + '\'' + | |||
| ", presetPosName='" + presetPosName + '\'' + | |||
| ", patrolPointId=" + patrolPointId + | |||
| ", channelId='" + channelId + '\'' + | |||
| ", coordinateType='" + coordinateType + '\'' + | |||
| ", stopTime=" + stopTime + | |||
| ", channelImg='" + channelImg + '\'' + | |||
| ", description='" + description + '\'' + | |||
| ", isEnable='" + isEnable + '\'' + | |||
| ", algSubtypeCode='" + algSubtypeCode + '\'' + | |||
| ", eqpBookId='" + eqpBookId + '\'' + | |||
| ", channelCode='" + channelCode + '\'' + | |||
| ", channelType='" + channelType + '\'' + | |||
| ", patrolDeviceCode='" + patrolDeviceCode + '\'' + | |||
| ", stdParolPointId='" + stdParolPointId + '\'' + | |||
| ", deviceId='" + deviceId + '\'' + | |||
| ", patrolDeviceName='" + patrolDeviceName + '\'' + | |||
| ", videoNvrCode='" + videoNvrCode + '\'' + | |||
| ", channelContent='" + channelContent + '\'' + | |||
| '}'; | |||
| } | |||
| } | |||
| @ -0,0 +1,12 @@ | |||
| package com.inspect.simulator.mapper; | |||
| import com.inspect.simulator.domain.result.PatrolPresetPos; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| import java.util.List; | |||
| @Mapper | |||
| public interface PatrolPresetPosMapper { | |||
| List<PatrolPresetPos> selectPatrolPresetPosByPatrolPointId(String patrolPointId); | |||
| } | |||
| @ -0,0 +1,95 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.inspect.simulator.mapper.PatrolPresetPosMapper"> | |||
| <resultMap type="com.inspect.simulator.domain.result.PatrolPresetPos" id="PatrolPresetPosResult"> | |||
| <result property="presetPosId" column="preset_pos_id"/> | |||
| <result property="presetPosCode" column="preset_pos_code"/> | |||
| <result property="presetPosName" column="preset_pos_name"/> | |||
| <result property="patrolPointId" column="patrol_point_id"/> | |||
| <result property="channelId" column="channel_id"/> | |||
| <result property="coordinateType" column="coordinate_type"/> | |||
| <result property="stopTime" column="stop_time"/> | |||
| <result property="channelImg" column="channel_img"/> | |||
| <result property="description" column="description"/> | |||
| <result property="isEnable" column="is_enable"/> | |||
| <result property="createTime" column="create_time"/> | |||
| <result property="algSubtypeCode" column="alg_subtype_code"/> | |||
| <result property="eqpBookId" column="eqp_book_id"/> | |||
| <result property="channelCode" column="channel_code"/> | |||
| <result property="channelType" column="channel_type"/> | |||
| <result property="channelContent" column="channel_content"/> | |||
| <result property="patrolDeviceName" column="patrol_device_name"/> | |||
| <result property="patrolDeviceCode" column="patrol_device_code"/> | |||
| <result property="videoNvrCode" column="video_nvr_code"/> | |||
| </resultMap> | |||
| <sql id="selectPatrolPresetPosVo"> | |||
| select preset_pos_id, | |||
| preset_pos_code, | |||
| preset_pos_name, | |||
| patrol_point_id, | |||
| channel_id, | |||
| coordinate_type, | |||
| stop_time, | |||
| channel_img, | |||
| description, | |||
| is_enable, | |||
| create_time, | |||
| alg_subtype_code, | |||
| eqp_book_id, | |||
| channel_code, | |||
| channel_type, | |||
| patrol_device_code, | |||
| video_nvr_code | |||
| from patrol_preset_pos | |||
| </sql> | |||
| <select id="selectPatrolPresetPosList" parameterType="com.inspect.simulator.domain.result.PatrolPresetPos" resultMap="PatrolPresetPosResult"> | |||
| <include refid="selectPatrolPresetPosVo"/> | |||
| <where> | |||
| <if test="presetPosCode != null and presetPosCode != ''">and preset_pos_code = #{presetPosCode}</if> | |||
| <if test="presetPosName != null and presetPosName != ''">and preset_pos_name like concat('%', | |||
| #{presetPosName}, '%') | |||
| </if> | |||
| <if test="patrolPointId != null ">and patrol_point_id = #{patrolPointId}</if> | |||
| <if test="channelId != null and channelId != ''">and channel_id = #{channelId}</if> | |||
| <if test="coordinateType != null and coordinateType != ''">and coordinate_type = #{coordinateType}</if> | |||
| <if test="stopTime != null ">and stop_time = #{stopTime}</if> | |||
| <if test="channelImg != null and channelImg != ''">and channel_img = #{channelImg}</if> | |||
| <if test="description != null and description != ''">and description = #{description}</if> | |||
| <if test="isEnable != null and isEnable != ''">and is_enable = #{isEnable}</if> | |||
| <if test="patrolDeviceCode != null and patrolDeviceCode != ''">and patrol_device_code = #{patrolDeviceCode}</if> | |||
| <if test="channelCode != null and channelCode != ''">and channel_code = #{channelCode}</if> | |||
| <if test="videoNvrCode != null and videoNvrCode != ''">and video_nvr_code = #{videoNvrCode}</if> | |||
| </where> | |||
| </select> | |||
| <select id="selectPatrolPresetPosListByIds" parameterType="String" resultMap="PatrolPresetPosResult"> | |||
| <include refid="selectPatrolPresetPosVo"/> | |||
| where preset_pos_id in | |||
| <foreach item="presetPosId" collection="array" open="(" separator="," close=")"> | |||
| #{presetPosId} | |||
| </foreach> | |||
| </select> | |||
| <select id="selectPatrolPresetPosByPresetPosId" parameterType="String" resultMap="PatrolPresetPosResult"> | |||
| <include refid="selectPatrolPresetPosVo"/> | |||
| where preset_pos_id = #{presetPosId} | |||
| </select> | |||
| <select id="selectPatrolPresetPosByPatrolPointId" parameterType="String" resultMap="PatrolPresetPosResult"> | |||
| select a.preset_pos_id, | |||
| a.preset_pos_name, | |||
| a.alg_subtype_code, | |||
| a.eqp_book_id, | |||
| a.channel_code, | |||
| a.channel_type, | |||
| a.channel_img, | |||
| c.channel_name patrol_device_name, | |||
| c.channel_content channel_content | |||
| from patrol_preset_pos a | |||
| left join basedata_eqpbook_channel c on c.channel_id = a.channel_id | |||
| where a.patrol_point_id = #{patrolPointId} | |||
| </select> | |||
| </mapper> | |||