Merge branch 'test' of http://139.196.179.195:3000/chenxudong/electromagnetic-data-new into test
This commit is contained in:
commit
de63dfe9d6
|
|
@ -297,7 +297,7 @@ public class CommonService {
|
|||
} else {
|
||||
// 先设置dataStatus状态为删除状态
|
||||
edFileInfoMapper.update(null, Wrappers.<EdFileInfo>lambdaUpdate()
|
||||
.eq(EdFileInfo::getId, id)
|
||||
.like(EdFileInfo::getFilePath, id)
|
||||
.set(EdFileInfo::getSort, -1)
|
||||
.set(EdFileInfo::getUpdatedBy, currentUserId)
|
||||
.set(EdFileInfo::getUpdatedTime, now)
|
||||
|
|
@ -308,7 +308,6 @@ public class CommonService {
|
|||
.eq(EdFileInfo::getEffectFlag, EffectFlagEnum.EFFECT.code)
|
||||
.ne(EdFileInfo::getDataStatus, EleDataStatusEnum.DELETED.code)
|
||||
.eq(EdFileInfo::getParentId, parentId)
|
||||
|
||||
.orderByAsc(EdFileInfo::getSort));
|
||||
|
||||
for (int i = 0; i < edFileInfos1.size(); i++) {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
// 首先检查工程是否存在
|
||||
Long count = this.baseMapper.selectCount(Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getParentId, PRJ_PARENT_ID)
|
||||
.eq(EdFileInfo::getEffectFlag, EffectFlagEnum.EFFECT.code)
|
||||
.eq(EdFileInfo::getFileName, prjName));
|
||||
|
||||
if (count > 0) {
|
||||
|
|
@ -351,6 +352,7 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
EdFileInfo sourceFile = sourceFileNameMap.get(sourceFileName);
|
||||
EdFileInfo targetFile = new EdFileInfo();
|
||||
int maxFolderId = Integer.parseInt(this.baseMapper.maxPrjId());
|
||||
|
||||
String newFolderId = String.valueOf(maxFolderId + 1);
|
||||
String nowTimeStr = EleCommonUtil.getNowTimeStr();
|
||||
String fileCode = commonService.createFileCode(targetParentFile.getId(), EleDataTypeEnum.FOLDER.desc, FILE_START_VERSION, nowTimeStr);
|
||||
|
|
@ -389,7 +391,12 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
}
|
||||
return ElectromagneticResultUtil.success(true);
|
||||
} catch (Exception e) {
|
||||
String info = StrFormatter.format("层级沿用失败");
|
||||
String info;
|
||||
if (e instanceof BizException) {
|
||||
info = StrFormatter.format("层级沿用失败,{}", e.getMessage());
|
||||
} else {
|
||||
info = "层级沿用失败";
|
||||
}
|
||||
log.error(info, e);
|
||||
throw new BizException(info);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue