whycxzp
2023-02-28 68f2fe1b48c0fde06b13a09efbd8e591620e6b09
src/main/java/com/whyc/controller/ECRController.java
@@ -11,6 +11,7 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;
import java.util.Date;
@@ -48,7 +49,9 @@
    @ApiOperation("分页查询ECR记录")
    @GetMapping("searchEcr")
    public Response searchEcr(@RequestParam String number, @RequestParam String subCode, @RequestParam String subModel,
    public Response searchEcr(@RequestParam(required = false) String number,
                              @RequestParam(required = false) String subCode,
                              @RequestParam(required = false) String subModel,
                              @RequestParam String createTime, @RequestParam String createTime1,
                              @RequestParam int pageCurr, @RequestParam int pageSize){
        Date testTime1= null;
@@ -61,4 +64,19 @@
        }
        return service.searchEcr(number,subCode,subModel,testTime1,testTime2,pageCurr,pageSize);
    }
    @ApiOperation("导出所有记录")
    @GetMapping("exportExcel")
    public void exportExcel(HttpServletResponse response){
        service.exportExcel(response);
    }
    @ApiOperation("删除ECR记录")
    @GetMapping("deleteEcr")
    public Response deleteEcr( @RequestParam int id,
                               @RequestParam(required = false) String filePath){
        return service.deleteEcr(id,filePath);
    }
}