|
@@ -139,14 +139,15 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- val attachObjectIdsList = nodes.attachObjectIds
|
|
|
- if (!attachObjectIdsList.isNullOrEmpty()){
|
|
|
- for (attachObjectIds in attachObjectIdsList){
|
|
|
- attachObjectIds.graphId = graph.graphId
|
|
|
- attachObjectIds.id = graph.id
|
|
|
- AttachObjectIdsServices.insert(attachObjectIds)
|
|
|
- }
|
|
|
- }
|
|
|
+// val attachObjectIdsList = nodes.attachObjectIds
|
|
|
+// if (!attachObjectIdsList.isNullOrEmpty()){
|
|
|
+// for (attachObjectIds in attachObjectIdsList){
|
|
|
+// attachObjectIds.graphId = graph.graphId
|
|
|
+// attachObjectIds.id = graph.id
|
|
|
+// attachObjectIds.nodeId = nodes.nodeId
|
|
|
+// AttachObjectIdsServices.insert(attachObjectIds)
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
val markersList = graph.elements!!.markers
|
|
@@ -323,27 +324,27 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- val attachObjectIdsBuilder = attachObjectIdsPubService.select(
|
|
|
- // SFilter.eq("projectId", projectId!!),
|
|
|
- SFilter.eq("graphId", graph.graphId!!),
|
|
|
- SFilter.eq("id", graphPub.id!!),
|
|
|
- SFilter.eq("state", 1)
|
|
|
- )
|
|
|
- val attachObjectIdsList = attachObjectIdsBuilder.table("labsl.attach_object_ids").exec()
|
|
|
- if (attachObjectIdsList.size>0){
|
|
|
- for (attachObjectIds in attachObjectIdsList){
|
|
|
- attachObjectIds.id = graph.id
|
|
|
- attachObjectIds.graphId = graph.graphId
|
|
|
- attachObjectIds.state = 0
|
|
|
- val insert1 = attachObjectIdsPubService.insert(attachObjectIds)
|
|
|
- if (!insert1){
|
|
|
- // 回滚
|
|
|
- backTransaction()
|
|
|
- sCreateResponse.result = SResponseType.failure
|
|
|
- return sCreateResponse
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// val attachObjectIdsBuilder = attachObjectIdsPubService.select(
|
|
|
+// // SFilter.eq("projectId", projectId!!),
|
|
|
+// SFilter.eq("graphId", graph.graphId!!),
|
|
|
+// SFilter.eq("id", graphPub.id!!),
|
|
|
+// SFilter.eq("state", 1)
|
|
|
+// )
|
|
|
+// val attachObjectIdsList = attachObjectIdsBuilder.table("labsl.attach_object_ids").exec()
|
|
|
+// if (attachObjectIdsList.size>0){
|
|
|
+// for (attachObjectIds in attachObjectIdsList){
|
|
|
+// attachObjectIds.id = graph.id
|
|
|
+// attachObjectIds.graphId = graph.graphId
|
|
|
+// attachObjectIds.state = 0
|
|
|
+// val insert1 = attachObjectIdsPubService.insert(attachObjectIds)
|
|
|
+// if (!insert1){
|
|
|
+// // 回滚
|
|
|
+// backTransaction()
|
|
|
+// sCreateResponse.result = SResponseType.failure
|
|
|
+// return sCreateResponse
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
/** 清除草稿箱图 */
|
|
|
delOldData(graph1)
|
|
@@ -397,9 +398,9 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
|
|
|
AnchorService.delete(
|
|
|
SFilter.eq("id", graph.id!!),
|
|
|
SFilter.eq("graphId", graph.graphId!!))
|
|
|
- AttachObjectIdsServices.delete(
|
|
|
- SFilter.eq("id", graph.id!!),
|
|
|
- SFilter.eq("graphId", graph.graphId!!))
|
|
|
+// AttachObjectIdsServices.delete(
|
|
|
+// SFilter.eq("id", graph.id!!),
|
|
|
+// SFilter.eq("graphId", graph.graphId!!))
|
|
|
}
|
|
|
}
|
|
|
} // Fun delOldData()
|
|
@@ -438,9 +439,9 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
|
|
|
AnchorService.delete(
|
|
|
SFilter.eq("state", 1),
|
|
|
SFilter.eq("graphId", graph.graphId!!))
|
|
|
- AttachObjectIdsServices.delete(
|
|
|
- SFilter.eq("state", 1),
|
|
|
- SFilter.eq("graphId", graph.graphId!!))
|
|
|
+// AttachObjectIdsServices.delete(
|
|
|
+// SFilter.eq("state", 1),
|
|
|
+// SFilter.eq("graphId", graph.graphId!!))
|
|
|
}
|
|
|
}
|
|
|
} // Fun delOldData()
|
|
@@ -583,18 +584,18 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
|
|
|
AnchorService.insert(anchor)
|
|
|
}
|
|
|
}
|
|
|
- val attachObjectIdsBuilder = AttachObjectIdsServices.select(
|
|
|
- SFilter.eq("id", graph.id!!),
|
|
|
- SFilter.eq("graphId", graph.graphId!!)
|
|
|
- )
|
|
|
- val attachObjectIdsList = attachObjectIdsBuilder.table("labsl.attach_object_ids_pub").exec()
|
|
|
- if (attachObjectIdsList.size>0){
|
|
|
- for (attachObjectIds in attachObjectIdsList){
|
|
|
- attachObjectIds.id = graphPub.id
|
|
|
- attachObjectIds.state = 4
|
|
|
- AttachObjectIdsServices.insert(attachObjectIds)
|
|
|
- }
|
|
|
- }
|
|
|
+// val attachObjectIdsBuilder = AttachObjectIdsServices.select(
|
|
|
+// SFilter.eq("id", graph.id!!),
|
|
|
+// SFilter.eq("graphId", graph.graphId!!)
|
|
|
+// )
|
|
|
+// val attachObjectIdsList = attachObjectIdsBuilder.table("labsl.attach_object_ids_pub").exec()
|
|
|
+// if (attachObjectIdsList.size>0){
|
|
|
+// for (attachObjectIds in attachObjectIdsList){
|
|
|
+// attachObjectIds.id = graphPub.id
|
|
|
+// attachObjectIds.state = 4
|
|
|
+// AttachObjectIdsServices.insert(attachObjectIds)
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
val markersBuilder = MarkersService.select(
|
|
@@ -657,14 +658,14 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
|
|
|
if (nodeList.size>0){
|
|
|
for (node in nodeList){
|
|
|
try {
|
|
|
- val attachObjectIdsList = AttachObjectIdsServices.select(
|
|
|
- SFilter.eq("id", graph.id!!),
|
|
|
- SFilter.eq("graphId", graph.graphId!!),
|
|
|
- SFilter.eq("nodeId", node.nodeId!!)
|
|
|
- ).exec()
|
|
|
- if (attachObjectIdsList.size>0){
|
|
|
- node.attachObjectIds = attachObjectIdsList
|
|
|
- }
|
|
|
+// val attachObjectIdsList = AttachObjectIdsServices.select(
|
|
|
+// SFilter.eq("id", graph.id!!),
|
|
|
+// SFilter.eq("graphId", graph.graphId!!),
|
|
|
+// SFilter.eq("nodeId", node.nodeId!!)
|
|
|
+// ).exec()
|
|
|
+// if (attachObjectIdsList.size>0){
|
|
|
+// node.attachObjectIds = attachObjectIdsList
|
|
|
+// }
|
|
|
val anchorList = AnchorService.select(
|
|
|
SFilter.eq("id", graph.id!!),
|
|
|
SFilter.eq("graphId", graph.graphId!!),
|
|
@@ -697,6 +698,7 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
|
|
|
sQueryResponse.result = SResponseType.success
|
|
|
sQueryResponse.content = graph
|
|
|
}else{
|
|
|
+ sQueryResponse.message = "图不存在"
|
|
|
sQueryResponse.result = SResponseType.failure
|
|
|
}
|
|
|
return sQueryResponse
|
|
@@ -727,14 +729,14 @@ object GraphService : SObjectService<Graph>(SMybatisDao(Graph::class.java)) {
|
|
|
if (nodeList.size>0){
|
|
|
for (node in nodeList){
|
|
|
try {
|
|
|
- val attachObjectIdsList = attachObjectIdsPubService.select(
|
|
|
- SFilter.eq("id", graph.id!!),
|
|
|
- SFilter.eq("graphId", graph.graphId!!),
|
|
|
- SFilter.eq("nodeId", node.nodeId!!)
|
|
|
- ).exec()
|
|
|
- if (attachObjectIdsList.size>0){
|
|
|
- node.attachObjectIds = attachObjectIdsList
|
|
|
- }
|
|
|
+// val attachObjectIdsList = attachObjectIdsPubService.select(
|
|
|
+// SFilter.eq("id", graph.id!!),
|
|
|
+// SFilter.eq("graphId", graph.graphId!!),
|
|
|
+// SFilter.eq("nodeId", node.nodeId!!)
|
|
|
+// ).exec()
|
|
|
+// if (attachObjectIdsList.size>0){
|
|
|
+// node.attachObjectIds = attachObjectIdsList
|
|
|
+// }
|
|
|
val anchorList = anchorPubService.select(
|
|
|
SFilter.eq("id", graph.id!!),
|
|
|
SFilter.eq("graphId", graph.graphId!!),
|