|
@@ -14,6 +14,8 @@ import com.diagbot.entity.KlConceptDetail;
|
|
|
import com.diagbot.entity.KlConceptStatic;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.StatusEnum;
|
|
|
+import com.diagbot.exception.CommonErrorCode;
|
|
|
+import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.KlConceptStaticServiceImpl;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.RespDTOUtil;
|
|
@@ -61,6 +63,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
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)) {
|
|
@@ -82,6 +86,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
RespDTO<StaticKnowledgeDTO> respDTO = cdssCoreClient.getStaticKnowledge(staticKnowledgeVO);
|
|
|
if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
staticKnowledgeDTO = respDTO.data;
|
|
|
+ } else {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
|
|
|
}
|
|
|
return staticKnowledgeDTO;
|
|
|
}
|
|
@@ -97,6 +103,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
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<String> userIds = records.stream().map(KlConceptStaticDTO::getModifier)
|
|
@@ -132,6 +140,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
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;
|
|
|
}
|
|
@@ -150,6 +160,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
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;
|
|
|
}
|
|
@@ -165,6 +177,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
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;
|
|
|
}
|
|
@@ -180,6 +194,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
|
|
|
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;
|
|
|
}
|