|  | @@ -73,7 +73,7 @@
 | 
											
												
													
														|  |              <result column="state" property="state"></result>
 |  |              <result column="state" property="state"></result>
 | 
											
												
													
														|  |          </collection>
 |  |          </collection>
 | 
											
												
													
														|  |      </resultMap>
 |  |      </resultMap>
 | 
											
												
													
														|  | -    <select id="selectPage" resultType="com.xunmei.iot.vo.videoDiagnosis.VideoDiagnosisWebPageVo">
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <!--<select id="selectPage" resultType="com.xunmei.iot.vo.videoDiagnosis.VideoDiagnosisWebPageVo">
 | 
											
												
													
														|  |          SELECT DISTINCT
 |  |          SELECT DISTINCT
 | 
											
												
													
														|  |          c.id,
 |  |          c.id,
 | 
											
												
													
														|  |          c.host_code,
 |  |          c.host_code,
 | 
											
										
											
												
													
														|  | @@ -126,12 +126,68 @@
 | 
											
												
													
														|  |          <if test="pageDto.diagnosisState!=null and pageDto.diagnosisState==2">
 |  |          <if test="pageDto.diagnosisState!=null and pageDto.diagnosisState==2">
 | 
											
												
													
														|  |              and vdr.id is null
 |  |              and vdr.id is null
 | 
											
												
													
														|  |          </if>
 |  |          </if>
 | 
											
												
													
														|  | 
 |  | +        <!–        <if test="pageDto.status !=null">–>
 | 
											
												
													
														|  | 
 |  | +        <!–            and dhd.`status` = #{pageDto.status}–>
 | 
											
												
													
														|  | 
 |  | +        <!–        </if>–>
 | 
											
												
													
														|  | 
 |  | +    </select>-->
 | 
											
												
													
														|  | 
 |  | +    <select id="selectPage" resultType="com.xunmei.iot.vo.videoDiagnosis.VideoDiagnosisWebPageVo">
 | 
											
												
													
														|  | 
 |  | +        SELECT DISTINCT
 | 
											
												
													
														|  | 
 |  | +        c.id,
 | 
											
												
													
														|  | 
 |  | +        c.host_code,
 | 
											
												
													
														|  | 
 |  | +        c.device_code as  channelCode,
 | 
											
												
													
														|  | 
 |  | +        c.org_name,
 | 
											
												
													
														|  | 
 |  | +        o.affiliated_area,
 | 
											
												
													
														|  | 
 |  | +        o.affiliated_bank,
 | 
											
												
													
														|  | 
 |  | +        d.device_name as hostName,
 | 
											
												
													
														|  | 
 |  | +        c.device_name as channelName,
 | 
											
												
													
														|  | 
 |  | +        vic.lose_duration,
 | 
											
												
													
														|  | 
 |  | +        vdc.plan_days,
 | 
											
												
													
														|  | 
 |  | +        vdc.real_days,
 | 
											
												
													
														|  | 
 |  | +        if(vdr.id is
 | 
											
												
													
														|  | 
 |  | +        null,null,if(vdr.signal_lost+vdr.occlude+vdr.brightness+vdr.color_cast+vdr.snowflake+vdr.stripe+vdr.contrast+vdr.blurry>=1,1,0))
 | 
											
												
													
														|  | 
 |  | +        as quality
 | 
											
												
													
														|  | 
 |  | +        from iot_device_info c
 | 
											
												
													
														|  | 
 |  | +        INNER JOIN iot_device_info d on c.host_code=d.device_code
 | 
											
												
													
														|  | 
 |  | +        inner  join sys_org o on c.org_id =o.id and o.deleted=0 and o.is_lock='0'
 | 
											
												
													
														|  | 
 |  | +        left JOIN mediator_video_days_check vdc on c.host_code=vdc.equipment_code and c.device_code=vdc.channel_code
 | 
											
												
													
														|  | 
 |  | +        left JOIN mediator_video_integrity_check vic on c.host_code=vic.equipment_code and
 | 
											
												
													
														|  | 
 |  | +        c.device_code=vic.channel_code
 | 
											
												
													
														|  | 
 |  | +        left JOIN mediator_video_diagnosis_record vdr on c.host_code=vdr.equipment_code and
 | 
											
												
													
														|  | 
 |  | +        c.device_code=vdr.channel_code
 | 
											
												
													
														|  | 
 |  | +        where c.deleted=0 and d.deleted=0
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.checkSub==true">
 | 
											
												
													
														|  | 
 |  | +            and c.org_path like concat(#{orgPath},"%")
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.checkSub==false">
 | 
											
												
													
														|  | 
 |  | +            and c.org_id = #{pageDto.orgId}
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.hostName!=null and pageDto.hostName!=''">
 | 
											
												
													
														|  | 
 |  | +            and d.device_name like concat('%', #{pageDto.hostName},'%')
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.channelName!=null and pageDto.channelName!=''">
 | 
											
												
													
														|  | 
 |  | +            and c.device_name like concat('%', #{pageDto.channelName},'%')
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.integrityState!=null">
 | 
											
												
													
														|  | 
 |  | +            and vic.status=#{pageDto.integrityState}
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.daysState==0">
 | 
											
												
													
														|  | 
 |  | +            and vdc.plan_days=vdc.real_days
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.daysState==1">
 | 
											
												
													
														|  | 
 |  | +            and vdc.plan_days!=vdc.real_days
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.diagnosisState!=null and pageDto.diagnosisState!=2">
 | 
											
												
													
														|  | 
 |  | +            and vdr.is_alarm=#{pageDto.diagnosisState}
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  | 
 |  | +        <if test="pageDto.diagnosisState!=null and pageDto.diagnosisState==2">
 | 
											
												
													
														|  | 
 |  | +            and vdr.id is null
 | 
											
												
													
														|  | 
 |  | +        </if>
 | 
											
												
													
														|  |          <!--        <if test="pageDto.status !=null">-->
 |  |          <!--        <if test="pageDto.status !=null">-->
 | 
											
												
													
														|  |          <!--            and dhd.`status` = #{pageDto.status}-->
 |  |          <!--            and dhd.`status` = #{pageDto.status}-->
 | 
											
												
													
														|  |          <!--        </if>-->
 |  |          <!--        </if>-->
 | 
											
												
													
														|  |      </select>
 |  |      </select>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    <select id="diagnosisDetail" resultMap="diagnosisDetailMap">
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <!--<select id="diagnosisDetail" resultMap="diagnosisDetailMap">
 | 
											
												
													
														|  |          SELECT d.equipment_name        as hostName,
 |  |          SELECT d.equipment_name        as hostName,
 | 
											
												
													
														|  |                 c.channel_name          as channelName,
 |  |                 c.channel_name          as channelName,
 | 
											
												
													
														|  |                 c.channel_addr          as channelIp,
 |  |                 c.channel_addr          as channelIp,
 | 
											
										
											
												
													
														|  | @@ -164,6 +220,39 @@
 | 
											
												
													
														|  |                             ON c.host_code = vdr.equipment_code AND c.channel_code = vdr.channel_code
 |  |                             ON c.host_code = vdr.equipment_code AND c.channel_code = vdr.channel_code
 | 
											
												
													
														|  |          WHERE c.host_code = #{hostCode}
 |  |          WHERE c.host_code = #{hostCode}
 | 
											
												
													
														|  |            and c.channel_code = #{channelCode}
 |  |            and c.channel_code = #{channelCode}
 | 
											
												
													
														|  | 
 |  | +    </select>-->
 | 
											
												
													
														|  | 
 |  | +    <select id="diagnosisDetail" resultMap="diagnosisDetailMap">
 | 
											
												
													
														|  | 
 |  | +        SELECT d.device_name        as hostName,
 | 
											
												
													
														|  | 
 |  | +               c.device_name          as channelName,
 | 
											
												
													
														|  | 
 |  | +               vdr.update_time         as quality_update_time,
 | 
											
												
													
														|  | 
 |  | +               vdr.signal_lost         as quality_signal_lost,
 | 
											
												
													
														|  | 
 |  | +               vdr.occlude             as quality_occlude,
 | 
											
												
													
														|  | 
 |  | +               vdr.brightness          as quality_brightness,
 | 
											
												
													
														|  | 
 |  | +               vdr.color_cast          as quality_colorCast,
 | 
											
												
													
														|  | 
 |  | +               vdr.snowflake           as quality_snowflake,
 | 
											
												
													
														|  | 
 |  | +               vdr.stripe              as quality_stripe,
 | 
											
												
													
														|  | 
 |  | +               vdr.contrast            as quality_contrast,
 | 
											
												
													
														|  | 
 |  | +               vdr.blurry              as quality_blurry,
 | 
											
												
													
														|  | 
 |  | +               vdr.img_url             as quality_image,
 | 
											
												
													
														|  | 
 |  | +               vic.record_date         as integrity_record_date,
 | 
											
												
													
														|  | 
 |  | +               vic.lose_duration       as integrity_lose_duration,
 | 
											
												
													
														|  | 
 |  | +               vic.lose_span           as integrity_lose_span,
 | 
											
												
													
														|  | 
 |  | +               vic.check_span          as integrity_check_span,
 | 
											
												
													
														|  | 
 |  | +               vic.update_time         as integrity_update_time,
 | 
											
												
													
														|  | 
 |  | +               vic.status              as integrity_status,
 | 
											
												
													
														|  | 
 |  | +               vdc.plan_days           as storage_plan_days,
 | 
											
												
													
														|  | 
 |  | +               vdc.real_days           as storage_real_days,
 | 
											
												
													
														|  | 
 |  | +               vdc.earliest_video_time as storage_earliest_video_time
 | 
											
												
													
														|  | 
 |  | +        FROM iot_device_info c
 | 
											
												
													
														|  | 
 |  | +                 INNER JOIN iot_device_info d ON c.host_code = d.device_code
 | 
											
												
													
														|  | 
 |  | +                 LEFT JOIN mediator_video_days_check vdc
 | 
											
												
													
														|  | 
 |  | +                           ON c.host_code = vdc.equipment_code AND c.device_code = vdc.channel_code
 | 
											
												
													
														|  | 
 |  | +                 LEFT JOIN mediator_video_integrity_check vic
 | 
											
												
													
														|  | 
 |  | +                           ON c.host_code = vic.equipment_code AND c.device_code = vic.channel_code
 | 
											
												
													
														|  | 
 |  | +                 LEFT JOIN mediator_video_diagnosis_record vdr
 | 
											
												
													
														|  | 
 |  | +                           ON c.host_code = vdr.equipment_code AND c.device_code = vdr.channel_code
 | 
											
												
													
														|  | 
 |  | +        WHERE c.host_code = #{hostCode}
 | 
											
												
													
														|  | 
 |  | +          and c.device_code = #{channelCode}
 | 
											
												
													
														|  |      </select>
 |  |      </select>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      <select id="selectAppChannels" resultType="com.xunmei.iot.vo.videoDiagnosis.VideoDiagnosisAppPageChannelVo">
 |  |      <select id="selectAppChannels" resultType="com.xunmei.iot.vo.videoDiagnosis.VideoDiagnosisAppPageChannelVo">
 |