/*
 * Author: wangjian
 * 生成controller
 */
package com.tofly.watermeter.controller;

import com.tofly.common.core.entity.ResultRespone;
import com.tofly.watermeter.service.WateryieldService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 取供水量数据存储表
 *
 * @author admin
 * @date Sat May 28 00:00:00 CST 2022
 */
@RestController
@AllArgsConstructor
@RequestMapping("/wateryield")
@Api(tags="取供水量数据存储表接口")
public class WateryieldController {

    private final WateryieldService wateryieldService;
    @GetMapping("/handleWaterYield")
    @ApiOperation("生成scada前一小时取供水量")
    public ResultRespone handleWaterYield(){
        return ResultRespone.success(wateryieldService.handleWaterYield());
    }

    @PutMapping("/updateMeterReadingInfo")
    @ApiOperation("修改抄表卡表数据")
    public ResultRespone updateMeterReadingInfo(String month){
        return ResultRespone.success(wateryieldService.updateMeterReadingInfo(month));
    }
}
