package com.zcxk.rmcp.web.controller;

import com.zcxk.core.common.pojo.AjaxMessage;
import com.zcxk.core.common.pojo.TotalResult;
import com.zcxk.core.common.util.BeanCopyUtils;
import com.zcxk.core.utils.DateUtil;
import com.zcxk.rmcp.api.vo.MeterReadRecordAggregationVo;
import com.zcxk.rmcp.core.entity.MeterReadWaterRecord;
import com.zcxk.rmcp.web.service.MeterReadWaterRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author Andy
 * @version V1.0
 * @description: 用水记录
 * @date 2021/7/22
 **/
@Controller
@ResponseBody
@RequestMapping("/water/record")
@Api(tags = "用水记录")
public class WaterRecordController extends BaseController {

    @Resource
    private MeterReadWaterRecordService meterReadWaterRecordService;

    @RequestMapping(value = "/statistics/recent15days", method = RequestMethod.POST)
    @ApiOperation(value = "统计近15天用水量")
    public AjaxMessage<TotalResult> statisticsRecent15Days() {
        return AjaxMessage.success(meterReadWaterRecordService.statisticsRecent15Days());
    }

}
