|
@@ -12,6 +12,8 @@ import com.diagbot.dto.StaticKnowledgeIndexDTO;
|
|
|
import com.diagbot.dto.StaticKnowledgeIndexPageDTO;
|
|
|
import com.diagbot.entity.SysUser;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
+import com.diagbot.exception.CommonErrorCode;
|
|
|
+import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.RespDTOUtil;
|
|
@@ -67,6 +69,8 @@ public class KlConceptStaticFacade {
|
|
|
RespDTO<List<StaticKnowledgeIndexDTO>> respDTO = cdssCoreClient.staticKnowledgeIndex(staticKnowledgeIndexVO);
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
retList = respDTO.data;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
|
|
|
if (staticKnowledgeIndexVO.getHasInfo() != null && staticKnowledgeIndexVO.getHasInfo().equals(1)) {
|
|
@@ -104,7 +108,7 @@ public class KlConceptStaticFacade {
|
|
|
StaticKnowledgeDTO staticKnowledgeDTO = respDTO.data;
|
|
|
return staticKnowledgeDTO;
|
|
|
} else {
|
|
|
- return null;
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -151,6 +155,8 @@ public class KlConceptStaticFacade {
|
|
|
RespDTO<Page<KlConceptStaticDTO>> respDTO = cdssCoreClient.getPage(klConceptStaticPageVO);
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
page = respDTO.data;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
List<KlConceptStaticDTO> records = page.getRecords();
|
|
|
List<Long> userIds = records.stream().map(KlConceptStaticDTO::getModifier)
|
|
@@ -191,6 +197,8 @@ public class KlConceptStaticFacade {
|
|
|
RespDTO<Page<StaticKnowledgeIndexPageDTO>> respDTO = cdssCoreClient.staticIndexPage(staticKnowledgeIndexPageVO);
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
page = respDTO.data;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
return page;
|
|
|
}
|
|
@@ -209,6 +217,8 @@ public class KlConceptStaticFacade {
|
|
|
RespDTO<Boolean> respDTO = cdssCoreClient.saveOrUpdateRecord(klConceptStaticVO);
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
success = respDTO.data;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
return success;
|
|
|
}
|
|
@@ -227,6 +237,8 @@ public class KlConceptStaticFacade {
|
|
|
RespDTO<Boolean> respDTO = cdssCoreClient.changeStatus(changeStatusVO);
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
success = respDTO.data;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
return success;
|
|
|
}
|
|
@@ -242,6 +254,8 @@ public class KlConceptStaticFacade {
|
|
|
RespDTO<KlConceptStaticDTO> respDTO = cdssCoreClient.getRecordById(idVO);
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
klConceptStaticDTO = respDTO.data;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
return klConceptStaticDTO;
|
|
|
}
|
|
@@ -257,6 +271,8 @@ public class KlConceptStaticFacade {
|
|
|
RespDTO<Boolean> respDTO = cdssCoreClient.isExist(klConceptStaticVO);
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
exist = respDTO.data;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
return exist;
|
|
|
}
|