| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.text.ParseException; |
| | | import java.time.LocalDate; |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | |
| | | return rsVo ; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 指定时间段内用水量超过指定值的取水口 |
| | | * @param qo |
| | |
| | | qo.setValue(0.0); |
| | | } |
| | | |
| | | |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); |
| | | Long itemTotal = rmOpenCloseValveHistoryMapper.getUseWaterGtValueIntakesCount(params); |
| | | |
| | |
| | | rsVo.obj = rmOpenCloseValveHistoryMapper.getUseWaterGtValueIntakes(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 指定时间段内消费金额超过指定值的取水口 |
| | |
| | | rsVo.obj = rmOpenCloseValveHistoryMapper.getExpenseGtValueIntakes(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 指定时间段内用水时长超过指定值的取水口 |
| | |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoDayIntakeAmount>> getDayIntakeAmount(IntakeAmountQO qo) { |
| | | Integer year = qo.getYearMonth().getYear(); |
| | | Integer month = qo.getYearMonth().getMonthValue(); |
| | | public QueryResultVo<List<VoDayIntakeAmount>> getDayIntakeAmount(IntakeAmountQO qo) throws ParseException { |
| | | String yearMonth = qo.getYearMonth(); |
| | | Integer year = Integer.parseInt(yearMonth.substring(0,4)); |
| | | Integer month = Integer.parseInt(yearMonth.substring(5,7)); |
| | | qo.setYear(year); |
| | | qo.setMonth(month); |
| | | |
| | |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoDayLoss>> getDayLossAmount(IntakeAmountQO qo) { |
| | | //Calendar calendar = Calendar.getInstance(); |
| | | //Integer year = Optional.ofNullable(qo.getYear()).orElse(calendar.get(Calendar.YEAR)); |
| | | //Integer month = Optional.ofNullable(qo.getMonth()).orElse(calendar.get(Calendar.MONTH)); |
| | | Integer year = qo.getYearMonth().getYear(); |
| | | Integer month = qo.getYearMonth().getMonthValue(); |
| | | public QueryResultVo<List<VoDayLoss>> getDayLossAmount(IntakeAmountQO qo) throws ParseException { |
| | | String yearMonth = qo.getYearMonth(); |
| | | Integer year = Integer.parseInt(yearMonth.substring(0,4)); |
| | | Integer month = Integer.parseInt(yearMonth.substring(5,7)); |
| | | qo.setYear(year); |
| | | qo.setMonth(month); |
| | | |