whycxzp
2021-05-19 69bba5061c7be58aa8a16f3fb3756bb58cb7139e
src/main/java/com/whyc/controller/ExperimentController.java
@@ -4,6 +4,8 @@
import com.whyc.dto.ExperimentConditionDTO;
import com.whyc.dto.Response;
import com.whyc.pojo.Experiment;
import com.whyc.pojo.ExperimentBaseData;
import com.whyc.pojo.ExperimentBaseDataKZ;
import com.whyc.service.ExperimentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -18,6 +20,41 @@
    @Autowired
    private ExperimentService service;
    @GetMapping("experimentId")
    @ApiOperation(value = "查询当前试验编号",notes = "传入的type选择其一:" +
            "绕组:rz,\n" +
            "空载:kz,\n" +
            "负载:fz,\n" +
            "升温:sw,\n" +
            "超速:cs,\n" +
            "空载反电动势:kzfdds,\n" +
            "振动:zd,\n" +
            "耐压:ny,\n" +
            "转动惯量:zdgl,\n")
    public Response getExperimentId(@RequestParam String type){
        return service.getExperimentId(type);
    }
    @PostMapping
    @ApiOperation(value = "新增试验-空载")
    public Response addKZ(@RequestBody Experiment<ExperimentBaseDataKZ> experiment){
        return service.addKZ(experiment);
    }
    @GetMapping
    @ApiOperation(value = "查询试验-空载")
    public Response<Experiment<ExperimentBaseDataKZ>> add(){
        return null;
    }
    /*======History======*/
    @PostMapping("page")
    @ApiOperation(value = "查询历史分页-根据条件筛选")
    public Response<PageInfo<Experiment>> getPage(@RequestParam Integer pageNum,