java110
2020-10-14 cbc3f7e518adb722fa1a969ef10c8257773a5010
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
package com.java110.fee.api;
 
import com.java110.dto.meterWater.MeterWaterDto;
import com.java110.fee.bmo.meterWater.IQueryPreMeterWater;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@RequestMapping(value = "/meterWater")
public class MeterWaterApi {
 
 
    @Autowired
    private IQueryPreMeterWater queryPreMeterWaterImpl;
 
 
    /**
     * 查询上期度数信息
     *
     * @param communityId 小区ID
     * @return
     * @serviceCode /meterWater/queryPreMeterWater
     * @path /app/meterWater/queryPreMeterWater
     */
    @RequestMapping(value = "/queryPreMeterWater", method = RequestMethod.GET)
    public ResponseEntity<String> queryPreMeterWater(@RequestParam(value = "communityId") String communityId,
                                                     @RequestParam(value = "objId") String objId,
                                                     @RequestParam(value = "objType") String objType,
                                                     @RequestParam(value = "roomNum" ,required = false) String roomNum,
                                                     @RequestParam(value = "meterType",required = false) String meterType) {
        MeterWaterDto meterWaterDto = new MeterWaterDto();
        meterWaterDto.setObjId(objId);
        meterWaterDto.setObjType(objType);
        meterWaterDto.setPage(1);
        meterWaterDto.setRow(1);
        meterWaterDto.setCommunityId(communityId);
        meterWaterDto.setMeterType(meterType);
        return queryPreMeterWaterImpl.query(meterWaterDto,roomNum);
    }
}