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 {