| | |
| | | return isUpdate to r |
| | | } |
| | | |
| | | fun findSubSceneList(scenes: List<Scense>): List<BaseScene?> { |
| | | val result = mutableListOf<BaseScene>() |
| | | scenes.groupBy { it.typeid }.forEach { |
| | | when (it.key.toString()) { |
| | | Constant.SceneType.TYPE1.value -> { |
| | | sceneConstructionSiteMapper.selectByExample(Example(SceneConstructionSite::class.java).apply { |
| | | createCriteria().andIn("sGuid", it.value.map { v-> v.guid }) |
| | | }).let { s-> result.addAll(s) } |
| | | } |
| | | Constant.SceneType.TYPE2.value -> { |
| | | sceneWharfMapper.selectByExample(Example(SceneWharf::class.java).apply { |
| | | createCriteria().andIn("sGuid", it.value.map { v-> v.guid }) |
| | | }).let { s-> result.addAll(s) } |
| | | } |
| | | Constant.SceneType.TYPE3.value -> { |
| | | sceneMixingPlantMapper.selectByExample(Example(SceneMixingPlant::class.java).apply { |
| | | createCriteria().andIn("sGuid", it.value.map { v-> v.guid }) |
| | | }).let { s-> result.addAll(s) } |
| | | } |
| | | Constant.SceneType.TYPE14.value -> { |
| | | sceneStorageYardMapper.selectByExample(Example(SceneStorageYard::class.java).apply { |
| | | createCriteria().andIn("sGuid", it.value.map { v-> v.guid }) |
| | | }).let { s-> result.addAll(s) } |
| | | } |
| | | } |
| | | } |
| | | return result |
| | | } |
| | | |
| | | fun findScene(userId: String?): Scense? { |
| | | val user = userinfoMapper.selectByPrimaryKey(userId) ?: throw BizException("用户id不存在") |
| | | return scenseMapper.selectByPrimaryKey(user.dGuid) |