perryhsu
2020-09-30 3ab47f8fdd1da2c97917c38b2510855d7c3963c4
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
package com.fgkj.controller.ram.rt;
 
 
import com.fgkj.dto.Batt_Maint_Dealarm;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.rt.Rtstate_rtService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RequestMapping("rtStateRt")
@RestController
@Api
public class Rtstate_rtController{
 
    @Autowired
    private Rtstate_rtService service;
 
    //测试数据——实时查询中左下角的充放电统计
    @GetMapping("disOrCharge")
    public ServiceModel serchDisOrChargr(){
        ServiceModel model= service.serchDisOrChargr();
        return model;
    }
    
    //电池组实时情况+实时电池续航能力查询
    @GetMapping("battLife")
    public ServiceModel serchBattLife(@RequestBody Batt_Maint_Dealarm bmd){
        // Batt_Maint_Dealarm bmd = getGson().fromJson(json, Batt_Maint_Dealarm.class);
        ServiceModel model = service.serchBattLife(bmd);
        return model;
    }
    
    //首页上饼状图电池状态比例
    @GetMapping("battStateRate")
    public ServiceModel serchBattStateRate(){
        ServiceModel model = service.serchBattStateRate();
        return model;
    }
 
 
}