WaterMeterController.java
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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);
}
}