|
@@ -43,6 +43,7 @@ import com.diagbot.vo.DiagnoseVerifyVO;
|
|
|
import com.diagbot.vo.DiseaseIndexVO;
|
|
|
import com.diagbot.vo.GetDiagnoseDetailVO;
|
|
|
import com.diagbot.vo.NeoParamVO;
|
|
|
+import com.diagbot.vo.UpdateDiagnoseVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -101,6 +102,14 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
|| IsDeleteEnum.Y.getKey().equals(deleteDiagnoseVO.getIsDeleted()))) {
|
|
|
throw new CommonException(CommonErrorCode.STATUS_IS_ERROR, "状态值错误【Y】或【N】");
|
|
|
}
|
|
|
+
|
|
|
+ // 删除图谱数据
|
|
|
+ NeoParamVO neoParamVO = new NeoParamVO();
|
|
|
+ neoParamVO.setId(deleteDiagnoseVO.getId());
|
|
|
+ neoServiceClient.deleteNeo(neoParamVO);
|
|
|
+ RespDTO<Boolean> respDTO = neoServiceClient.deleteNeo(neoParamVO);
|
|
|
+ RespDTOUtil.respNGDeal(respDTO, "删除图谱数据失败【远程调用】");
|
|
|
+
|
|
|
Date now = DateUtil.now();
|
|
|
this.update(new Diagnose(), new UpdateWrapper<Diagnose>()
|
|
|
.eq("id", deleteDiagnoseVO.getId())
|
|
@@ -120,13 +129,6 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
// 删除问题词列表(物理删除)
|
|
|
diagnoseQuestionService.remove(new QueryWrapper<DiagnoseQuestion>()
|
|
|
.eq("diagnose_id", deleteDiagnoseVO.getId()));
|
|
|
-
|
|
|
- // 删除图谱数据
|
|
|
- NeoParamVO neoParamVO = new NeoParamVO();
|
|
|
- neoParamVO.setId(deleteDiagnoseVO.getId());
|
|
|
- neoServiceClient.deleteNeo(neoParamVO);
|
|
|
- RespDTO<Boolean> respDTO = neoServiceClient.updateNeo(neoParamVO);
|
|
|
- RespDTOUtil.respNGDeal(respDTO, "删除图谱数据失败【远程调用】");
|
|
|
}
|
|
|
|
|
|
|
|
@@ -531,24 +533,27 @@ public class DiagnoseFacade extends DiagnoseServiceImpl {
|
|
|
/**
|
|
|
* 更新图谱(先校验,再更新)
|
|
|
*
|
|
|
- * @param diagnoseWrapper
|
|
|
+ * @param updateDiagnoseVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public void updateNeo(DiagnoseWrapper diagnoseWrapper) {
|
|
|
- VerifyDataDTO verifyDataDTO = verifyData(diagnoseWrapper);
|
|
|
- if (HasQuestionEnum.HAS_QUESTION.getKey() == verifyDataDTO.getHasQuestion()) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "有问题词存在或公式错误,不能更新图谱");
|
|
|
- }
|
|
|
- // 更新时间
|
|
|
- this.update(new UpdateWrapper<Diagnose>()
|
|
|
- .eq("id", diagnoseWrapper.getId())
|
|
|
- .set("neo_update", new Date())
|
|
|
- );
|
|
|
+ public void updateNeo(UpdateDiagnoseVO updateDiagnoseVO) {
|
|
|
+// VerifyDataDTO verifyDataDTO = verifyData(diagnoseWrapper);
|
|
|
+// if (HasQuestionEnum.HAS_QUESTION.getKey() == verifyDataDTO.getHasQuestion()) {
|
|
|
+// throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "有问题词存在或公式错误,不能更新图谱");
|
|
|
+// }
|
|
|
+
|
|
|
// 更新图谱对接接口
|
|
|
NeoParamVO neoParamVO = new NeoParamVO();
|
|
|
- neoParamVO.setId(diagnoseWrapper.getId());
|
|
|
+ neoParamVO.setId(updateDiagnoseVO.getId());
|
|
|
RespDTO<Boolean> respDTO = neoServiceClient.updateNeo(neoParamVO);
|
|
|
RespDTOUtil.respNGDeal(respDTO, "更新图谱数据失败【远程调用】");
|
|
|
+
|
|
|
+ // 更新时间
|
|
|
+ this.update(new UpdateWrapper<Diagnose>()
|
|
|
+ .eq("id", updateDiagnoseVO.getId())
|
|
|
+ .set("modifier", updateDiagnoseVO.getModifier())
|
|
|
+ .set("neo_update", new Date())
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
|