| | |
| | | package com.dy.rtuMw.server.rtuData.dbSv; |
| | | |
| | | import com.dy.common.util.NumUtil; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pipIrrGlobal.daoBa.BaClientMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerTrampMapper; |
| | | import com.dy.pipIrrGlobal.daoRm.*; |
| | | import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper; |
| | | import com.dy.pipIrrGlobal.daoSe.SeVirtualCardMapper; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaClient; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import com.dy.pipIrrGlobal.pojoRm.*; |
| | |
| | | @Autowired |
| | | private RmClientAmountDayMapper rmClientAmountDayMapperDao ;//农户日用水量统计数据DAO |
| | | @Autowired |
| | | private RmLossLastMapper rmLossLastMapperDao ;//控制器漏损水量统计最新数据DAO |
| | | private RmLossDayLastMapper rmLossLastMapperDao ;//控制器漏损水量统计最新数据DAO |
| | | @Autowired |
| | | private RmLossHistoryMapper rmLossHistoryMapperDao ;//控制器漏损水量统计历史数据DAO |
| | | private RmLossDayMapper rmLossHistoryMapperDao ;//控制器漏损水量统计历史数据DAO |
| | | @Autowired |
| | | private RmCommandHistoryMapper rmCommandHistoryDao ;//远程命令日志相关 |
| | | @Autowired |
| | |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | public RmLossLast getRmLossLast(Long intakeId){ |
| | | List<RmLossLast> list = rmLossLastMapperDao.selectByIntakeId(intakeId) ; |
| | | public RmLossDayLast getRmLossLast(Long intakeId){ |
| | | List<RmLossDayLast> list = rmLossLastMapperDao.selectByIntakeId(intakeId) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveRmLossLast(RmLossLast po){ |
| | | public void saveRmLossLast(RmLossDayLast po){ |
| | | this.rmLossLastMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveRmLossHistory(RmLossHistory po){ |
| | | public void saveRmLossHistory(RmLossDay po){ |
| | | this.rmLossHistoryMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateRmLossLast(RmLossLast po){ |
| | | public void updateRmLossLast(RmLossDayLast po){ |
| | | this.rmLossLastMapperDao.updateByPrimaryKey(po) ; |
| | | } |
| | | /** |
| | |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateRmLossHistory(RmLossHistory po){ |
| | | public void updateRmLossHistory(RmLossDay po){ |
| | | this.rmLossHistoryMapperDao.updateByPrimaryKey(po) ; |
| | | } |
| | | |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public RmLossHistory getRmLossHistory(Long id){ |
| | | public RmLossDay getRmLossHistory(Long id){ |
| | | return rmLossHistoryMapperDao.selectByPrimaryKey(id) ; |
| | | } |
| | | |
| | |
| | | * @param dt |
| | | * @return |
| | | */ |
| | | public RmLossLast getRmLossLastByDate(Date dt){ |
| | | List<RmLossLast> list = rmLossLastMapperDao.selectByDate(dt) ; |
| | | public RmLossDayLast getRmLossLastByDate(Date dt){ |
| | | List<RmLossDayLast> list = rmLossLastMapperDao.selectByDate(dt) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | |
| | | * @param dt |
| | | * @return |
| | | */ |
| | | public RmLossHistory getRmLossHistoryByDate(Date dt){ |
| | | List<RmLossHistory> list = rmLossHistoryMapperDao.selectByDate(dt) ; |
| | | public RmLossDay getRmLossHistoryByDate(Date dt){ |
| | | List<RmLossDay> list = rmLossHistoryMapperDao.selectByDate(dt) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |