|
|
@@ -280,8 +280,8 @@ public class DocDirController extends BaseController {
|
|
|
DocDir query = new DocDir();
|
|
|
query.setParentId(docDir.getParentId());
|
|
|
query.setSearchValue(docDir.getDirName());
|
|
|
- List list = docDirService.selectDocDirList(query);
|
|
|
- if (list.size() > 0) {
|
|
|
+ List<DocDir> list = docDirService.selectDocDirList(query);
|
|
|
+ if (list.size() > 0 && !list.get(0).getDirId().equals(docDir.getDirId())) {
|
|
|
String dirName = docDir.getDirName();
|
|
|
dirName = dirName + "-" + DateUtils.dateTimeNow();
|
|
|
docDir.setDirName(dirName);
|