whycxzp
2024-01-13 c628cbf7942988ef5d0c6dd7fae447a6099a492b
src/main/java/com/whyc/controller/FileParamController.java
@@ -2,12 +2,10 @@
import com.whyc.dto.ActionUtil;
import com.whyc.dto.Response;
import com.whyc.pojo.FileParam;
import com.whyc.service.FileParamService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;
import java.text.ParseException;
@@ -25,12 +23,15 @@
    public Response getMonVolStd(){
        return service.getMonVolStd();
    }
    @ApiOperation("按照筛选条件查询数据库信息")
    @GetMapping("getDataByCondition")
    public Response getDataByCondition(@RequestParam(required = false ,defaultValue = "1982-01-01 00:00:00") String startTime
                                       , @RequestParam(required = false,defaultValue = "2222-01-01 00:00:00") String endTime
                                       , @RequestParam(required = false) int battVol)  {
                                       , @RequestParam(required = false) String battVol
                                       ,@RequestParam(required = false ,defaultValue = "1") int pageCurr
                                       ,@RequestParam(required = false ,defaultValue = "10") int pageSize
                                       ,@RequestParam(required = false ,defaultValue = "0") int flag)  {
        Date testTime1= null;
        Date testTime2= null;
        try {
@@ -39,20 +40,18 @@
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return service.getDataByCondition(testTime1,testTime2,battVol);
        return service.getDataByCondition(testTime1,testTime2,battVol,pageCurr,pageSize,flag);
    }
    @ApiOperation("删除基站下数据")
    @GetMapping("deleteDataById")
    public Response deleteDataById(@RequestParam int stationId,@RequestParam int fileId){
        return service.deleteDataById(stationId,fileId);
    }
    @ApiOperation("分级评价-系数及阈值查询")
    @GetMapping("factorsAndThreshold")
    public Response getFactorsAndThreshold(@RequestParam String fileId){
        FileParam param =  service.getFactorsAndThreshold(fileId);
        return new Response().set(1,param);
    @ApiOperation("根据fileId获取参数信息")
    @GetMapping("getParamByFileId")
    public Response getParamByFileId(@RequestParam int fileId){
        return service.getParamByFileId(fileId);
    }
    @ApiOperation("分级评价-系数及阈值更新及禁用启用")
    @PutMapping("factorsAndThreshold")
    public Response updateFactorsAndThreshold(@RequestBody FileParam param){
        service.updateFactorsAndThreshold(param);
        return new Response().set(1,"更新完成");
    }
}