| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.Experiment; |
| | | import com.whyc.pojo.ExperimentWindingStep1; |
| | |
| | | import com.whyc.service.WindingExperimentService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Api(tags = "绕组试验") |
| | | public class WindingExperimentController { |
| | | |
| | | /** |
| | | * 绕组试验 |
| | | * winding |
| | | * 电流 电压 |
| | | * Current |
| | | * 电阻 |
| | | * |
| | | * 温度 |
| | | */ |
| | | |
| | | @Autowired |
| | | private WindingExperimentService service; |
| | | |
| | |
| | | return service.addExperimentWindingStep2(windingStep2s); |
| | | } |
| | | |
| | | @GetMapping("getWindingStep1") |
| | | @ApiOperation(value = "实验数据1") |
| | | public Response<PageInfo<ExperimentWindingStep1>> getExperimentWindingStep1(@RequestParam int pageNum, @RequestParam int pageSize){ |
| | | |
| | | return service.getExperimentWindingStep1(pageNum,pageSize); |
| | | } |
| | | |
| | | @GetMapping("getWindingStep2") |
| | | @ApiOperation(value = "实验数据2") |
| | | public Response<PageInfo<ExperimentWindingStep2>> getExperimentWindingStep2(@RequestParam int pageNum, @RequestParam int pageSize){ |
| | | |
| | | return service.getExperimentWindingStep2(pageNum,pageSize); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("delExperimentWinding") |
| | | @ApiOperation(value = "删除绕组实验数据",notes = "根据唯一试验编号删除试验数据") |
| | | public Response delExperimentWindingbyId(@ApiParam(value = "试验编号",required = true) @RequestParam String experimentId){ |
| | | |
| | | return service.delExperimentWindingbyId(experimentId); |
| | | } |
| | | |
| | | @PostMapping("updateWindingStep1") |
| | | @ApiOperation(value = "编辑试验数据1",notes = "根据试验编号experimentId编辑试验数据") |
| | | public Response updateExperimentWindingStep1ById(@RequestBody List<ExperimentWindingStep1> windingStep1s){ |
| | | |
| | | return service.updateExperimentWindingStep1(windingStep1s); |
| | | } |
| | | |
| | | |
| | | @PostMapping("updateWindingStep2") |
| | | @ApiOperation(value = "编辑试验数据2",notes = "根据试验编号experimentId编辑试验数据") |
| | | public Response updateExperimentWindingStep2ById(@RequestBody List<ExperimentWindingStep2> windingStep2s){ |
| | | |
| | | return service.updateExperimentWindingStep2(windingStep2s); |
| | | } |
| | | |
| | | } |