whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/controller/InterFaceController.java
@@ -10,12 +10,13 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.security.NoSuchAlgorithmException;
import java.text.ParseException;
@RequestMapping("interface")
@RestController
@Api(tags = "第三方接口")
public class InterFaceController {
public class InterFaceController extends BaseController{
    @Resource
    private InterfaceService service;
    @GetMapping("/getBattInf")
@@ -99,7 +100,7 @@
    @GetMapping("/createInterface")
    @ApiOperation("生成第三方验证码")
    public Response createInterface(@RequestParam String interfaceName) {
    public Response createInterface(@RequestParam String interfaceName) throws NoSuchAlgorithmException {
        return service.createInterface(interfaceName);
    }
@@ -143,4 +144,14 @@
    public Response getBattHistoryDataList(@RequestBody BattRealdata data, @RequestParam String interfaceNumber) throws ParseException, InterruptedException {
        return service.getBattHistoryDataList(data, interfaceNumber);
    }
    /**
     * 1.电池基本信息:电池品牌、电池型号、投入使用时间、标称容量、电池组id
     * 2.运行数据:实际容量、电池组数、负载电流、续航时长
     */
    @GetMapping("/getBattGroupDataList")
    @ApiOperation("获取电池的数据信息,以上注释包含所有细节")
    public Response getBattGroupDataList(@RequestParam String stationId, @RequestParam String interfaceNumber){
        return service.getBattGroupDataList(stationId, interfaceNumber);
    }
}