| | |
| | | * @param selectBtm 选择导入到的业务类型 |
| | | * @return |
| | | */ |
| | | @PostMapping("/impUiContextData") |
| | | @PostMapping("/impUIContextData") |
| | | public BaseResult impUIContextData(MultipartFile file, boolean isCovered,String selectBtm){ |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); |
| | | File file1 = new File(excelFileName); |
| | | File file1 = null; |
| | | try { |
| | | file.transferTo(new File(excelFileName)); |
| | | if (file != null) { |
| | | //覆盖,不需要传file |
| | | if(!isCovered){ |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); |
| | | file1 = new File(excelFileName); |
| | | file.transferTo(new File(excelFileName)); |
| | | } |
| | | if (file != null || isCovered) { |
| | | return uiManagerService.impUIContextData(file1, isCovered,selectBtm); |
| | | } else { |
| | | return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"无导入的文件"}); |
| | |
| | | }catch (Throwable e) { |
| | | throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e); |
| | | }finally { |
| | | file1.delete(); |
| | | if(!isCovered){ |
| | | file1.delete(); |
| | | } |
| | | } |
| | | } |
| | | |