From a5cdbf569067822e3232d2177b8a9aac1ed95b69 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期三, 29 五月 2024 17:32:00 +0800 Subject: [PATCH] 1. 修改自评逻辑中,问题整改的判断方式为已整改并且整改审核通过; 2. 新增评估详情获取接口; --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt | 104 ++++++++------------------------------------------- 1 files changed, 17 insertions(+), 87 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt index 676a708..dafb0c5 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt @@ -596,89 +596,19 @@ } } - -// val example = Example(Subtask::class.java).apply { -// createCriteria().andEqualTo("districtcode", _districtCode) -// .andGreaterThanOrEqualTo("planstarttime", _startTime) -// .andLessThanOrEqualTo("planendtime", _endTime) -// } -// -// var counts = 0 -// -// val p = PageHelper.startPage<Subtask>(page ?: 1, perPage ?: 30) -// -// subtaskMapper.selectByExample(example).forEach { s -> -// -// val scene = scenseMapper.selectByPrimaryKey(s.scenseid) -// val inspection = inspectionMapper.selectByExample(Example(Inspection::class.java).apply { -// createCriteria().andEqualTo("stguid", s.stguid) -// }).takeIf { it.isNotEmpty() }?.get(0) -// val evaluation = evaluationMapper.selectByExample(Example(Evaluation::class.java).apply { -// createCriteria().andEqualTo("stguid", s.stguid) -// }).takeIf { it.isNotEmpty() }?.get(0) -// -// if (scene.typeid != _sceneType.toByte()) { -// return@forEach -// } else { -// counts++ -// } -// -// -// val subtaskSearchResultVo = SubtaskSearchResultVo().apply { -// this.subTaskId = s.stguid -// this.districtName = scene.districtname -// this.townName = scene.townname -// this.sceneName = scene.name -// this.sceneAddress = scene.location -// this.planStartTime = s.planstarttime -// this.planEndTime = s.planendtime -// this.status = s.status -// this.path= inspection?.extension1 -// this.score = evaluation?.resultscorebef?.toIntOrNull() -// this.level = when { -// score == null -> null -// score!! >= 54 -> "鍚堟牸" -// else -> "涓嶅悎鏍�" -// } -// } -// tempResult.data.add(subtaskSearchResultVo) -// -// problemlistMapper.selectByExample(Example(Problemlist::class.java).apply { -// createCriteria().andEqualTo("stguid", s.stguid) -// }).forEach { p -> -// val problem = ProblemDetail().apply { -// this.problemId = p.guid -// this.problemName = p.problemname -// this.longitude = p.longitude?.toDouble() -// this.latitude = p.latitude?.toDouble() -// this.location = p.location -// this.rectification = p.ischanged -// this.rectificationTime = p.changedtime -// } -// subtaskSearchResultVo.problemList.add(problem) -// -// mediafileMapper.selectByExample(Example(Mediafile::class.java).apply { -// createCriteria().andEqualTo("businessguid", p.guid) -// }).forEach { m -> -// val url = m.extension1 + m.guid + ".jpg" -// if (m.ischanged == true) { -// problem.rectificationPics.add(url) -// } else { -// problem.problemPics.add(url) -// } -// } -// } -// } -// -// tempResult.head = DataHead().apply { -// this.page = p.pageNum -// this.totalPage = p.pages -// } - return result } - override fun searchSubTask2(token: String, updateTime: String?, sceneType: Int?, districtCode: String?, startTime: String?, endTime: String?, page: Int?, perPage: Int?): BaseResponse<BaseSearchResultVo> { + override fun searchSubTask2( + token: String, + updateTime: String?, + sceneType: Int?, + districtCode: String?, + startTime: String?, + endTime: String?, + page: Int?, + perPage: Int?, + ): BaseResponse<BaseSearchResultVo> { if (token != "jinshan") { return BaseResponse(false, "璇锋眰token閿欒") } @@ -728,13 +658,13 @@ problemlistMapper.selectByExample(Example(Problemlist::class.java).apply { createCriteria().andEqualTo("stguid", s.subTaskId) - .andNotEqualTo("extension3", Constant.PROBLEM_UNCHECKED) - .andNotEqualTo("extension3", Constant.PROBLEM_CHECK_FAIL) - .andNotEqualTo("extension3", Constant.CHANGE_CHECK_FAIL) - .andIsNotNull("extension3") + .andNotEqualTo("extension3", Constant.PROBLEM_UNCHECKED) + .andNotEqualTo("extension3", Constant.PROBLEM_CHECK_FAIL) + .andNotEqualTo("extension3", Constant.CHANGE_CHECK_FAIL) + .andIsNotNull("extension3") time?.let { and(createCriteria().orGreaterThan("time", it) - .orGreaterThan("changedtime", it)) + .orGreaterThan("changedtime", it)) } }).forEach { p -> val problem = ProblemDetail().apply { @@ -798,7 +728,7 @@ // val p = PageHelper.startPage<Subtask>(page ?: 1, perPage ?: 30) subtaskMapper.getSubtask2(time, time2, _districtCode, _sceneType?.toByte(), null, null).forEach { if (!subtaskMap.containsKey(it.subTaskId)) { - val vo =SubtaskSearchResultVo() + val vo = SubtaskSearchResultVo() BeanUtils.copyProperties(it, vo) subtaskMap[it.subTaskId] = vo } @@ -808,7 +738,7 @@ problemMap[it.problemId] = problemDetail subtaskMap[it.subTaskId]?.problemList?.add(problemDetail) } - val url = it.mExtension1 + it.mGuid+ ".jpg" + val url = it.mExtension1 + it.mGuid + ".jpg" if (it.isChanged == true) { problemMap[it.problemId]?.rectificationPics?.add(url) } else { -- Gitblit v1.9.3