|
@@ -1423,6 +1423,10 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
public RespDTO updateNeoDisease(NeoParamVO singleDisease) {
|
|
|
RespDTO respDTO = RespDTO.onSuc(true);;
|
|
|
Long disId = singleDisease.getId();
|
|
|
+ RespDTO respDTO1 = this.updateNeo(respDTO, disId);
|
|
|
+ return respDTO1;
|
|
|
+ }
|
|
|
+ public RespDTO updateNeo(RespDTO respDTO,Long disId){
|
|
|
//先删除
|
|
|
this.neo4jDelete(disId);
|
|
|
String disName = this.getDisName(disId);
|
|
@@ -1454,7 +1458,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
ResultSet rs = null;
|
|
|
try {
|
|
|
String type, code ,standard,relation,result,formula,name;
|
|
|
- String sql = "SELECT diagnose_id,dis_name,`type`,`code`,standard,relation,result,formula FROM `kl_diagnose_detail` where diagnose_id = "+disId+"";
|
|
|
+ String sql = "SELECT diagnose_id,dis_name,`type`,`code`,standard,relation,result,formula FROM `kl_diagnose_detail` where diagnose_id = "+disId+" and is_deleted = 'N'";
|
|
|
st = conn.createStatement();
|
|
|
rs = st.executeQuery(sql);
|
|
|
while (rs.next()){
|
|
@@ -1599,7 +1603,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
conn = this.getConn();
|
|
|
String name="";
|
|
|
try {
|
|
|
- String sql = "SELECT dis_name FROM `kl_diagnose_detail` where diagnose_id = "+disId+"";
|
|
|
+ String sql = "SELECT dis_name FROM `kl_diagnose_detail` where diagnose_id = "+disId+" and is_deleted = 'N'";
|
|
|
st = conn.createStatement();
|
|
|
rs = st.executeQuery(sql);
|
|
|
while (rs.next()) {
|
|
@@ -1673,6 +1677,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
Integer path = 1;
|
|
|
String rel = "";
|
|
|
for (String ni:nisplits) {
|
|
|
+
|
|
|
if(ni.contains("/")){
|
|
|
if(ni.contains("任一")){
|
|
|
path = 1;
|
|
@@ -1710,7 +1715,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
|
- this.processDetailNum(disName,ni,disName+ni,allData);
|
|
|
+ this.processDetailNum(disName,ni,startNode,allData);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2069,10 +2074,12 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
diseaseRepository.deleteRelation3(disId);
|
|
|
diseaseRepository.deleteRelation4(disId);
|
|
|
// diseaseRepository.deleteRelation5(disId);
|
|
|
- diseaseRepository.deleteRelation6(disId);
|
|
|
- diseaseRepository.deleteRelation7(disId);
|
|
|
- diseaseRepository.deleteRelation8(disId);
|
|
|
- diseaseRepository.deleteRelation9(disId);
|
|
|
+// diseaseRepository.deleteRelation6(disId);
|
|
|
+// diseaseRepository.deleteRelation7(disId);
|
|
|
+// diseaseRepository.deleteRelation8(disId);
|
|
|
+// diseaseRepository.deleteRelation9(disId);
|
|
|
+ //删除disId
|
|
|
+ diseaseRepository.deleteRelation11(disId);
|
|
|
List<String> allCode = this.getAllCode(disId);
|
|
|
if(allCode.size()>0){
|
|
|
for (String conName:allCode) {
|
|
@@ -2083,6 +2090,23 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 批量插入
|
|
|
+ * @param idList
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public RespDTO<Boolean> batchInsertDis(List<Long> idList) {
|
|
|
+ RespDTO<Boolean> respDTO = new RespDTO<>();
|
|
|
+ if(idList.size()>0){
|
|
|
+ for (Long disID:idList) {
|
|
|
+ this.neo4jDelete(disID);
|
|
|
+ respDTO = this.updateNeo(respDTO, disID);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return respDTO;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取一个诊断依据的全部code
|
|
|
* @param disId
|