| | |
| | | mf.setMsg("文件丢失"); |
| | | } |
| | | |
| | | MetaEntity old = metaService.selectByGuid(mf.getGuid(), null); |
| | | MetaEntity old = metaService.selectByGuid(mf.getGuid(), getDirCode(mf), null); |
| | | if (null != old) { |
| | | mf.setMsg("已存在"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取目录编码 |
| | | */ |
| | | private String getDirCode(MetaFileEntity mf) { |
| | | if (StringHelper.isEmpty(mf.getDircode())) { |
| | | return null; |
| | | } |
| | | |
| | | return StringHelper.getRightLike(mf.getDircode().substring(0, 2)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return; |
| | | } |
| | | |
| | | MetaEntity old = metaService.selectByGuid(mf.getGuid(), tabName); |
| | | MetaEntity old = metaService.selectByGuid(mf.getGuid(), getDirCode(mf), tabName); |
| | | if (null != old) { |
| | | mf.setMsg("已存在"); |
| | | return; |
| | |
| | | return -1; |
| | | } |
| | | |
| | | MetaEntity old = metaService.selectByGuid(mf.getGuid(), null); |
| | | MetaEntity old = metaService.selectByGuid(mf.getGuid(), null, null); |
| | | if (null != old) { |
| | | mf.setMsg("已存在"); |
| | | file.delete(); |
| | |
| | | return; |
| | | } |
| | | |
| | | MetaEntity old = metaService.selectByGuid(mf.getGuid(), null); |
| | | MetaEntity old = metaService.selectByGuid(mf.getGuid(), null, null); |
| | | if (null != old) { |
| | | mf.setMsg("已存在"); |
| | | FileHelper.deleteFiles(file); |