| | |
| | | import java.io.IOException; |
| | | import java.text.ParseException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RequestMapping("sop") |
| | | @RestController |
| | |
| | | if(!name.substring(name.length()-4).equals(".xls") && !name.substring(name.length()-5).equals(".xlsx")){ |
| | | response.set(1,false,"文件解析错误:上传格式非excel格式"); |
| | | }else{ |
| | | response = service.excelParse(multipartFile.getInputStream()); |
| | | response = service.excelParse(multipartFile); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | @ApiOperation("确定sop") |
| | | @PostMapping("confirm") |
| | | public Response add(@RequestBody SOP sop) { |
| | | public Response add(@RequestBody SOP sop) throws IOException { |
| | | return service.add(sop); |
| | | } |
| | | |