whycrzg
2021-02-23 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4
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.fgkj.controller.ram;
 
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.ram.FBS9100;
import com.fgkj.dto.ram.Fbs9100s_dcdc_state;
import com.fgkj.services.ram.Fbs9100s_dcdc_stateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import java.util.List;
 
@RequestMapping("fbs9100sDcDcState")
@RestController
@Api(tags = "fbs9100sDcDcState接口")
public class Fbs9100s_dcdc_stateController{
 
    @Resource
    private Fbs9100s_dcdc_stateService service;
 
    //根据设备id查询设备的充放电设备模块的参数信息
    @PostMapping("byCondition")
    @ApiOperation(notes = "", value = "设备id查询设备的充放电设备模块的参数信息")
    public ServiceModel serchByCondition(@RequestParam Integer dev_id) {
        FBS9100 fbs9100 = new FBS9100();
        Fbs9100s_dcdc_state fd = new Fbs9100s_dcdc_state();
        fd.setDev_id(dev_id);
        fbs9100.setFd(fd);
        ServiceModel model = service.serchByCondition(fbs9100);
        return model;
    }
 
    //刷新dcdc模块信息表格中数据
    @PutMapping("refreshTable")
    @ApiOperation(notes = "[{ \"fd\": { \"dev_id\": 910000001 } }]", value = "刷新dcdc模块信息表格中数据")
    public ServiceModel refreshTable(@RequestBody List<FBS9100> list) {
        // List<FBS9100> list= getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, new TypeToken<List<FBS9100>>(){}.getType());
        ServiceModel model = service.refreshTable(list);
 
        return model;
    }
 
}