1. 巡查汇总报告功能添加整改跟踪提醒统计列;
2. 新增获取巡查任务统计信息接口;
已修改16个文件
已添加2个文件
337 ■■■■ 文件已修改
src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStatus.kt 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColTotalGrade.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/StScoreItem_1.kt 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorobjectversionMapper.kt 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/MonitorobjectversionMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
@@ -110,7 +110,7 @@
                }
            })
        } else {
            taskSceneIdList = dbMapper.monitorobjectversionMapper.getSceneByType(config.topTaskGuid, config.sceneType)
            taskSceneIdList = dbMapper.monitorobjectversionMapper.getSceneByType(config.topTaskGuid, config.sceneType, config.townCode)
            dbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
                createCriteria().andIn("scenseid", taskSceneIdList)
                    .andEqualTo("tguid", config.topTaskGuid)
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStatus.kt
@@ -18,22 +18,27 @@
    }
    override fun onOneRow(rowData: DataSource.RowData): List<Any> {
        val status = when (rowData.scene?.typeid.toString()) {
        var status: String? = ""
        var stage: String? = ""
        when (rowData.scene?.typeid.toString()) {
            Constant.ScenseType.TYPE1.value -> {
                (rowData.baseScene as SceneConstructionSite?)?.csStatus
                (rowData.baseScene as SceneConstructionSite?)?.apply {
                    status = csStatus
                    stage = siExtension1
                }
            }
            Constant.ScenseType.TYPE2.value -> {
                (rowData.baseScene as SceneWharf?)?.getwStatus()
                status = (rowData.baseScene as SceneWharf?)?.getwStatus()
            }
            Constant.ScenseType.TYPE3.value -> {
                (rowData.baseScene as SceneMixingPlant?)?.mpStatus
                status = (rowData.baseScene as SceneMixingPlant?)?.mpStatus
            }
            Constant.ScenseType.TYPE14.value -> {
                (rowData.baseScene as SceneStorageYard?)?.syStatus
                status = (rowData.baseScene as SceneStorageYard?)?.syStatus
            }
            else -> ""
        }
        val s = status ?: ""
        return listOf(s, s)
        return listOf(s, stage ?: "")
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColStrategy.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,106 @@
package cn.flightfeather.supervision.business.report.cols
import cn.flightfeather.supervision.business.report.BaseCols
import cn.flightfeather.supervision.business.report.DataSource
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.common.utils.ExcelUtil
import java.time.Duration
import java.time.LocalDateTime
import java.time.ZoneId
class ColStrategy : BaseCols() {
    override fun onHeads(dataSource: DataSource): MutableList<MutableList<ExcelUtil.MyCell>> {
        return mutableListOf(mutableListOf(
            ExcelUtil.MyCell("整改跟踪提醒")
        ))
    }
    override fun onOneRow(rowData: DataSource.RowData): List<Any> {
        if (rowData.problems.isEmpty()) return listOf("")
        val strategyList = listOf(
            "1、存在问题超期3天不满7天未整改,由系统推送整改提醒;",
            "2、存在问题超期7天未整改,由技术服务部线上督促;",
            "3、巡查后10天或月末前3天,问题整改率低于50%,由数据应用部一对一督促,并于主管部门联动;",
            "4、问题审核或整改审核未开展或问题审核较巡查时间延后24小时以上或问题与整改时间间隔超过一周,项目管理人员应及时开展审核或后续应提升审核时效性;",
            "5、台账未按时提交,由技术服务部一对一督促;",
            "6、台账已部分提交,提交比例不足100%的,由数据应用部一对一督促;",
            "7、当月问题数超3个且全部未整改或连续两月问题整改率低于50%的场景,列为重点监管,由技术服务部当月增加不少于一次现场复核;",
            "8、连续两月台账提交比例低于50%的,由技术服务部当月增加一次现场或线上操作指导;",
            "9、台账审核较提交时间延后5日以上或月末前3日仍未审核的,由数据应用部及时开展;"
        )
        var result = ""
        val now = LocalDateTime.now()
        var cPros = 0//整改总数
        for (p in rowData.problems) {
            if (p.ischanged == true) {
                cPros++
                continue
            }
            val pTime = LocalDateTime.ofInstant(p.time?.toInstant(), ZoneId.systemDefault())
            val duration = Duration.between(pTime.toLocalDate(), now)
            val day = duration.toDays()
            when {
                day in 3..6 -> {
                    result += strategyList[0] + "\n"
                    break
                }
                day > 6 -> {
                    result += strategyList[1] + "\n"
                    break
                }
            }
        }
        //整改率
        val cPer = cPros.toDouble() / rowData.problems.size
        //巡查时间
        val sTime = LocalDateTime.ofInstant(rowData.subTask?.planstarttime?.toInstant(), ZoneId.systemDefault())
        val day1 = Duration.between(sTime.toLocalDate(), now).toDays()
        val lastDayOfMon = now.plusMonths(1).withDayOfMonth(1).minusDays(1)
        val day2 = Duration.between(lastDayOfMon.toLocalDate(), now.toLocalDate()).toDays()
        if (cPer < .5 && (day1 >= 10 || day2 <= 3)) result += strategyList[2] + "\n"
        //审核
        for (p in rowData.problems) {
            //问题审核或整改审核未开展
            when (p.extension3) {
                Constant.PROBLEM_UNCHECKED,
                Constant.CHANGE_UNCHECKED -> {
                    result += strategyList[3] + "\n"
                    break
                }
            }
            //问题审核较巡查时间延后24小时以上
            // TODO: 2022/7/20
            //问题与整改时间间隔超过一周
            if (p.changedtime != null) {
                val ct = LocalDateTime.ofInstant(p.changedtime?.toInstant(), ZoneId.systemDefault())
                val pt = LocalDateTime.ofInstant(p.time?.toInstant(), ZoneId.systemDefault())
                if (Duration.between(pt.toLocalDate(), ct.toLocalDate()).toDays() > 7) {
                    result += strategyList[3] + "\n"
                    break
                }
            }
        }
        //台账
        val rNum = rowData.ledgerRecords.size
        if (rNum == 0) result += strategyList[4] + "\n"
        if (rNum != 0 && rNum < rowData.ledgerCount) result += strategyList[5] + "\n"
        //7、当月问题数超3个且全部未整改或连续两月问题整改率低于50%的场景,列为重点监管,由技术服务部当月增加不少于一次现场复核;
        if (rowData.problems.size > 3 && cPros == 0) {
        }
        //8、连续两月台账提交比例低于50%的,由技术服务部当月增加一次现场或线上操作指导;
        //9、台账审核较提交时间延后5日以上或月末前3日仍未审核的,由数据应用部及时开展;
        return strategyList
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColTotalGrade.kt
@@ -35,8 +35,8 @@
                        else -> ExcelUtil.MyCell("超出范围:${s}", fontColor = HSSFColor.HSSFColorPredefined.BLACK.index)
                    }
                    val normalization = when (s) {
                        in 0..59 -> ExcelUtil.MyCell("严重不规范", fontColor = HSSFColor.HSSFColorPredefined.RED.index)
                        in 60..89 -> ExcelUtil.MyCell("不规范", fontColor = HSSFColor.HSSFColorPredefined.ROSE.index)
                        in 0..39 -> ExcelUtil.MyCell("严重不规范", fontColor = HSSFColor.HSSFColorPredefined.RED.index)
                        in 40..89 -> ExcelUtil.MyCell("不规范", fontColor = HSSFColor.HSSFColorPredefined.ROSE.index)
                        in 90..99 -> ExcelUtil.MyCell("基本规范", fontColor = HSSFColor.HSSFColorPredefined.GOLD.index)
                        100 -> ExcelUtil.MyCell("规范", fontColor = HSSFColor.HSSFColorPredefined.BRIGHT_GREEN.index)
                        -1 -> ExcelUtil.MyCell("", fontColor = HSSFColor.HSSFColorPredefined.BLACK.index)
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt
@@ -60,7 +60,7 @@
                    else -> ""
                }
                // FIXME: 2022/7/18 åŽç»­åœºæ™¯çš„æ–½å·¥çŠ¶æ€æ”¹ä¸ºå¸ƒå°”å€¼å­˜å‚¨
                if ((status?.contains("完工") == true) || (status?.contains("未施工") == true) || (status?.contains("停") == true)
                if ((status?.contains("完工") == true) || (status?.contains("未施工") == true) || (status?.contains("停工") == true)
                    || (status?.contains("关") == true)
                ) {
                    inactiveScenes++
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt
@@ -16,6 +16,20 @@
        summarys.sortByDescending { it.count }
        var tPros = 0
        var mainTPros = 0
        var pDes = ""
        for (i in summarys.indices) {
            val it = summarys[i]
            tPros += it.count
            if (i < max) {
                val lr = if (i > 0) "\n" else ""
                mainTPros += it.count
                pDes += "${lr}${i+1}、${it.proDes}"
            }
        }
        var per = if (tPros == 0) .0 else mainTPros.toDouble() / tPros
        head.clear()
        head.add(
            mutableListOf(
@@ -41,16 +55,23 @@
                ExcelUtil.MyCell("主要问题占比"),
            )
        )
        for (i in summarys.indices) {
            if (i >= max) break
//        for (i in summarys.indices) {
//            if (i >= max) break
//
//            val s = summarys[i]
//            contents.add(
//                mutableListOf(
//                    i + 1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, s.count,
//                    s.proDes, s.count, ExcelUtil.MyCell(s.countPer.toString(), isPercent = true)
//                )
//            )
//        }
            val s = summarys[i]
            contents.add(
                mutableListOf(
                    i + 1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, s.count,
                    s.proDes, s.count, ExcelUtil.MyCell(s.countPer.toString(), isPercent = true)
                1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, tPros,
                pDes, mainTPros, ExcelUtil.MyCell(per.toString(), isPercent = true)
                )
            )
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt
@@ -23,7 +23,8 @@
        val proMap = mutableMapOf<String?, MutableMap<String?, Summary>>()
        dataSource.loop { _, rowData ->
            rowData.problems.forEach {
                val s = (rowData.baseScene as SceneConstructionSite?)?.csStatus
                val baseScene = rowData.baseScene as SceneConstructionSite?
                val s = baseScene?.siExtension1
                if (!proMap.containsKey(s)) {
                    proMap[s] = mutableMapOf()
                }
@@ -32,7 +33,8 @@
                    proMap[s]?.put(pt, Summary().apply {
                        for (p in rowData.problemTypes) {
                            if (p.guid == pt) {
                                status = s ?: ""
                                stage = s ?: ""
                                status = baseScene?.csStatus ?: ""
                                proType = p.typename ?: ""
                                proDes = p.description ?: ""
                                break
@@ -100,7 +102,7 @@
            val s = summarys[i]
            contents.add(
                mutableListOf(
                    i + 1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, s.status, s.status,
                    i + 1, dataSource.year, dataSource.month, dataSource.rowData.scene?.type ?: "", dataSource.area, s.status, s.stage,
                    s.proType, s.proDes,
                    s.count, ExcelUtil.MyCell(s.countPer.toString(), isPercent = true),
                    s.changeNum, ExcelUtil.MyCell(s.changePer.toString(), isPercent = true),
@@ -111,6 +113,7 @@
    inner class Summary() {
        var status = ""
        var stage = ""
        var proType = ""
        var proDes = ""
        var count = 0
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/StScoreItem_1.kt
@@ -34,9 +34,9 @@
     */
    override fun otherProblem(size: Int): Int? {
        val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
            createCriteria().andEqualTo("sguid", info.sceneId)
                .andGreaterThanOrEqualTo("time", info.sTime)
                .andLessThan("time", info.eTime)
            createCriteria().andEqualTo("stguid", info.subTask?.stguid)
//                .andGreaterThanOrEqualTo("time", info.sTime)
//                .andLessThan("time", info.eTime)
        })
        var i = 0
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorobjectversionMapper.kt
@@ -8,7 +8,7 @@
@Mapper
interface MonitorobjectversionMapper:MyMapper<Monitorobjectversion> {
    @Select("select b.S_GUID from sm_t_monitorobjectversion as a left join sm_t_scense as b on a.S_GUID = b.S_GUID" +
            " where a.T_ID = #{param1} and b.S_TypeID = #{param2}")
    fun getSceneByType(topTaskId: String, sceneTypeId: Int): List<String>
    //    @Select("select b.S_GUID from sm_t_monitorobjectversion as a left join sm_t_scense as b on a.S_GUID = b.S_GUID" +
//            " where a.T_ID = #{param1} and b.S_TypeID = #{param2}")
    fun getSceneByType(topTaskId: String, sceneTypeId: Int, townCode: String? = null): List<String>
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt
@@ -18,4 +18,6 @@
    fun selectByTopTask(topTaskId: String, startTime: String, endTime: String, sceneTypeId: Int? = null): List<SubtaskVo>
    fun selectByTopTask2(topTaskId: String, sceneTypeId: Int? = null): List<Subtask>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt
@@ -42,5 +42,7 @@
    fun findByDate(date: String, userId: String): List<SubtaskVo>
    fun getByTopTaskAndDate(topTaskId: String, startTime: String, endTime: String, sceneTypeId: Int? = null): List<SubtaskVo>
    fun getByTopTaskAndDate(topTaskId: String, startTime: String?, endTime: String?, sceneTypeId: Int? = null): List<Subtask>
    fun getSummary(topTaskId: String, sceneTypeId: Int? = null): List<SubTaskSummary>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
@@ -323,6 +323,12 @@
                mediafileMapper.deleteByExample(Example(Mediafile::class.java).apply {
                    createCriteria().andEqualTo("businessguid", id)
                })
                //更新巡查信息中的问题数量
                val inspection = inspectionMapper.selectByPrimaryKey(p.iguid)
                if (inspection.problemcount != null && inspection.problemcount!! > 0) {
                    inspection.problemcount = inspection.problemcount!! - 1
                    inspectionMapper.updateByPrimaryKey(inspection)
                }
                BaseResponse(true, "问题删除成功", data = i)
            }
        }
@@ -486,6 +492,12 @@
            }
        }
        //更新巡查信息的问题数
        if (inspection.problemcount != null) {
            inspection.problemcount = inspection.problemcount!! + 1
            inspectionMapper.updateByPrimaryKey(inspection)
        }
        return BaseResponse(true)
    }
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
@@ -968,37 +968,60 @@
        return resultList
    }
    override fun getByTopTaskAndDate(topTaskId: String, startTime: String, endTime: String, sceneTypeId: Int?): List<SubtaskVo> {
        val startDate = dateUtil.StringToDate(startTime)
        val endDate = dateUtil.StringToDate(endTime)
        val cal = Calendar.getInstance().apply { time = startDate }
        val _startTime = dateUtil.DateToString(cal.time, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS) ?: startTime
        if (endDate == null) {
            cal.add(Calendar.MONTH, 1)
            cal.add(Calendar.DAY_OF_MONTH, -1)
        } else {
            cal.time = endDate
        }
        cal.set(Calendar.HOUR_OF_DAY, 23)
        cal.set(Calendar.MINUTE, 59)
        cal.set(Calendar.SECOND, 59)
        val _endTime = dateUtil.DateToString(cal.time, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS) ?: endTime
//        val resultList = mutableListOf<SubtaskVo>()
        val resultList = subtaskMapper.selectByTopTask(topTaskId, _startTime, _endTime, sceneTypeId)
//        subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
//            createCriteria()
//                    .andGreaterThanOrEqualTo("planstarttime", startDate)
//                    .andLessThanOrEqualTo("planstarttime", endDate)
//                    .andEqualTo("tguid", topTaskId)
//        }).forEach {
//            val vo = SubtaskVo()
//            BeanUtils.copyProperties(it, vo)
//            resultList.add(vo)
    override fun getByTopTaskAndDate(topTaskId: String, startTime: String?, endTime: String?, sceneTypeId: Int?): List<Subtask> {
//        val startDate = dateUtil.StringToDate(startTime)
//        val endDate = dateUtil.StringToDate(endTime)
//
//        val cal = Calendar.getInstance().apply { time = startDate }
//        val _startTime = dateUtil.DateToString(cal.time, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS) ?: startTime
//
//        if (endDate == null) {
//            cal.add(Calendar.MONTH, 1)
//            cal.add(Calendar.DAY_OF_MONTH, -1)
//        } else {
//            cal.time = endDate
//        }
//        cal.set(Calendar.HOUR_OF_DAY, 23)
//        cal.set(Calendar.MINUTE, 59)
//        cal.set(Calendar.SECOND, 59)
//        val _endTime = dateUtil.DateToString(cal.time, DateUtil.DateStyle.YYYY_MM_DD_HH_MM_SS) ?: endTime
        val resultList = subtaskMapper.selectByTopTask2(topTaskId, sceneTypeId)
        return resultList
    }
    override fun getSummary(topTaskId: String, sceneTypeId: Int?): List<SubTaskSummary> {
        val result = mutableListOf<SubTaskSummary>()
        subtaskMapper.selectByTopTask2(topTaskId, sceneTypeId).forEach {
            val scene = scenseMapper.selectByPrimaryKey(it.scenseid)
            var p = 0
            var c = 0
            var pc = 0
            var cc = 0
            problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
                createCriteria().andEqualTo("stguid", it.stguid)
            }).forEach {pro ->
                p++
                if (pro.ischanged == true) c++
                if (pro.extension3 != Constant.PROBLEM_UNCHECKED) pc++
                if (pro.extension3 == Constant.CHANGE_CHECK_PASS || pro.extension3 == Constant.CHANGE_CHECK_FAIL) cc++
            }
            result.add(SubTaskSummary().apply {
                stGuid = it.stguid
                stName = it.name
                sceneId = it.scenseid
                sceneName = scene.name
                sceneType = scene.type
                stPlanTime = it.planstarttime
                proNum = p
                changeNum = c
                proCheckedNum = pc
                changeCheckedNum = cc
            })
        }
        return result
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
package cn.flightfeather.supervision.lightshare.vo
import java.util.*
class SubTaskSummary {
    var stGuid: String? = null
    var stName: String? = null
    var sceneId: String? = null
    var sceneName: String? = null
    var sceneType: String? = null
    var stPlanTime: Date? = null
    var proNum = 0
    var changeNum = 0
    var proCheckedNum: Int = 0
    var changeCheckedNum: Int = 0
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
@@ -5,6 +5,7 @@
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.TaskVo
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.web.bind.annotation.*
@Api(tags = ["SubtaskController"], description = "巡查子任务API接口")
@@ -58,8 +59,15 @@
    @GetMapping("/getSubTask")
    fun getByTopTaskAndDate(
            @RequestParam("topTaskId") topTaskId: String,
            @RequestParam("startTime") startTime: String,
            @RequestParam("endTime") endTime: String,
            @RequestParam(value = "startTime", required = false) startTime: String?,
            @RequestParam(value = "endTime", required = false) endTime: String?,
            @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?
    ) = subtaskService.getByTopTaskAndDate(topTaskId, startTime, endTime, sceneTypeId)
    @ApiOperation("获取某类场景的巡查任务统计信息")
    @GetMapping("/summary")
    fun getByTopTaskAndDate(
        @RequestParam("topTaskId") topTaskId: String,
        @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?
    ) = subtaskService.getSummary(topTaskId, sceneTypeId)
}
src/main/resources/mapper/ds1/MonitorobjectversionMapper.xml
@@ -32,4 +32,16 @@
    MOV_Suitable, MOV_DisplayID, MOV_Year, MOV_Month, MOV_Day, MOV_ISCP, MOV_CustomPeriod, 
    MOV_Extension1, MOV_Extension2, MOV_Extension3, MOV_Remark
  </sql>
  <select id="getSceneByType" resultType="String">
    select
    b.S_GUID
    from sm_t_monitorobjectversion as a
    left join sm_t_scense as b
    on a.S_GUID = b.S_GUID
    where a.T_ID = #{param1} and b.S_TypeID = #{param2}
    <if test="param3 != null">
      and b.S_TownCode = #{param3}
    </if>
  </select>
</mapper>
src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt
@@ -39,9 +39,10 @@
    @Test
    fun go() {
        autoScore.sceneType = Constant.ScenseType.TYPE1
        autoScore.topTaskGrade("tgfMJWdUJqWE6bWo")
//        val subtask = subtaskMapper.selectByPrimaryKey("1DxdkFdVAdQD5Mce")
        autoScore.topTaskGrade("8QN1VzftuhBJmrF8")
//        val subtask = subtaskMapper.selectByPrimaryKey("OPmza2ddEAKiQHqz")
//        autoScore.sceneGrade(subtask)
//        autoScore.sceneGradeToFile(subtask)
//        autoScore3.go(2022, 1, 2)
//        val t = problemlistMapper.getStatisticalResult("310116", "2021-09-01 00:00:00", "2021-09-30 00:00:00", "1")
//        println()
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt
@@ -33,7 +33,11 @@
        val mode = 10
        //金山2022å¹´6月
        searchService.writeToFile(ExcelConfigVo("tgfMJWdUJqWE6bWo", districtCode = "310116", sceneType = 1), mode)
        searchService.writeToFile(ExcelConfigVo(
            "8QN1VzftuhBJmrF8",
            districtCode = "310106",
//            townCode = "310116113",
            sceneType = 1), mode)
        //金山2021å¹´3月
//        searchService.writeToFile(ExcelConfigVo("o7jdSzr79fe0NH3I", districtCode = "310116", sceneType = 1))
    }