src/main/java/com/whyc/controller/SoftwareController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/SoftwareService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
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; @@ -23,7 +22,7 @@ @Autowired private SoftwareService service; @ApiModelProperty("excel解析") @ApiOperation("excel解析") @PostMapping("excelParse") public Response excelParse(@RequestParam MultipartFile multipartFile) throws IOException, InvalidFormatException, ParseException { Response<Object> response = new Response<>(); @@ -38,6 +37,13 @@ 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 ){ src/main/java/com/whyc/service/SoftwareService.java
@@ -5,7 +5,6 @@ import com.whyc.dto.Response; import com.whyc.mapper.SoftwareMapper; import com.whyc.pojo.Software; import com.whyc.util.DateUtil; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; @@ -54,8 +53,7 @@ common.setBasedVersion(sheet.getRow(4).getCell(4).getStringCellValue()); common.setOwner(sheet.getRow(5).getCell(2).getStringCellValue()); String filingDateStr = sheet.getRow(5).getCell(4).getStringCellValue(); Date filingDate = DateUtil.YYYY_MM_DD.parse(filingDateStr); Date filingDate = sheet.getRow(5).getCell(4).getDateCellValue(); common.setFilingDate(filingDate); //最后一行,取发布说明 common.setReleaseNotes(sheet.getRow(lastRowNum).getCell(2).getStringCellValue());