| | |
| | | import com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote; |
| | | import com.dy.pipIrrGlobal.daoAllRound.Ar4BaseMapper; |
| | | import com.dy.pipIrrGlobal.daoAllRound.Ar4RemoteMapper; |
| | | import com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper; |
| | | import com.dy.pipIrrGlobal.rtuMw.CodeLocal; |
| | | import com.dy.pipIrrGlobal.rtuMw.Web2RtuMw; |
| | | import com.dy.pipIrrGlobal.voPr.VoOnLineIntake; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.env.Environment; |
| | |
| | | * 取水口基本信息 |
| | | * @return 取水口基本信息 |
| | | */ |
| | | public QueryResultVo<VoArIntakeRemote> intakeInfo(Long intakeId){ |
| | | public VoArIntakeRemote intakeInfo(Long intakeId){ |
| | | VoArIntakeRemote rVo = new VoArIntakeRemote() ; |
| | | String rtuAddr = this.getRtuAddr(intakeId); |
| | | this.getRtuOnLine(intakeId, rtuAddr, rVo); |
| | | this.getAlarmInfo(intakeId, rtuAddr, rVo); |
| | | this.getOpenCloseValveInfo(intakeId, rtuAddr, rVo); |
| | | return null ; |
| | | this.getAlarmLastInfo(intakeId, rtuAddr, rVo); |
| | | this.getOpenCloseValveLastInfo(intakeId, rtuAddr, rVo); |
| | | this.getLossAmountLastInfo(intakeId, rtuAddr, rVo); |
| | | return rVo ; |
| | | } |
| | | |
| | | /** |
| | |
| | | * 得到取水口最新报警信息 |
| | | * @param intakeId |
| | | */ |
| | | private void getAlarmInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.alarmInfo(intakeId); |
| | | private void getAlarmLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.alarmLastInfo(intakeId); |
| | | if(list != null && list.size() > 0){ |
| | | VoArIntakeRemote vo = list.get(0) ; |
| | | rVo.alarm = vo.alarm ; |
| | |
| | | * 得到取水口最新开关阀信息 |
| | | * @param intakeId |
| | | */ |
| | | private void getOpenCloseValveInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.openCloseValveInfo(intakeId); |
| | | private void getOpenCloseValveLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.openCloseValveLastInfo(intakeId); |
| | | if(list != null && list.size() > 0){ |
| | | VoArIntakeRemote vo = list.get(0) ; |
| | | rVo.lastOpenDt = vo.lastOpenDt ; |
| | | rVo.lastCloseDt = vo.lastCloseDt ; |
| | | } |
| | | } |
| | | /** |
| | | * 得到取水口最新漏损信息 |
| | | * @param intakeId |
| | | */ |
| | | private void getLossAmountLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.lossLastInfo(intakeId); |
| | | if(list != null && list.size() > 0){ |
| | | VoArIntakeRemote vo = list.get(0) ; |
| | | rVo.lossDt = vo.lossDt ; |
| | | rVo.lossAmount = vo.lossAmount ; |
| | | } |
| | | } |
| | | } |