| | |
| | | LoginUser user= (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); |
| | | String exceptionInfo = ""; |
| | | String msgInfo = ""; |
| | | int exceptionNum = 0; |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | MultipartFile file = entity.getValue(); |
| | |
| | | maintenanceStandardService.save(maintenanceStandard); |
| | | } |
| | | else { |
| | | msgInfo += equipment.getNum()+ ","; |
| | | continue; |
| | | } |
| | | } |
| | | else { |
| | | |
| | | continue; |
| | | } |
| | | } |
| | |
| | | maintenanceStandardService.save(maintenanceStandard); |
| | | } |
| | | else { |
| | | msgInfo += equipment.getNum()+ ","; |
| | | continue; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | return Result.OK("导入成功"); |
| | | if(msgInfo == ""){ |
| | | return Result.OK("导入成功"); |
| | | }else{ |
| | | return Result.OK("统一编码是:"+msgInfo+"的保养标准已存在,请先手动失效再重新导入!"); |
| | | } |
| | | } else { |
| | | System.out.println("无法解析该文件"); |
| | | } |