package com.fgkj.controller;
|
|
import com.fgkj.dto.Batt_history;
|
import com.fgkj.dto.ServiceModel;
|
import com.fgkj.services.Batt_historyService;
|
import com.fgkj.util.ActionUtil;
|
import io.swagger.annotations.Api;
|
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;
|
|
import javax.annotation.Resource;
|
|
@RequestMapping("battHistory")
|
@RestController
|
@Api
|
public class Batt_historyController{
|
|
@Resource
|
private Batt_historyService service;
|
|
//查询所有的历史实时数据
|
//TODO 数据库不同,使用这个表名测试 db_batt_history.tb_batt_910000001_2017_12
|
@GetMapping("serchByCondition")
|
public ServiceModel serchByCondition(@RequestBody Batt_history batt_his){
|
// Batt_history batt_his= ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_history.class);
|
ServiceModel model=service.serchByCondition(batt_his);
|
|
return model;
|
}
|
|
}
|