|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoCommand; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoRtuAndVc; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoUnclosedParam; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoUnclosedValve; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Param; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author ZhuBaoMin | 
|---|
|  |  |  | * @date 2024-05-24 10:46 | 
|---|
|  |  |  | * @LastEditTime 2024-05-24 10:46 | 
|---|
|  |  |  | * @date 2024-07-17 10:31 | 
|---|
|  |  |  | * @LastEditTime 2024-07-17 10:31 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | public interface RmCommandHistoryMapper extends BaseMapper<RmCommandHistory> { | 
|---|
|  |  |  | int deleteByPrimaryKey(Long id); | 
|---|
|  |  |  | int deleteByPrimaryKey(Long comId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int insert(RmCommandHistory record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int insertSelective(RmCommandHistory record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | RmCommandHistory selectByPrimaryKey(Long id); | 
|---|
|  |  |  | RmCommandHistory selectByPrimaryKey(Long comId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int updateByPrimaryKeySelective(RmCommandHistory record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int updateByPrimaryKey(RmCommandHistory record); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据操作员ID获取未关阀记录(包含在线情况) | 
|---|
|  |  |  | * @param onLineMap | 
|---|
|  |  |  | * 根据operator获取未关阀的RTU地址及虚拟卡编号数据对,获取未关阀记录使用 | 
|---|
|  |  |  | * @param operator | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoUnclosedValve> getUnclosedValves(@Param("onLineMap") String onLineMap, @Param("operator") Long operator); | 
|---|
|  |  |  | List<VoRtuAndVc> getUnclosedRtus(Long operator); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据RTU地址和虚拟卡编号获取成功开阀的最后一条记录,获取未关阀记录使用 | 
|---|
|  |  |  | * @param rtuAddr | 
|---|
|  |  |  | * @param vcNum | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getLastComId(@Param("rtuAddr")String rtuAddr, @Param("vcNum")String vcNum); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据命令日志编号集合获取未关阀记录 | 
|---|
|  |  |  | * @param onLineMap | 
|---|
|  |  |  | * @param comIds | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoUnclosedValve> getUnclosedValves(@Param("onLineMap") String onLineMap, @Param("comIds") String comIds); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据取水口ID获取该取水口未关阀参数,平台选择取水口关阀使用 | 
|---|
|  |  |  | * @param intakeId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | //VoUnclosedParam getUncloseParam(Long intakeId); | 
|---|
|  |  |  | VoUnclosedParam getUncloseParam(@Param("onLineMap") String onLineMap, @Param("intakeId")Long intakeId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取命令日志历史记录总数 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Long getCommandHistoriesCount(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取命令日志历史记录 | 
|---|
|  |  |  | * @param params | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<VoCommand> getCommandHistories(Map<?, ?> params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据命令日志ID获取预约时间,向虚拟卡写开阀时间用 | 
|---|
|  |  |  | * @param commId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | String getTimeByCommId(Long commId); | 
|---|
|  |  |  | } | 
|---|