|
@@ -1,4 +1,4 @@
|
|
|
-package com.dragoninfo.dcuc.app.sub.service.impl;
|
|
|
+package com.dragoninfo.dcuc.app.service.sub.impl;
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -9,9 +9,10 @@ import com.dragoninfo.dcuc.app.dto.sub.DataClaAcceptDTO;
|
|
|
import com.dragoninfo.dcuc.app.dto.sub.DataClaDTO;
|
|
|
import com.dragoninfo.dcuc.app.entity.sub.DataCla;
|
|
|
import com.dragoninfo.dcuc.app.enumresources.sub.DataClaTypeEnum;
|
|
|
-import com.dragoninfo.dcuc.app.sub.mapper.DataClaMapper;
|
|
|
-import com.dragoninfo.dcuc.app.sub.service.IDataClaService;
|
|
|
+import com.dragoninfo.dcuc.app.mapper.sub.DataClaMapper;
|
|
|
+import com.dragoninfo.dcuc.app.service.sub.IDataClaService;
|
|
|
import com.dragoninfo.dcuc.app.vo.DataResourceTreeVo;
|
|
|
+import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
|
|
|
import com.dragonsoft.duceap.base.entity.search.SearchDTO;
|
|
|
import com.dragonsoft.duceap.base.enums.BooleanEnum;
|
|
|
import com.dragonsoft.duceap.base.utils.UserContextUtils;
|
|
@@ -41,7 +42,7 @@ public class DataClaServiceImpl implements IDataClaService {
|
|
|
private DataClaMapper dataClaMapper;
|
|
|
|
|
|
@Override
|
|
|
- public Boolean dataClassifyAdd(DataClaAcceptDTO dto) {
|
|
|
+ public ResponseStatus dataClassifyAdd(DataClaAcceptDTO dto) {
|
|
|
boolean saveFlag = false;
|
|
|
String path = null;
|
|
|
|
|
@@ -104,17 +105,18 @@ public class DataClaServiceImpl implements IDataClaService {
|
|
|
if(!saveFlag) {
|
|
|
lab = getByCodeAndPath(dto.getLabCode(), path);
|
|
|
}
|
|
|
- if(null == lab) {
|
|
|
- DataClaDTO dataClaDTO = new DataClaDTO(dto.getLabCode()
|
|
|
- ,dto.getLabName(), DataClaTypeEnum.LAB.getLevel(), DataClaTypeEnum.LAB.getCode());
|
|
|
- dataClaDTO.setRemark(dto.getRemark());
|
|
|
- dataClaDTO.setFirId(firId);
|
|
|
- dataClaDTO.setSecId(secId);
|
|
|
- dataClaDTO.setDataType(dto.getLabClaCode());
|
|
|
- dataClaDTO.setLabClaId(labClaId);
|
|
|
- save(dataClaDTO);
|
|
|
+ if(null != lab) {
|
|
|
+ return ResponseStatus.fail("标签代码已存在");
|
|
|
}
|
|
|
- return saveFlag;
|
|
|
+ DataClaDTO dataClaDTO = new DataClaDTO(dto.getLabCode()
|
|
|
+ ,dto.getLabName(), DataClaTypeEnum.LAB.getLevel(), DataClaTypeEnum.LAB.getCode());
|
|
|
+ dataClaDTO.setRemark(dto.getRemark());
|
|
|
+ dataClaDTO.setFirId(firId);
|
|
|
+ dataClaDTO.setSecId(secId);
|
|
|
+ dataClaDTO.setDataType(dto.getLabClaCode());
|
|
|
+ dataClaDTO.setLabClaId(labClaId);
|
|
|
+ save(dataClaDTO);
|
|
|
+ return ResponseStatus.success();
|
|
|
}
|
|
|
|
|
|
@Override
|