| | |
| | | @Autowired |
| | | private RmWorkReportHistoryMapper rmWorkReportHistoryMapperDao ;//控制器历史工作报数据DAO |
| | | @Autowired |
| | | private RmIntakeAmountDayLastMapper rmIntakeAmountDayLastMapperDao ;//取水口取水和漏损统计最新数据DAO |
| | | private RmIntakeAmountDayLastMapper rmIntakeAmountDayLastMapperDao ;//取水口取水统计最新数据DAO |
| | | @Autowired |
| | | private RmIntakeAmountDayMapper rmIntakeAmountDayMapperDao ;//取水口取水和漏损统计DAO |
| | | @Autowired |
| | | private RmClientAmountDayLastMapper rmClientAmountDayLastMapperDao ;//农户日用水量统计最新数据DAO |
| | | @Autowired |
| | | private RmClientAmountDayMapper rmClientAmountDayMapperDao ;//农户日用水量统计数据DAO |
| | | @Autowired |
| | | private RmLossLastMapper rmLossLastMapperDao ;//控制器漏损水量统计最新数据DAO |
| | | @Autowired |
| | |
| | | // |
| | | //////////////////////////////////////////////// |
| | | /** |
| | | * 得到控制器漏损水量统计最新记录 |
| | | * 得到最新记录 |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | |
| | | return null ; |
| | | } |
| | | /** |
| | | * 保存控制器漏损水量统计最新记录 |
| | | * 保存最新记录 |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | this.rmIntakeAmountDayLastMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | | * 保存控制器漏损水量统计最新记录 |
| | | * 保存记录 |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | this.rmIntakeAmountDayMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | | * 保存控制器漏损水量统计最新记录 |
| | | * 保存最新记录 |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateRmIntakeAmountLast(RmIntakeAmountDay po){ |
| | | this.rmIntakeAmountDayMapperDao.updateByPrimaryKey(po) ; |
| | | public void updateRmIntakeAmountLast(RmIntakeAmountDayLast po){ |
| | | this.rmIntakeAmountDayLastMapperDao.updateByPrimaryKey(po) ; |
| | | } |
| | | /** |
| | | * 保存控制器漏损水量统计最新记录 |
| | | * 保存历史记录 |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 得到控制器漏损水量统计历史记录中的最新记录 |
| | | * 得到符合条件的历史记录 |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | return rmIntakeAmountDayMapperDao.selectByPrimaryKey(id) ; |
| | | } |
| | | |
| | | ///////////////////////////////////////////////// |
| | | // |
| | | // 农户日用水量及花费统计功能 |
| | | // |
| | | //////////////////////////////////////////////// |
| | | /** |
| | | * 得到最新记录 |
| | | * @param clientId |
| | | * @return |
| | | */ |
| | | public RmClientAmountDayLast getRmClientAmountLast(Long clientId){ |
| | | List<RmClientAmountDayLast> list = rmClientAmountDayLastMapperDao.selectByClientId(clientId) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | | return null ; |
| | | } |
| | | /** |
| | | * 保存最新记录 |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveRmClientAmountLast(RmClientAmountDayLast po){ |
| | | this.rmClientAmountDayLastMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | | * 保存记录 |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveRmClientAmountDay(RmClientAmountDay po){ |
| | | this.rmClientAmountDayMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | | * 更新最新记录 |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateRmClientAmountLast(RmClientAmountDayLast po){ |
| | | this.rmClientAmountDayLastMapperDao.updateByPrimaryKey(po) ; |
| | | } |
| | | /** |
| | | * 更新记录 |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateRmClientAmountDay(RmClientAmountDay po){ |
| | | this.rmClientAmountDayMapperDao.updateByPrimaryKey(po) ; |
| | | } |
| | | |
| | | /** |
| | | * 得到控制器漏损水量统计最新记录 |
| | | * 得到符合条件的历史记录 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public RmClientAmountDay getRmClientAmountDay(Long id){ |
| | | return rmClientAmountDayMapperDao.selectByPrimaryKey(id) ; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 得到符合条件的历史记录 |
| | | * @param clientId |
| | | * @param dt |
| | | * @return |
| | | */ |
| | | public RmIntakeAmountDay getRmIntakeAmountLastByDate(Date dt){ |
| | | List<RmIntakeAmountDay> list = rmIntakeAmountDayMapperDao.selectByDate(dt) ; |
| | | public RmClientAmountDay getRmClientAmountByClientAndDate(Long clientId, Date dt){ |
| | | List<RmClientAmountDay> list = rmClientAmountDayMapperDao.selectByClientAndDate(clientId, dt) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | | return null ; |
| | | } |
| | | |
| | | /** |
| | | * 得到控制器漏损水量统计历史记录中的某日记录 |
| | | * @param dt |
| | | * @return |
| | | */ |
| | | public RmIntakeAmountDay getRmIntakeAmountDayByDate(Date dt){ |
| | | List<RmIntakeAmountDay> list = rmIntakeAmountDayMapperDao.selectByDate(dt) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | | return null ; |
| | | } |
| | | |
| | | ///////////////////////////////////////////////// |
| | | // |