From 7dd8a7a631875d68d6409f5086041d474d9226a8 Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期三, 07 九月 2022 11:06:45 +0800 Subject: [PATCH] 软件excel解析 --- src/main/java/com/whyc/controller/SoftwareController.java | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/whyc/controller/SoftwareController.java b/src/main/java/com/whyc/controller/SoftwareController.java index d8fb87c..cfa34a0 100644 --- a/src/main/java/com/whyc/controller/SoftwareController.java +++ b/src/main/java/com/whyc/controller/SoftwareController.java @@ -4,7 +4,6 @@ import com.whyc.pojo.Software; import com.whyc.service.SoftwareService; import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.springframework.beans.factory.annotation.Autowired; @@ -12,6 +11,7 @@ import org.springframework.web.multipart.MultipartFile; import java.io.IOException; +import java.text.ParseException; import java.util.List; @Api(tags = "杞欢绠$悊-鏂扮増") @@ -22,9 +22,9 @@ @Autowired private SoftwareService service; - @ApiModelProperty("excel瑙f瀽") + @ApiOperation("excel瑙f瀽") @PostMapping("excelParse") - public Response excelParse(@RequestParam MultipartFile multipartFile) throws IOException, InvalidFormatException { + public Response excelParse(@RequestParam MultipartFile multipartFile) throws IOException, InvalidFormatException, ParseException { Response<Object> response = new Response<>(); String name=multipartFile.getOriginalFilename(); assert name != null; @@ -37,11 +37,24 @@ return response; } + @ApiOperation("杞欢涓婁紶") + @PostMapping("upload") + public Response upload(@RequestParam MultipartFile file1,@RequestParam MultipartFile file2,@RequestParam String softwareStr){ + + return null; + } + @ApiOperation(value = "鏌ヨ杞欢鍒楄〃鐨勪俊鎭�") @GetMapping("getAllSoftware") public Response getAllSoftware(@RequestParam(required = false) String fileName,@RequestParam int pageCurr,@RequestParam int pageSize ){ return service.getAllSoftware(fileName,pageCurr,pageSize); } + @ApiOperation(value = "鏍规嵁subcode鏌ヨ杞欢鍒楄〃") + @GetMapping("getSoftBySubCode") + public Response getSoftBySubCode(@RequestParam String subCode ){ + return service.getSoftBySubCode(subCode); + } + } -- Gitblit v1.9.1