package com.gkhy.safePlatform.safeCheck.repository; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.gkhy.safePlatform.safeCheck.entity.SafeCheckTaskAndQuota; import com.gkhy.safePlatform.safeCheck.entity.WorkOrderRelatedDataDO; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.Date; import java.util.List; @Repository public interface SafeCheckTaskAndQuotaRepository extends BaseMapper { /** * @description 将任务关联的指标插入到任务指标关联表中 */ int saveTaskAndQuotas(@Param("taskAndQuotas") List taskAndQuotas); /** * @description 根据任务id获取所有的任务关联的巡检点 */ List findTaskAndQuotaByTaskId(@Param("id") Long taskId); /** * @description 根据任务与巡检点关联表查询数据 */ SafeCheckTaskAndQuota getTaskAndQuotaById(@Param("id") int taskAndQuotaId); /** * @description 将任务关联的巡检点rfid相同的数据rfid定位状态都改为已定位 */ int updateRfidPositionStatusByTaskIdAndRfid(@Param("taskId") Long taskId, @Param("rfid") String rfid, @Param("rifdPositionStatus") Byte rifdPositionStatus); /** * @description 统计同一个任务的巡检点rfid相同的数量 */ int countRfidSameByTaskId(Long taskId, String rfid); /** * @description 将巡检点检查结果信息进行修改 */ int updatePointCheckResultByIdAndTaskId(@Param("taskAndQuota") SafeCheckTaskAndQuota safeCheckTaskAndQuota); /** * @description 查询该任务下巡检点是否还有没有定位的 */ List selectNoRfidPositionByTaskId(Long taskId); /** * @description 查询该任务下巡检点是否还有没提交的 */ List selectRfidNoReportByTaskId(Long taskId); /** * @description 统计巡检点中是否存在巡检异常的数据 */ int countRfidReportIsAbnormalByTaskId(Long taskId, Byte reportResult); /** * @description 根据任务id查询所有的巡检链数据 */ List listTaskAndQuotaByTaskId(Long taskId); /** * @description 根据任务id和巡检点对应的id查询巡检记录 */ SafeCheckTaskAndQuota getTaskAndQuotaByIdAndTaskId(int id, Long taskId); /** * 根据巡检指标id查询所有相关的数据rifd、region、point */ WorkOrderRelatedDataDO getWorkOrderRelatedData(@Param("id") int id); }