| | |
| | | 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(); |
| | | } |
| | |
| | | return service.getExperimentId(type); |
| | | } |
| | | |
| | | @PostMapping("kz") |
| | | @ApiOperation(value = "新增试验-空载") |
| | | public Response addKZ(@RequestBody Experiment<ExperimentBaseDataKZ, ExperimentPoint> experiment){ |
| | | return service.addKZ(experiment); |
| | | @PostMapping("kzfz") |
| | | @ApiOperation(value = "新增试验-空载/负载") |
| | | public Response addKZFZ(@RequestBody Experiment<ExperimentBaseDataKZ, ExperimentPoint> experiment){ |
| | | return service.addKZFZ(experiment); |
| | | } |
| | | |
| | | @GetMapping("checkPrecondition") |
| | |
| | | "振动: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); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @PostMapping("startExperimentPoint") |
| | | @ApiOperation(value = "启动测试点") |
| | | @ApiOperation(value = "启动测试点",notes = "传入id,duration") |
| | | public Response StartExperimentPoint(@RequestBody ExperimentPoint point){ |
| | | 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") |