whycxzp
2021-06-03 0ed39bd9a35a51a118f54b6c3fea792294431a2f
src/main/java/com/whyc/controller/ExperimentController.java
@@ -22,7 +22,7 @@
    private ExperimentService service;
    @GetMapping("exist")
    @ApiOperation(value = "查询是否当前有试验",notes = "如果有,code=1,返回试验的基础数据;如果没有,code=-1")
    @ApiOperation(value = "查询当前是否有正在进行的试验",notes = "如果有,code=1,返回试验的基础数据;如果没有,code=-1")
    public Response exist(){
        return service.exist();
    }
@@ -59,8 +59,15 @@
            "振动:zd,\n" +
            "耐压:ny,\n" +
            "转动惯量:zdgl,\n")
    public Response checkPrecondition(String type){
    public Response checkPrecondition(@RequestParam String type){
        return service.checkPrecondition(type);
    }
    @PutMapping("precondition")
    @ApiOperation(value = "设置前置条件",notes = "id:进线屏开关状态-1,大功率整流电源-2,..." +
            "value:开关信号:关-0,开-1,数值信号:电源-开-500-关-400,A排-开-500-关-400,B排-开-0-关-100")
    public Response setPrecondition(@RequestParam Integer id,@RequestParam Integer value){
        return service.setPrecondition(id,value);
    }
    /**
@@ -88,6 +95,24 @@
        return service.startExperimentPoint(point);
    }
    @PostMapping("finishExperiment")
    @ApiOperation(value = "完成实验")
    public Response finishExperiment(@RequestParam String experimentId){
        return service.finishExperiment(experimentId);
    }
    @PostMapping("finishExperimentPoint")
    @ApiOperation(value = "结束测试点")
    public Response finishExperimentPoint(@RequestParam Integer id){
        return service.finishExperimentPoint(id);
    }
    @PostMapping("restartExperimentPoint")
    @ApiOperation(value = "重做测试点")
    public Response restartExperimentPoint(@RequestParam Integer id){
        return service.restartExperimentPoint(id);
    }
    /*======History======*/
    @PostMapping("page")