| | |
| | | package cn.flightfeather.supervision.lightshare.service.impl |
| | | |
| | | import cn.flightfeather.supervision.common.utils.UUIDGenerator |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Monitorobjectversion |
| | | import cn.flightfeather.supervision.domain.ds1.entity.Scense |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.MonitorobjectversionMapper |
| | |
| | | val monitorobjectversionlist = monitorobjectversionMapper.select(monitorobjectversion) |
| | | |
| | | return monitorobjectversionlist.filter { |
| | | val usedCount = it.extension1 ?: "0";it.monitornum.toString().toInt() - usedCount.toInt() > 0 |
| | | val usedCount = it.extension1 ?: "0" |
| | | it.monitornum.toString().toInt() - usedCount.toInt() > 0 |
| | | }.sortedBy { it.displayid } |
| | | } |
| | | |
| | |
| | | @Transactional |
| | | override fun saveList(monitorobjectversionlist: List<Monitorobjectversion>): Int { |
| | | monitorobjectversionlist.forEach { |
| | | if (it.movid == null) it.movid = UUIDGenerator.generate16ShortUUID() |
| | | monitorobjectversionMapper.insert(it) |
| | | } |
| | | return monitorobjectversionlist.size |
| | |
| | | if (vo.sguid == scene.guid) { |
| | | vo.sceneTypeId = scene.typeid?.toInt() ?: 0 |
| | | vo.sceneType = scene.type |
| | | vo.scene = scene |
| | | return@f |
| | | } |
| | | } |