| | |
| | | resources.setContractNumber(contractNumber.toString()); |
| | | if (companyId != null) { |
| | | resources.setCompanyId(companyId); |
| | | } else { |
| | | throw new BadRequestException("未匹配到所属公司,所属公司不能为空。"); |
| | | } |
| | | } |
| | | |
| | |
| | | throw new BadRequestException("上传失败"); |
| | | } |
| | | |
| | | File uploadFile = FileUtil.toFile(file); |
| | | String suffix = FileUtil.getExtensionName(file.getOriginalFilename()); |
| | | String type = FileUtil.getFileType(suffix); |
| | | File uploadFile = FileUtil.upload(file, properties.getPath().getPath() + type + File.separator); |
| | | ExcelReader reader = ExcelUtil.getReader(uploadFile); |
| | | List<Map<String,Object>> readAll = reader.readAll(); |
| | | if (ObjectUtil.isNull(readAll)) { |