WaterMeterController.java 1.5 KB
package com.sunyo.energy.location.controller;

import com.sunyo.energy.location.controller.response.ResultJson;
import com.sunyo.energy.location.model.WaterElectricityParameter;
import com.sunyo.energy.location.model.WaterMeter;
import com.sunyo.energy.location.service.WaterMeterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/water_meter")
public class WaterMeterController {

    @Autowired
    private WaterMeterService waterMeterService;

//    /**
//     * 水表实施信息入库
//     * @param resultJson
//     * @return
//     */
//    @RequestMapping("/realTime")
//    @ResponseBody
//    public ResultJson realTime(ResultJson resultJson){
//        int i = waterMeterService.realTime();
//        if (i>0){
//            resultJson.setCode("200");
//            resultJson.setMsg("操作成功");
//        }else {
//            resultJson.setCode("500");
//            resultJson.setMsg("操作失败");
//        }
//
//        return resultJson;
//    }

    /**
     * 水表单个实施信息查询
     */
    @RequestMapping("/findRealTime")
    @ResponseBody
    public WaterMeter findRealTime(@RequestParam(value = "wmId", required = false) String wmId){

        return waterMeterService.findRealTime(wmId);
    }
    
}