|
@@ -77,7 +77,7 @@ object UpDataFloorAndBuildingServuce : Service<Equipment>(SMybatisDao(Equipment:
|
|
|
if (!id.isNullOrEmpty()) {
|
|
|
if (id.startsWith("Fl")) {
|
|
|
val floor =
|
|
|
- FloorService.select(SFilter.eq("projectId", projectId!!), SFilter.eq("FloorID", id))
|
|
|
+ FloorService.select(SFilter.eq("projectId", projectId!!), SFilter.eq("id", id))
|
|
|
.entity()
|
|
|
|
|
|
if (floor != null) {
|
|
@@ -140,17 +140,17 @@ object UpDataFloorAndBuildingServuce : Service<Equipment>(SMybatisDao(Equipment:
|
|
|
if (!id.isNullOrEmpty()) {
|
|
|
if (id.startsWith("Fl")) {
|
|
|
zonePowerSupply.floorId = id
|
|
|
- val floor = FloorService.select(SFilter.eq("projectId", projectId!!), SFilter.eq("FloorID", id))
|
|
|
+ val floor = FloorService.select(SFilter.eq("projectId", projectId!!), SFilter.eq("id", id))
|
|
|
.entity()
|
|
|
zonePowerSupply.buildingId = floor?.buildingId
|
|
|
val list = ArrayList<String>()
|
|
|
- list.add("FloorId")
|
|
|
- list.add("BuildingId")
|
|
|
+ list.add("floorId")
|
|
|
+ list.add("buildingId")
|
|
|
ZoneSpaceBaseService.update(zonePowerSupply, list)
|
|
|
} else if (id.startsWith("Bd")) {
|
|
|
val list = ArrayList<String>()
|
|
|
- list.add("FloorId")
|
|
|
- list.add("BuildingId")
|
|
|
+ list.add("floorId")
|
|
|
+ list.add("buildingId")
|
|
|
zonePowerSupply.buildingId = id
|
|
|
zonePowerSupply.floorId = null
|
|
|
ZoneSpaceBaseService.update(zonePowerSupply, list)
|
|
@@ -158,14 +158,14 @@ object UpDataFloorAndBuildingServuce : Service<Equipment>(SMybatisDao(Equipment:
|
|
|
} else {
|
|
|
/** 清空建筑楼层 */
|
|
|
val list = ArrayList<String>()
|
|
|
- list.add("FloorId")
|
|
|
- list.add("BuildingId")
|
|
|
+ list.add("floorId")
|
|
|
+ list.add("buildingId")
|
|
|
zonePowerSupply.buildingId = null
|
|
|
zonePowerSupply.floorId = null
|
|
|
ZoneSpaceBaseService.update(zonePowerSupply, list)
|
|
|
}
|
|
|
/** 发送消息 */
|
|
|
- sendMessages(projectId!!, spaceId!!, id)
|
|
|
+// sendMessages(projectId!!, spaceId!!, id)
|
|
|
}
|
|
|
return SBaseResponse(SResponseType.success)
|
|
|
} catch (e: Exception) {
|