|
@@ -90,17 +90,17 @@ class DataCenterService {
|
|
|
return null
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 根据资产id获取资产
|
|
|
- */
|
|
|
- fun getPropertyById(propertyIds : ArrayList<String>, projectId: String) : ArrayList<DCProperty>?{
|
|
|
- val body = QueryRequest()
|
|
|
- body.filters = generateSelectStr(propertyIds, "id")
|
|
|
- val response = request.propertyQuery(body, projectId)
|
|
|
- if(response != null && response.result == "success")
|
|
|
- return response.content
|
|
|
- return null
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 根据资产id获取资产
|
|
|
+// */
|
|
|
+// fun getPropertyById(propertyIds : ArrayList<String>, projectId: String) : ArrayList<DCProperty>?{
|
|
|
+// val body = QueryRequest()
|
|
|
+// body.filters = generateSelectStr(propertyIds, "id")
|
|
|
+// val response = request.propertyQuery(body, projectId)
|
|
|
+// if(response != null && response.result == "success")
|
|
|
+// return response.content
|
|
|
+// return null
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 根据楼层id获取楼层下的设备
|
|
@@ -418,19 +418,19 @@ class DataCenterService {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 更新资产
|
|
|
- */
|
|
|
- fun propertyUpdate(updateList: ArrayList<DCProperty>, projectId: String?) : Boolean {
|
|
|
- val updateRequest = UpdateRequest<DCProperty>()
|
|
|
- updateRequest.content = updateList
|
|
|
- val result = request.propertyUpdate(updateRequest, projectId!!)
|
|
|
- if(result != null && "success" == result.result){
|
|
|
- return true
|
|
|
- }
|
|
|
- logger.error(result.toString())
|
|
|
- return false
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 更新资产
|
|
|
+// */
|
|
|
+// fun propertyUpdate(updateList: ArrayList<DCProperty>, projectId: String?) : Boolean {
|
|
|
+// val updateRequest = UpdateRequest<DCProperty>()
|
|
|
+// updateRequest.content = updateList
|
|
|
+// val result = request.propertyUpdate(updateRequest, projectId!!)
|
|
|
+// if(result != null && "success" == result.result){
|
|
|
+// return true
|
|
|
+// }
|
|
|
+// logger.error(result.toString())
|
|
|
+// return false
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 元空间更新
|
|
@@ -524,7 +524,9 @@ class DataCenterService {
|
|
|
if(result != null && "success" == result.result){
|
|
|
return true
|
|
|
}
|
|
|
- logger.error(result.toJson())
|
|
|
+ if(result != null){
|
|
|
+ logger.error(result.toJson())
|
|
|
+ }
|
|
|
logger.error(createRequest.toJson())
|
|
|
return false
|
|
|
}
|
|
@@ -542,18 +544,18 @@ class DataCenterService {
|
|
|
else
|
|
|
tmp.addAll(arr.subList(index, arr.size))
|
|
|
when(operator){
|
|
|
- DataCenterOperator.componentCreate ->{
|
|
|
- if (!componentCreate(tmp as ArrayList<DCComponent>, projectId, out as ArrayList<DCComponent>))
|
|
|
- throw Exception("创建部件失败")
|
|
|
- }
|
|
|
- DataCenterOperator.componentDelete ->{
|
|
|
- if (!componentDelete(tmp as ArrayList<DCComponent>, projectId))
|
|
|
- throw Exception("删除部件失败")
|
|
|
- }
|
|
|
- DataCenterOperator.componentUpdate ->{
|
|
|
- if (!componentUpdate(tmp as ArrayList<DCComponent>, projectId))
|
|
|
- throw Exception("更新部件失败")
|
|
|
- }
|
|
|
+// DataCenterOperator.componentCreate ->{
|
|
|
+// if (!componentCreate(tmp as ArrayList<DCComponent>, projectId, out as ArrayList<DCComponent>))
|
|
|
+// throw Exception("创建部件失败")
|
|
|
+// }
|
|
|
+// DataCenterOperator.componentDelete ->{
|
|
|
+// if (!componentDelete(tmp as ArrayList<DCComponent>, projectId))
|
|
|
+// throw Exception("删除部件失败")
|
|
|
+// }
|
|
|
+// DataCenterOperator.componentUpdate ->{
|
|
|
+// if (!componentUpdate(tmp as ArrayList<DCComponent>, projectId))
|
|
|
+// throw Exception("更新部件失败")
|
|
|
+// }
|
|
|
DataCenterOperator.equipCreate ->{
|
|
|
if (!equipCreate(tmp as ArrayList<DCEquipment>, projectId, out as ArrayList<DCEquipment>))
|
|
|
throw Exception("创建设备失败")
|