1. 整合了飞羽环境、徐汇油烟及金山扬尘两个数据库;
2. 优化重构自动评估模块逻辑;
3. 新增监测数据自动化统;
4. 将自动统计应用于自动评估中;
已修改35个文件
已添加55个文件
7040 ■■■■■ 文件已修改
pom.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/Info.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataConfig.kt 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt 404 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDbMapper.kt 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopSceneTypeCheck.kt 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopDataAnalysis.kt 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem1.kt 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem2.kt 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JADataAnalysis.kt 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JAScore.kt 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem1.kt 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem2.kt 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem10.kt 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem11.kt 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem5.kt 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem7.kt 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem8.kt 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem9.kt 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/storage/StScoreItem1.kt 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem1.kt 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem2.kt 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/location/CoordinateUtil.kt 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseCols.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcelMulti.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/storage/JinAnScore.kt 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/CsScoreItem_2.kt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/MpScoreItem_2.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/WhScoreItem_2.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/datasource/config/DataSourceConfig.kt 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/datasource/config/MybatisConfig4ds3.kt 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteInfo.java 1038 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteMap.java 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/HourDustData.java 326 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampDeviceData.java 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampEnterBaseInfo.java 377 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/RestaurantBaseInfo.java 600 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/UserinfoTZ.kt 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/VehicleBaseInfo.java 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteInfoMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteMapMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/HourDustDataMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampDeviceDataMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampEnterBaseInfoMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/RestaurantBaseInfoMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/VehicleBaseInfoMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/entity/FumeDailyAnalysis.java 403 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/mapper/FumeDailyAnalysisMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AreaVo.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/generator/generatorConfig4ds1.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/generator/generatorConfig4ds3.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DustDataResultMapper.xml 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/SubtaskMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds2/DustSiteInfoMapper.xml 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds2/DustSiteMapMapper.xml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds2/HourDustDataMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds2/LampDeviceDataMapper.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds2/LampEnterBaseInfoMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds3/FumeDailyAnalysisMapper.xml 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -419,17 +419,12 @@
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.2</version>
                <configuration>
                    <configurationFile>src/main/resources/generator/generatorConfig4ds1.xml</configurationFile>
                    <configurationFile>src/main/resources/generator/generatorConfig4ds3.xml</configurationFile>
                    <overwrite>true</overwrite>
                    <verbose>true</verbose>
                </configuration>
                <dependencies>
                    <!--<dependency>-->
                    <!--<groupId>org.mybatis.generator</groupId>-->
                    <!--<artifactId>mybatis-generator-core</artifactId>-->
                    <!--<version>1.3.6</version>-->
                    <!--</dependency>-->
                    <dependency>
                        <groupId>tk.mybatis</groupId>
                        <artifactId>mapper</artifactId>
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
@@ -18,7 +18,7 @@
    @Bean
    fun runner() = ApplicationRunner {
        fetchController.run()
        fetchController. run()
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/Info.kt
@@ -21,5 +21,6 @@
        val sTime: LocalDateTime? = null,
        val eTime: LocalDateTime? = null,
        val subTask: Subtask? = null,
        val sceneIndex: Int? = null
        val sceneIndex: Int? = null,
        val online:Boolean = true
)
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
package cn.flightfeather.supervision.business.autooutput
import cn.flightfeather.supervision.business.Info
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationMapper
import cn.flightfeather.supervision.domain.ds1.mapper.ItemevaluationMapper
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
/**
 * è‡ªåŠ¨è¯„ä¼°ç»“æžœè¾“å‡º
 */
@Component
class AopOutput(
    private val evaluationMapper: EvaluationMapper,
    private val itemevaluationMapper: ItemevaluationMapper,
    private val dustDataResultMapper: DustDataResultMapper
) {
    /**
     * å°†è¯„分记录输出至数据库
     */
    fun toDbEvaluation(evaluationScene: AopDataSource.EvaluationScene, p: Pair<Evaluation, List<Itemevaluation>>) {
        //去除已有记录
        evaluationMapper.deleteByExample(Example(Evaluation::class.java).apply {
            createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
        })
        itemevaluationMapper.deleteByExample(Example(Itemevaluation::class.java).apply {
            createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
        })
        //写入数据库
        evaluationMapper.insert(p.first)
        p.second.forEach { il -> itemevaluationMapper.insert(il) }
    }
    /**
     * å°†ç›‘测数据统计结果入库
     */
    fun toDbDataResult(dustDataResult: DustDataResult) {
        val d = dustDataResultMapper.selectOne(DustDataResult().apply {
            drSceneId = dustDataResult.drSceneId
            drTime = dustDataResult.drTime
        })
        if (d == null) {
            dustDataResultMapper.insert(dustDataResult)
        } else {
            dustDataResult.drId = d.drId
            dustDataResultMapper.updateByPrimaryKey(dustDataResult)
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataConfig.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package cn.flightfeather.supervision.business.autooutput.datasource
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds2.entity.UserinfoTZ
import java.util.*
/**
 * æ•°æ®æ¥æºå‚æ•°
 */
data class AopDataConfig(
    val startTime: Date? = null,
    val endTime: Date? = null,
    val year: Int? = null,
    val month: Int? = null,
    val period: Int = 1,
    val provinceCode: String? = null,
    val cityCode: String? = null,
    val districtCode: String? = null,
    val districtName: String? = null,
    val townCode: String? = null,
    val topTaskGuid: String? = null,
    /**
     * åœºæ™¯ç±»åž‹æ ¹æ®ä¸åŒç³»ç»Ÿé‡‡ç”¨ä¸åŒçš„值,参考[Constant.ScenseType]
     */
    var sceneType: Int? = null,
    /**
     * å¯¹äºŽç›‘管系统,为场景[Scense.guid],
     * å¯¹äºŽçŽ¯å¢ƒç³»ç»Ÿï¼Œä¸ºç”¨æˆ·[UserinfoTZ.guid]
     */
    val objIdList: List<String>? = null,
)
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,404 @@
package cn.flightfeather.supervision.business.autooutput.datasource
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.*
import cn.flightfeather.supervision.domain.ds2.entity.LedgerRecord
import cn.flightfeather.supervision.domain.ds2.entity.LedgerSubType
import cn.flightfeather.supervision.domain.ds2.entity.UserMap
import cn.flightfeather.supervision.domain.ds2.entity.UserinfoTZ
import tk.mybatis.mapper.entity.Example
import java.time.LocalDateTime
import java.time.ZoneId
/**
 * è‡ªåŠ¨è¾“å‡ºæ•°æ®æº
 */
class AopDataSource(private val aopDbMapper: AopDbMapper, private val aopSceneTypeCheck: AopSceneTypeCheck) {
    private val sceneSourceList = mutableListOf<Scense?>()
    private val userSourceList = mutableListOf<UserinfoTZ?>()
    var config: AopDataConfig? = null
    private var mode = 0
    private val evaluationScene = EvaluationScene()
    /**
     * è®¾ç½®æ•°æ®æº
     */
    fun setResource(topTaskGuid: String?, sceneType: Int, districtName: String?, townCode: String?) {
        val config = AopDataConfig(topTaskGuid = topTaskGuid, sceneType = sceneType, districtName = districtName,
            townCode = townCode)
        evaluationScene.config = config
        val check = aopSceneTypeCheck.checkSceneType(sceneType)
        if (check.first) {
            initSceneSource(config)
        } else {
            initUserSource(config)
        }
    }
    fun setResource(config: AopDataConfig) {
        config.sceneType ?: return
        evaluationScene.config = config
        val check = aopSceneTypeCheck.checkSceneType(config.sceneType!!)
        if (check.first) {
            initSceneSource(config)
        } else {
            initUserSource(config)
        }
    }
    /**
     * è½®è¯¢æ•°æ®æº
     */
    fun loop(callback: (index:Int, evaluationScene: EvaluationScene) -> Unit) {
        when (mode) {
            0 -> {
                sceneSourceList.forEachIndexed { i, scene ->
                    evaluationScene.clear()
                    evaluationScene.index = i
                    evaluationScene.setDefaultScene(scene)
                    callback(i, evaluationScene)
                }
            }
            1 -> {
                userSourceList.forEachIndexed { i, user ->
                    evaluationScene.clear()
                    evaluationScene.index = i
                    evaluationScene.setDefaultUserTZ(user)
                    callback(i, evaluationScene)
                }
            }
        }
    }
    // ä»Žç›‘管系统获取场景
    private fun initSceneSource(config: AopDataConfig) {
        config.topTaskGuid ?: throw IllegalStateException("顶层任务id不能为null")
        this.config = config
        this.mode = 0
        sceneSourceList.clear()
        val taskSceneIdList =
            aopDbMapper.monitorobjectversionMapper.getSceneByType(config.topTaskGuid, config.sceneType, config.townCode)
        aopDbMapper.scenseMapper.selectByExample(Example(Scense::class.java).apply {
            createCriteria()
                .andIn("guid", taskSceneIdList)
//                .andEqualTo("provincecode", config.provinceCode)
//                .andEqualTo("citycode", config.cityCode)
//                .andEqualTo("districtcode", config.districtCode)
//                .andEqualTo("towncode", config.townCode)
//                .andEqualTo("typeid", config.sceneType)
//                .andNotEqualTo("extension1", '0')
        })?.let { sceneSourceList.addAll(it) }
    }
    // ä»Žå°è´¦ç³»ç»ŸèŽ·å–åœºæ™¯
    private fun initUserSource(config: AopDataConfig) {
        this.config = config
        this.mode = 1
        userSourceList.clear()
        aopDbMapper.userinfoTZMapper.selectByExample(Example(UserinfoTZ::class.java).apply {
            createCriteria().andEqualTo("extension1", config.districtName)
                .andEqualTo("extension2", config.sceneType)
                .andEqualTo("isenable", true)
                .andEqualTo("usertypeid", "3")
            and(createCriteria().orNotEqualTo("workno", "test").orIsNull("workno"))
        }).let { userSourceList.addAll(it) }
    }
    // å•个评估对象
    inner class EvaluationScene(){
        var index = 0
        var config: AopDataConfig? = null
        val scene = InfoProxy<Scense>()
        val userInfoTZ = InfoProxy<UserinfoTZ>()
        fun setDefaultScene(s: Scense?) {
            scene.value = s
            userInfoTZ.fetch = {_,_ ->
                val svUserId = aopDbMapper.userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
                    createCriteria().andEqualTo("dGuid", scene.value?.guid)
                })?.takeIf { m -> m.isNotEmpty() }?.get(0)?.guid
                val tzUserId = aopDbMapper.userMapMapper.selectByExample(Example(UserMap::class.java).apply {
                    createCriteria().andEqualTo("svUserId", svUserId)
                })?.takeIf { m -> m.isNotEmpty() }?.get(0)?.tzUserId
                aopDbMapper.userinfoTZMapper.selectByPrimaryKey(tzUserId)
            }
        }
        fun setDefaultUserTZ(u: UserinfoTZ?) {
            userInfoTZ.value = u
            scene.fetch = {_,_ ->
                val svUserId = aopDbMapper.userMapMapper.selectByExample(Example(UserMap::class.java).apply {
                    createCriteria().andEqualTo("tzUserId", userInfoTZ.value?.guid)
                })?.takeIf { m -> m.isNotEmpty() }?.get(0)?.svUserId
                val sId = aopDbMapper.userinfoMapper.selectByPrimaryKey(svUserId)?.dGuid
                aopDbMapper.scenseMapper.selectByPrimaryKey(sId)
            }
        }
        val userInfo = InfoProxy<Userinfo>{_,_ ->
            scene.value?.guid ?: return@InfoProxy null
            return@InfoProxy aopDbMapper.userinfoMapper.selectOne(Userinfo().apply {
                dGuid = scene.value?.guid
            })
        }
        //巡查任务信息
        val subTask = InfoProxy<Subtask> {_,_ ->
            return@InfoProxy aopDbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
                createCriteria().andEqualTo("scenseid", scene.value?.guid)
//                    .andBetween("planstarttime", config?.startTime, config?.endTime)
                    .andEqualTo("tguid", config?.topTaskGuid)
            })?.takeIf { it.isNotEmpty() }?.get(0)
        }
        //现场巡查信息
        val inspection = InfoProxy<Inspection>{_,_ ->
            val inspection = Inspection()
            inspection.stguid = subTask.value?.stguid
            return@InfoProxy aopDbMapper.inspectionMapper.selectOne(inspection)
        }
        //各场景特有的基本信息
        val baseScene = InfoProxy<BaseScene> {_,_ ->
            return@InfoProxy when (config?.sceneType.toString()) {
                // ç›‘管系统
                Constant.ScenseType.TYPE1.value -> {
                    aopDbMapper.sceneConstructionSiteMapper.selectByPrimaryKey(scene.value?.guid)
                }
                Constant.ScenseType.TYPE2.value -> {
                    aopDbMapper.sceneWharfMapper.selectByPrimaryKey(scene.value?.guid)
                }
                Constant.ScenseType.TYPE3.value -> {
                    aopDbMapper.sceneMixingPlantMapper.selectByPrimaryKey(scene.value?.guid)
                }
                Constant.ScenseType.TYPE14.value -> {
                    aopDbMapper.sceneStorageYardMapper.selectByPrimaryKey(scene.value?.guid)
                }
                // å°è´¦ç³»ç»Ÿ
                Constant.ScenseType.TYPE5.value -> {
                    aopDbMapper.restaurantBaseInfoMapper.selectByPrimaryKey(userInfoTZ.value?.guid)
                }
                Constant.ScenseType.TYPE6.value -> {
                    aopDbMapper.vehicleBaseInfoMapper.selectByPrimaryKey(userInfoTZ.value?.guid)
                }
                else -> null
            }
        }
        //具体的问题
        val problems = InfoProxy<MutableList<Problemlist>> {_,_ ->
            if (noRecord()) return@InfoProxy mutableListOf()
            return@InfoProxy aopDbMapper.problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
                createCriteria().andEqualTo("stguid", subTask.value?.stguid)
            })
        }
        //评估总分
        val evaluation = InfoProxy<Evaluation> {_,_ ->
            if (noRecord()) return@InfoProxy null
            return@InfoProxy aopDbMapper.evaluationMapper.selectByExample(Example(Evaluation::class.java).apply {
                createCriteria().andEqualTo("stguid", subTask.value?.stguid)
            })?.takeIf { it.isNotEmpty() }?.get(0)
        }
        //评估细则得分
        val itemevaluationList = InfoProxy<MutableList<Itemevaluation>> {_,_ ->
            return@InfoProxy aopDbMapper.itemevaluationMapper.selectByExample(Example(Itemevaluation::class.java).apply {
                createCriteria().andEqualTo("stguid", subTask.value?.stguid)
            })
        }
        //问题类型
        val problemTypes = InfoProxy<MutableList<Problemtype>>(config?.sceneType.toString()) { _, cacheMap ->
            val list = aopDbMapper.problemtypeMapper.selectByExample(Example(Problemtype::class.java).apply {
                createCriteria().andEqualTo("scensetypeid", scene.value?.typeid)
                    .andEqualTo("districtcode", scene.value?.districtcode)
                orderBy("extension1")
            })
            cacheMap[config?.sceneType.toString()] = list
            return@InfoProxy list
        }
        // FIXME: 2023/8/9 æ€»è§„则的获取必须在[topItems]调用之后,否则为空
        val baseRule = InfoProxy<Evaluationrule>()
        // FIXME: 2023/8/9 æ€»åˆ†çš„获取必须在[topItems]调用之后,否则为空
        val totalScore = InfoProxy<Int>()
        //自动评分规则一级分类
        val topItems = InfoProxy<MutableList<Evaluationsubrule2>>(config?.sceneType.toString()) { _, cacheMap ->
            val _topItems = mutableListOf<Evaluationsubrule2>()
            val _rules = mutableListOf<Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>>()
            val rule = aopDbMapper.evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply {
                createCriteria()
                    .andEqualTo("tasktypeid", 99)
                    .andEqualTo("scensetypeid", scene.value?.typeid)
            })
            if (rule.isNotEmpty()) {
                this@EvaluationScene.baseRule.value = rule[0]
                this@EvaluationScene.baseRule.cacheMap[config?.sceneType.toString()] = rule[0]
                val ruleId = rule[0].guid
                val rules =
                    aopDbMapper.evaluationsubruleMapper.selectByExample(Example(Evaluationsubrule2::class.java).apply {
                        createCriteria().andEqualTo("erguid", ruleId)
                    })
                rules.forEach {
                    if (it.ertype == 2) {
                        _topItems.add(it)
                    }
                }
                _topItems.sortBy { it.displayid }
                var t = 0
                _topItems.forEach {
                    t += it.maxscore ?: 0
                    val tempRules = mutableListOf<Evaluationsubrule2>()
                    for (i in rules) {
                        if (i.fatherid == it.guid && i.ertype == 3) {
                            tempRules.add(i)
                        }
                    }
                    //评分大项如果没有找到评分小项,则说明其直接对应最小评分项,其本身变成评分项
                    if (tempRules.isEmpty()) {
                        tempRules.add(it)
                    }
                    tempRules.sortBy { t -> t.displayid }
                    tempRules.forEach { temp ->
                        val tempSubRules = mutableListOf<Evaluationsubrule2>()
                        for (i in rules) {
                            if (i.fatherid == temp.guid && i.ertype == 4) {
                                tempSubRules.add(i)
                            }
                        }
                        tempSubRules.sortBy { ts -> ts.displayid }
                        _rules.add(Pair(temp, tempSubRules))
                    }
                }
                this@EvaluationScene.totalScore.value = t
                this@EvaluationScene.totalScore.cacheMap[config?.sceneType.toString()] = t
                this@EvaluationScene.rules.value = _rules
                this@EvaluationScene.rules.cacheMap[config?.sceneType.toString()] = _rules
            }
            cacheMap[config?.sceneType.toString()] = _topItems
            return@InfoProxy _topItems
        }
        // FIXME: 2023/8/9 å­è§„则的获取必须在[topItems]调用之后,否则为空
        //自动评分规则二级和三级分类
        val rules = InfoProxy<MutableList<Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>>>()
        //必填台账数量
        val ledgerCount = InfoProxy<Int>(config?.sceneType.toString()) {_, cacheMap ->
            val tzSceneType = Constant.ScenseType.typeMap(scene.value?.typeid)
            val list = aopDbMapper.ledgerSubTypeMapper.selectCountByExample(Example(LedgerSubType::class.java).apply {
                createCriteria().andEqualTo("lScenetype", tzSceneType).andEqualTo("lNeedupdate", true)
            })
            cacheMap[config?.sceneType.toString()] = list
            return@InfoProxy list
        }
        //用户实际提交台账数量
        val ledgerRecords = InfoProxy<List<LedgerRecord>> {_,_ ->
            return@InfoProxy aopDbMapper.ledgerRecordMapper.selectByExample(Example(LedgerRecord::class.java).apply {
                createCriteria().andEqualTo("lrYear", config?.year)
                    .andEqualTo("lrMonth", config?.month)
                    .andEqualTo("lrSubmitid", userInfoTZ.value?.guid)
            })
        }
        /**
         * èŽ·å–å½“å‰å·¡æŸ¥ä»»åŠ¡çš„ä¸ŠæœŸå·¡æŸ¥è®°å½•
         */
        fun lastSubTask(): EvaluationScene {
            val last = EvaluationScene()
            val r = aopDbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
                createCriteria().andEqualTo("scenseid", subTask.value?.scenseid)
                    .andLessThan("planstarttime", subTask.value?.planstarttime)
                orderBy("planstarttime").desc()
            })
            if (r.isNotEmpty()) {
                val thisMonth = LocalDateTime.ofInstant(subTask.value?.planstarttime?.toInstant(), ZoneId.systemDefault())
                    .withDayOfMonth(1).toLocalDate()
                val lastMonth = LocalDateTime.ofInstant(r[0]?.planstarttime?.toInstant(), ZoneId.systemDefault()).withDayOfMonth(1).toLocalDate()
                if (lastMonth.plusMonths(1).isEqual(thisMonth)) {
                    last.subTask.value = r[0]
                }
            }
            return last
        }
        /**
         * æ¸…空当前处理的对象的相关数据源
         */
        fun clear() {
            scene.clear()
            userInfo.clear()
            userInfoTZ.clear()
            subTask.clear()
            inspection.clear()
            baseScene.clear()
            problems.clear()
            evaluation.clear()
            itemevaluationList.clear()
            problemTypes.clear()
            baseRule.clear()
            totalScore.clear()
            topItems.clear()
            rules.clear()
            ledgerCount.clear()
            ledgerRecords.clear()
        }
        /**
         * åˆ¤æ–­åœºæ™¯æ˜¯å¦å·¡æŸ¥ç›‘管,有无巡查记录
         */
        fun noRecord() = subTask.value?.stguid == null
    }
    // è¯„估对象相关信息获取代理
    inner class InfoProxy<T>(
        val key: String? = null,
        var fetch: (defaultValue: T?, cacheMap: MutableMap<String, T?>) -> T? =
            { _, _ ->
                null
            },
    ) {
        private var _value: T? = null
        private var fetched: Boolean = false
        private var defaultValue: T? = null
        private var cacheTimeStamp = LocalDateTime.now()
        val cacheMap = mutableMapOf<String, T?>()
        var value: T?
            get() {
                if (defaultValue != null) {
                    return defaultValue
                } else if (!fetched && _value == null) {
                    _value = if (cacheMap.containsKey(key) && LocalDateTime.now().minusDays(1).isBefore(cacheTimeStamp)) {
                        cacheMap[key]
                    } else {
                        cacheTimeStamp = LocalDateTime.now()
                        fetch(defaultValue, cacheMap)
                    }
                    fetched = true
                }
                return _value
            }
            set(value) {
                defaultValue = value
            }
        fun clear() {
            defaultValue = null
            _value = null
            fetched = false
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDbMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package cn.flightfeather.supervision.business.autooutput.datasource
import cn.flightfeather.supervision.domain.ds1.mapper.*
import cn.flightfeather.supervision.domain.ds2.mapper.*
import org.springframework.stereotype.Component
@Component
class AopDbMapper (
    val scenseMapper: ScenseMapper,
    val problemlistMapper: ProblemlistMapper,
    val problemtypeMapper: ProblemtypeMapper,
    val subtaskMapper: SubtaskMapper,
    val inspectionMapper: InspectionMapper,
    val monitorobjectversionMapper: MonitorobjectversionMapper,
    val sceneConstructionSiteMapper: SceneConstructionSiteMapper,
    val sceneMixingPlantMapper: SceneMixingPlantMapper,
    val sceneStorageYardMapper: SceneStorageYardMapper,
    val sceneWharfMapper: SceneWharfMapper,
    val taskMapper: TaskMapper,
    val evaluationruleMapper: EvaluationruleMapper,
    val evaluationsubruleMapper: EvaluationsubruleMapper2,
    val evaluationMapper: EvaluationMapper,
    val itemevaluationMapper: ItemevaluationMapper,
    val ledgerSubTypeMapper: LedgerSubTypeMapper,
    val ledgerRecordMapper: LedgerRecordMapper,
    val userinfoMapper: UserinfoMapper,
    val userinfoTZMapper: UserinfoTZMapper,
    val userMapMapper: UserMapMapper,
    val townMapper: TownMapper,
    val restaurantBaseInfoMapper: RestaurantBaseInfoMapper,
    val vehicleBaseInfoMapper: VehicleBaseInfoMapper
)
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopSceneTypeCheck.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package cn.flightfeather.supervision.business.autooutput.datasource
import cn.flightfeather.supervision.common.utils.Constant
import org.springframework.stereotype.Component
/**
 * åœºæ™¯ç±»åž‹åˆ¤æ–­
 * çŽ¯ä¿¡ç è‡ªåŠ¨è¯„ä¼°ä¸­ï¼Œå‚ä¸Žè¯„ä¼°çš„ä¸åŒåœºæ™¯ç±»åž‹ï¼Œå¯èƒ½éƒ¨åˆ†å¤„äºŽçŽ°åœºç›‘ç®¡ï¼Œéƒ¨åˆ†æ²¡æœ‰ï¼›
 * çŽ°åœºç›‘ç®¡çš„åœºæ™¯ï¼Œåœºæ™¯ç±»åž‹ä½¿ç”¨æœ¬ç³»ç»Ÿï¼ˆé£žç¾½ç›‘ç®¡ï¼‰çš„å®šä¹‰ï¼›
 * æœªçŽ°åœºç›‘ç®¡çš„åœºæ™¯ï¼Œåœºæ™¯ç±»åž‹ä½¿ç”¨ï¼ˆé£žç¾½çŽ¯å¢ƒï¼‰ç³»ç»Ÿä¸­çš„å®šä¹‰ï¼›
 * åœºæ™¯ç±»åž‹çš„定义选择,则有数据库配置决定(可由管理用户自行修改配置);
 */
@Component
class AopSceneTypeCheck {
    /**
     * åœºæ™¯ç±»åž‹åˆ¤å®š
     * @return åˆ¤æ–­ç»“果,(是否使用本系统定义,类型值)
     */
    fun checkSceneType(sceneType: Int): Pair<Boolean, Int> {
        // TODO: 2023/9/7 é€šè¿‡æ•°æ®åº“配置表决定当前类型的最终类型定义
        // FIXME: 2023/9/7 æš‚时写死相关配置
        return if (sceneType.toString() == Constant.ScenseType.TYPE6.value) {
            Pair(false, Constant.ScenseType.typeMap(sceneType.toByte())!!.toInt())
        } else {
            Pair(true, sceneType)
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopDataAnalysis.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,145 @@
package cn.flightfeather.supervision.business.autooutput.score
import cn.flightfeather.supervision.business.autooutput.AopOutput
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataConfig
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper
import cn.flightfeather.supervision.business.autooutput.datasource.AopSceneTypeCheck
import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
import java.time.LocalDateTime
import java.time.ZoneId
import java.util.*
import kotlin.math.round
/**
 * ç›‘测数据分析入库
 * æ ¹æ®æ¯æœˆä¸ºä¸€ä¸ªå‘¨æœŸï¼Œç»Ÿè®¡å½“月的超标次数、均值、最大最小值、超区均值百分比、数据个数、有效率等数据
 */
abstract class AopDataAnalysis<T>(
    private val aopDbMapper: AopDbMapper,
    private val aopSceneTypeCheck: AopSceneTypeCheck,
    private val aopOutput: AopOutput,
) {
    /**
     * ç»Ÿè®¡ä¸­é—´å­˜å‚¨ç»“æž„
     */
    inner class TempResult(
        var total: Double = .0,
        var count: Int = 0,
    ){
        fun avg(): Double {
            return if (count == 0) {
                .0
            } else {
                round((total / count) * 1000) / 1000
            }
        }
    }
    //数据源
    private var source: AopDataSource? = null
    fun setResource(topTaskGuid: String?, sceneType: Int, year: Int, month: Int) {
        source = AopDataSource(aopDbMapper, aopSceneTypeCheck)
        val st = LocalDateTime.of(year, month, 1, 0, 0, 0)
        val et = st.plusMonths(1).minusSeconds(1)
        val sTime = Date.from(st.atZone(ZoneId.systemDefault()).toInstant())
        val eTime = Date.from(et.atZone(ZoneId.systemDefault()).toInstant())
        val config = AopDataConfig(topTaskGuid = topTaskGuid, sceneType = sceneType, startTime = sTime, endTime = eTime)
        source?.setResource(config)
    }
    /**
     * æ‰§è¡Œç»Ÿè®¡é€»è¾‘
     */
    fun execute() {
        val dAvg = districtAvg(source)
        //循环处理每个场景
        source?.loop { _, evaluationScene ->
            //获取原始监测数据
            val dataList = fetchDataResources(evaluationScene)
            //计算统计结果
            val tempExceedTimes = TempResult()
            val tempAvg = TempResult()
            val tempMax = TempResult()
            val tempMin = TempResult()
            dataList.forEach {
                it.forEach {t ->
                    t?.let {
                        exceedTimes(t, tempExceedTimes)
                        avg(t, tempAvg)
                        max(t, tempMax)
                        min(t, tempMin)
                    }
                }
            }
            val dustDataResult = DustDataResult().apply {
                drSceneId = evaluationScene.scene.value?.guid
                drSceneName = evaluationScene.scene.value?.name
                drTime = source?.config?.startTime
                drExceedTimes = tempExceedTimes.count
                drAvg = tempAvg.avg()
                drMax = tempMax.total
                drMin = tempMin.total
                drOverAvgPer = overAvgRate(drAvg, dAvg)
                drDataNum = count(dataList)
                drEffectiveRate = effectiveRate(dataList, evaluationScene)
            }
            //更新入库
            aopOutput.toDbDataResult(dustDataResult)
        }
    }
    /**
     * è®¡ç®—区均值
     * å½“前为范围内全部监测点的均值
     */
    abstract fun districtAvg(source: AopDataSource?): Double?
    /**
     * èŽ·å–åŽŸå§‹ç›‘æµ‹æ•°æ®
     */
    abstract fun fetchDataResources(evaluationScene: AopDataSource.EvaluationScene): List<List<T?>>
    /**
     * è¶…标次数
     */
    abstract fun exceedTimes(data: T, t: TempResult)
    /**
     * æœˆå‡å€¼
     */
    abstract fun avg(data: T, t: TempResult)
    /**
     * æœ€å¤§å€¼
     */
    abstract fun max(data: T, t: TempResult)
    /**
     * æœ€å°å€¼
     */
    abstract fun min(data: T, t: TempResult)
    /**
     * è¶…月均值百分比
     */
    abstract fun overAvgRate(avg: Double, dAvg: Double?): Double
    /**
     * æ•°æ®ä¸ªæ•°
     */
    open fun count(dataList: List<List<T?>>): Int {
        var count = 0
        dataList.forEach {
            count += it.size
        }
        return count
    }
    /**
     * æœ‰æ•ˆçއ
     */
    abstract fun effectiveRate(dataList: List<List<T?>>, evaluationScene: AopDataSource.EvaluationScene): Double
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,205 @@
package cn.flightfeather.supervision.business.autooutput.score
import cn.flightfeather.supervision.business.autooutput.AopOutput
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper
import cn.flightfeather.supervision.business.autooutput.datasource.AopSceneTypeCheck
import cn.flightfeather.supervision.business.autooutput.score.construction.CsScoreItem1
import cn.flightfeather.supervision.business.autooutput.score.construction.CsScoreItem2
import cn.flightfeather.supervision.business.autooutput.score.mixingplant.MpScoreItem1
import cn.flightfeather.supervision.business.autooutput.score.mixingplant.MpScoreItem2
import cn.flightfeather.supervision.business.autooutput.score.restaurant.*
import cn.flightfeather.supervision.business.autooutput.score.storage.StScoreItem1
import cn.flightfeather.supervision.business.autooutput.score.wharf.WhScoreItem1
import cn.flightfeather.supervision.business.autooutput.score.wharf.WhScoreItem2
import cn.flightfeather.supervision.common.utils.UUIDGenerator
import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
import org.springframework.stereotype.Component
import java.util.*
import kotlin.math.abs
/**
 * è‡ªåŠ¨è¯„ä¼°æµç¨‹
 */
@Component
class AopEvaluation(
    private val aopDbMapper: AopDbMapper,
    private val aopSceneTypeCheck: AopSceneTypeCheck,
    private val aopOutput: AopOutput,
    csScoreItem1: CsScoreItem1,
    csScoreItem2: CsScoreItem2,
    mpScoreItem1: MpScoreItem1,
    mpScoreItem2: MpScoreItem2,
    stScoreItem1: StScoreItem1,
    whScoreItem1: WhScoreItem1,
    whScoreItem2: WhScoreItem2,
    reScoreItem5: ReScoreItem5,
    reScoreItem7: ReScoreItem7,
    reScoreItem8: ReScoreItem8,
    reScoreItem9: ReScoreItem9,
    reScoreItem10: ReScoreItem10,
    reScoreItem11: ReScoreItem11,
) {
    //数据源
    private var source: AopDataSource? = null
    //特定评分项(除了统一的根据巡查问题直接扣分外,有特定的扣分逻辑的评估项)
    private val itemList = mutableListOf<ScoreItem>()
    init {
        itemList.apply {
            add(csScoreItem1)
            add(csScoreItem2)
            add(mpScoreItem1)
            add(mpScoreItem2)
            add(stScoreItem1)
            add(whScoreItem1)
            add(whScoreItem2)
            add(reScoreItem5)
            add(reScoreItem7)
            add(reScoreItem8)
            add(reScoreItem9)
            add(reScoreItem10)
            add(reScoreItem11)
        }
    }
    fun setResource(topTaskGuid: String?, sceneType: Int, districtName: String? = null, townCode: String? = null) {
        source = AopDataSource(aopDbMapper, aopSceneTypeCheck)
        source?.setResource(topTaskGuid, sceneType, districtName, townCode)
    }
    /**
     * æ‰§è¡Œè¯„分逻辑
     */
    fun execute() {
        //获取数据源(待评估的场景)
        //循环处理每个场景
        source?.loop {index, evaluationScene ->
            if (evaluationScene.noRecord()) return@loop
            itemGrade(index, evaluationScene)
            totalGrade(index, evaluationScene)?.run {
                aopOutput.toDbEvaluation(evaluationScene, this)
            }
        }
    }
    /**
     * æ¡ç›®æ‰“分
     */
    private fun itemGrade(index: Int, evaluationScene: AopDataSource.EvaluationScene) {
        // è§„则条目得分初始化
        evaluationScene.topItems.value?.forEach { s -> s.extension1 = null }
        evaluationScene.rules.value?.forEach { p ->
            p.first.extension1 = null
            p.second.forEach { e -> e.extension1 = null }
        }
        /** 1. æ ¹æ®è¯„分规则对应的问题自动判断是否扣分***************************************************************/
        // èŽ·å–è¯¥æ¬¡å·¡æŸ¥ä»»åŠ¡ä¸‹çš„æ‰€æœ‰é—®é¢˜
        val pList = evaluationScene.problems.value?.map { it.ptguid } ?: emptyList()
        // è®¡ç®—每条评分规则的得分
        evaluationScene.rules.value?.forEach { r ->
            // è¯„分条目
            val rule = r.first
            // å…·ä½“评分选项
            val subRule = r.second
            subRule.forEach { sr ->
                // å­˜åœ¨å¤šä¸ªè¯„分项和同一个问题关联,因此必须全部评分项都判定一遍
                sr.problemlist?.split(",")?.forEach { pId ->
                    if (pList.contains(pId)) {
                        sr.extension1 = (0 - (sr.maxscore ?: 0)).toString()
                    }
                }
            }
            ScoreUtil.subRuleCal(r)
        }
        /** 2.部分有特殊评分逻辑的规则进行计算*************************************************************************/
        itemList.forEach { item -> item.execute(evaluationScene) }
        /** 3. è¡¥å…¨å„上级评分项的计分*************************************************************************/
        evaluationScene.rules.value?.forEach { r ->
            val fatherId = r.first.fatherid
            for (t in (evaluationScene.topItems.value ?: emptyList())) {
                if (t.guid == fatherId) {
                    var s = t.extension1?.toIntOrNull() ?: 0
                    s += r.first.extension1?.toIntOrNull() ?: 0
                    // é™åˆ¶æœ€é«˜æ‰£åˆ†
                    if (abs(s) > (t.maxscore ?: 0)) {
                        s = 0 - (t.maxscore ?: 0)
                    }
                    t.extension1 = s.toString()
                    break
                }
            }
        }
    }
    /**
     * è®¡ç®—总分
     */
    private fun totalGrade(index: Int, evaluationScene: AopDataSource.EvaluationScene): Pair<Evaluation, List<Itemevaluation>>? {
        val scene = evaluationScene.scene.value ?: return null
        val topItems = evaluationScene.topItems.value ?: return null
        val rules = evaluationScene.rules.value ?: return null
        val subTask = evaluationScene.subTask.value
        val inspection = evaluationScene.inspection.value
        val totalScore = evaluationScene.totalScore.value ?: return null
        var total = 0//总扣除的分数
        evaluationScene.topItems.value?.forEach top@{ top ->
            total += top.extension1?.toIntOrNull() ?: 0
        }
        val evaluation = Evaluation().apply {
                evaluationScene.baseRule.value?.let {
                guid = UUIDGenerator.generate16ShortUUID()
                iguid = inspection?.guid
                stguid = subTask?.stguid
                sguid = subTask?.scenseid
                scensetypeid = scene.typeid
                scensetype = scene.type
                subscensetypeid = scene.scensesubtypeid
                subscensetype = scene.scensesubtype
                ertype = it.ruletype?.toByte()
                provincecode = scene.provincecode
                provincename = scene.provincename
                citycode = scene.citycode
                cityname = scene.cityname
                districtcode = scene.districtcode
                districtname = scene.districtname
                towncode = scene.towncode
                townname = scene.townname
                scensename = scene.name
                scenseaddress = scene.location
                evaluatetime = subTask?.planstarttime
                evaluatorguid = "admin"
                evaluatorusername = "admin"
                evaluatorrealname = "admin"
                resultscorebef = (totalScore - abs(total)).toString()
                createdate = subTask?.planstarttime
                updatedate = Date()
            }
        }
        //子项具体得分
        val itemevaluationList = mutableListOf<Itemevaluation>()
        topItems.forEach { subRule ->
            val item = ScoreUtil.newItemEvaluation(evaluationScene, subRule)
            itemevaluationList.add(item)
        }
        rules.forEach { p ->
            if (p.first.ertype != 2) {
                val item = ScoreUtil.newItemEvaluation(evaluationScene, p.first)
                itemevaluationList.add(item)
            }
            p.second.forEach { r ->
                val item1 = ScoreUtil.newItemEvaluation(evaluationScene, r)
                itemevaluationList.add(item1)
            }
        }
        return Pair(evaluation, itemevaluationList)
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
package cn.flightfeather.supervision.business.autooutput.score
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import cn.flightfeather.supervision.domain.ds1.mapper.ProblemlistMapper
import org.springframework.beans.factory.annotation.Autowired
import tk.mybatis.mapper.entity.Example
import kotlin.math.abs
/**
 * è‡ªåŠ¨è¯„åˆ†æ¡ç›®
 */
abstract class ScoreItem() {
    //自动评分条目id
    abstract var id: String
    //自动评分条目名称
    abstract var name:String
    //最大分值
    var maxScore: Int = 0
    //最小分值(默认0分)
    var minScore: Int = 0
    val dateUtil = DateUtil()
    // è¯„分项是否豁免不扣分
    var exemption = false
    lateinit var evaluationScene: AopDataSource.EvaluationScene
    private var rulePair: Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>? = null
    @Autowired
    lateinit var problemlistMapper: ProblemlistMapper
    /**
     * åªæ‰§è¡Œç‰¹æ®Šæ‰£åˆ†é€»è¾‘
     */
    fun execute(evaluationScene: AopDataSource.EvaluationScene) {
        this.evaluationScene = evaluationScene
        if (!exemption && !evaluationScene.noRecord()) {
            getRule(evaluationScene.rules.value)
            calScore()
        }
    }
    /**
     * èŽ·å–è¯„åˆ†è§„åˆ™
     */
    private fun getRule(eList: MutableList<Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>>?) {
        if (eList == null) return
        for (e in eList) {
            if (e.first.guid == id) {
                rulePair = e
                e.first.maxscore?.let { maxScore = it }
                e.first.minscore?.let { minScore = it }
                e.second.sortBy { it.displayid }
                break
            }
        }
    }
    /**
     * æ ¹æ®ç³»ç»Ÿå¤–获取的信息,进行扣分判定。返回需要扣分的条目序号
     * @param size ä¼ å…¥è¯„分条目的数量,评分条目按照一定规则进行排序
     * @return è¿”回需要扣分的评分条目的序号
     */
    abstract fun otherProblem(size: Int): Int?
    /**
     * è‡ªåŠ¨è¯„åˆ†è®¡ç®—é€»è¾‘
     */
    fun calScore() {
        if (rulePair?.second == null || rulePair?.second?.isEmpty() == true) {
            println("${name}: è¯„分条目为空,不做评分")
            return
        }
        otherProblem(rulePair?.second!!.size)?.let {i-> rulePair?.second!![i].getScore() }
        ScoreUtil.subRuleCal(rulePair)
    }
    /**
     * å‡åˆ†æ¨¡å¼ä¸‹ï¼Œè®¡ç®—具体选项的得分
     */
    fun Evaluationsubrule2.getScore() {
        extension1 = (0 - (maxscore ?: 0)).toString()
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
package cn.flightfeather.supervision.business.autooutput.score
import cn.flightfeather.supervision.business.Info
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
import cn.flightfeather.supervision.common.utils.UUIDGenerator
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
import cn.flightfeather.supervision.domain.ds1.entity.Inspection
import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
import kotlin.math.abs
/**
 * å¾—分计算工具
 * è¯„分表格分为三个层级
 * ç¬¬ä¸€å±‚为大分类,第二层为评估标准,第三层为标准对应的不同程度的评估结果
 */
object ScoreUtil {
    /**
     * è®¡ç®—某一具体评分标准的得分
     * é’ˆå¯¹å‡åˆ†æ¨¡å¼
     */
    fun subRuleCal(rulePair: Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>?) {
        val rule = rulePair?.first
        val itemList = rulePair?.second
        var total: Int? = null
        itemList?.forEach {
            if (!it.extension1.isNullOrBlank()) {
                total = (total ?: 0) + it.extension1!!.toInt()
            }
        }
        if (total == null) {
            rule?.extension1 = "0"
        } else {
            val s = if (abs(total!!) > rule?.maxscore!!) {
                0 - rule.maxscore!!
            } else {
                total
            }
            rule.extension1 = s.toString()
        }
    }
    /**
     * ç”Ÿæˆæ–°çš„一条评分记录
     */
    fun newItemEvaluation(evaluationScene: AopDataSource.EvaluationScene, itemRule: Evaluationsubrule2) =
        Itemevaluation().apply {
            val rule = evaluationScene.baseRule.value
            val subTask = evaluationScene.subTask.value
            val inspection = evaluationScene.inspection.value
            ieguid = UUIDGenerator.generate16ShortUUID()
            iguid = inspection?.guid
            stguid = subTask?.stguid
            sguid = subTask?.scenseid
            sensename = subTask?.scensename
            erguid = rule?.guid
            rulename = rule?.rulename
            ruletype = rule?.ruletype?.toInt()
            ertype = itemRule.ertype
            esrguid = itemRule.guid
            name = itemRule.itemname
            value = itemRule.extension1 ?: "0"
            extension1 = (itemRule.extension1 != null).toString()
        }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem1.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
package cn.flightfeather.supervision.business.autooutput.score.construction
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import javax.annotation.PostConstruct
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * å·¥åœ°
 */
@Component
class CsScoreItem1: ScoreItem() {
    companion object {
        private lateinit var instance: CsScoreItem1
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "amSNTZfXs2XXR1td"
    override var name: String = "整改措施及效果"
    /**
     * æ‰§æ³•检查汇总情况
     * é€‰é¡¹å¦‚下:
     *      1.问题部分整改或不及时提供材料
     *      2.问题无整改
     */
    override fun otherProblem(size: Int): Int? {
        val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
            createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
//                .andGreaterThanOrEqualTo("time", info.sTime)
//                .andLessThan("time", info.eTime)
        })
        var i = 0
        val total = p.size
        var changed = 0
        p.forEach {
            if (it.ischanged == true) {
                changed++
            }
        }
        return when {
            changed == 0 && total > 0 -> 1
            changed < total -> 0
            else -> null
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem2.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
package cn.flightfeather.supervision.business.autooutput.score.construction
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDateTime
import java.time.ZoneId
import javax.annotation.PostConstruct
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * å·¥åœ°
 */
@Component
class CsScoreItem2: ScoreItem() {
    companion object {
        private lateinit var instance: CsScoreItem2
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "dCQbQ8ibc6nexiJo"
    override var name: String = "扬尘在线监测数据量级"
    @Autowired
    lateinit var dustDataResultMapper: DustDataResultMapper
    /**
     * æ‰¬å°˜åœ¨çº¿ç›‘测数据量级
     * é€‰é¡¹å¦‚下:
     *      1.监测数据出现单日及以上有效超标
     *      2.监测数据月均值超区域月均值20%以上或数据明显异常
     */
    override fun otherProblem(size: Int): Int? {
        val time = evaluationScene.subTask.value?.planstarttime
        val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
        val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
        val et = st.plusMonths(1)
        val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply {
            createCriteria().andGreaterThanOrEqualTo("drTime", st)
                .andLessThan("drTime", et)
                .andEqualTo("drSceneId", evaluationScene.scene.value?.guid)
        })
        var result: Int? = null
        r.forEach {
            if (it == null) return@forEach
            if (it.drExceedTimes > 0) {
                result = 0
            }
            if (it.drOverAvgPer > 0.2) {
                result = 1
            }
        }
        return result
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JADataAnalysis.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,153 @@
package cn.flightfeather.supervision.business.autooutput.score.construction
import cn.flightfeather.supervision.business.autooutput.AopOutput
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper
import cn.flightfeather.supervision.business.autooutput.datasource.AopSceneTypeCheck
import cn.flightfeather.supervision.business.autooutput.score.AopDataAnalysis
import cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap
import cn.flightfeather.supervision.domain.ds2.entity.HourDustData
import cn.flightfeather.supervision.domain.ds2.mapper.DustSiteMapMapper
import cn.flightfeather.supervision.domain.ds2.mapper.HourDustDataMapper
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.Duration
import java.time.LocalDateTime
import java.time.ZoneId
import kotlin.math.round
/**
 * é™å®‰å·¥åœ°æ‰¬å°˜ç›‘测数据统计
 */
@Component
class JADataAnalysis(
    aopDbMapper: AopDbMapper,
    aopSceneTypeCheck: AopSceneTypeCheck,
    aopOutput: AopOutput,
    private val dustSiteMapMapper: DustSiteMapMapper,
    private val hourDustDataMapper: HourDustDataMapper,
) : AopDataAnalysis<HourDustData>(aopDbMapper, aopSceneTypeCheck, aopOutput) {
    companion object {
        private const val FLAG_NA = "NA"
        private const val FLAG_N = "N"
        private const val FLAG_I = "I"
    }
    override fun districtAvg(source: AopDataSource?): Double? {
        var total = .0
        var count = 0
        hourDustDataMapper.selectByExample(Example(HourDustData::class.java).apply {
            createCriteria().andBetween("lst", source?.config?.startTime, source?.config?.endTime)
        }).forEach {
            it?.dustvalue?.let { v ->
                total += v
                count++
            }
        }
        return if (count == 0) {
            .0
        } else {
            round((total / count) * 1000) / 1000
        }
    }
    override fun fetchDataResources(evaluationScene: AopDataSource.EvaluationScene): List<List<HourDustData?>> {
        val dustSiteMaps = dustSiteMapMapper.selectByExample(Example(DustSiteMap::class.java).apply {
            createCriteria().andEqualTo("svUserId", evaluationScene.userInfo.value?.guid)
                .andIsNotNull("jaMnCode")
        })
        if (dustSiteMaps.isEmpty()) return emptyList()
        val mnCodeList =  dustSiteMaps.map { it?.jaMnCode }
        val map = mutableMapOf<String?, MutableList<HourDustData?>>()
        hourDustDataMapper.selectByExample(Example(HourDustData::class.java).apply {
            createCriteria().andBetween("lst", evaluationScene.config?.startTime, evaluationScene.config?.endTime)
                .andIn("mncode", mnCodeList)
        }).forEach {
            if (!map.containsKey(it?.mncode)) {
                map[it?.mncode] = mutableListOf()
            }
            map[it?.mncode]?.add(it)
        }
        val res = mutableListOf<List<HourDustData?>>()
        map.forEach { (_, u) ->
            res.add(u)
        }
        return res
    }
    override fun exceedTimes(data: HourDustData, t: TempResult) {
        data.dustvalue?.let {
            if (it >= 1) {
                t.count++
            }
        }
    }
    override fun avg(data: HourDustData, t: TempResult) {
        // è¡¥ä¼ çš„不计算
        if (data.flag == FLAG_NA) return
        data.dustvalue?.let {
            t.total += it
            t.count++
        }
    }
    override fun max(data: HourDustData, t: TempResult) {
        data.dustvalue?.let {
            if (it > t.total) {
                t.total = it
            }
        }
    }
    override fun min(data: HourDustData, t: TempResult) {
        // è¡¥ä¼ çš„不计算
        if (data.flag == FLAG_NA) return
        data.dustvalue?.let {
            if (t.count == 0 || it < t.total) {
                t.total = it
            }
            // é€šè¿‡t.count æ¥åˆ¤å®šæ˜¯å¦æ˜¯åˆå§‹åŒ–状态
            if (t.count == 0) t.count = 1
        }
    }
    override fun overAvgRate(avg: Double, dAvg: Double?): Double {
        return if (dAvg != null) {
            round(((avg - dAvg) / dAvg) * 1000) / 1000
        } else {
            .0
        }
    }
    override fun count(dataList: List<List<HourDustData?>>): Int {
        var count = 0
        dataList.forEach {
            it.forEach {h ->
                if (h?.flag != FLAG_NA) {
                    count ++
                }
            }
        }
        return count
    }
    override fun effectiveRate(dataList: List<List<HourDustData?>>, evaluationScene: AopDataSource.EvaluationScene):
            Double {
        if (dataList.isEmpty()) return .0
        val st = LocalDateTime.ofInstant(evaluationScene.config?.startTime?.toInstant(), ZoneId.systemDefault())
        val et = LocalDateTime.ofInstant(evaluationScene.config?.endTime?.toInstant(), ZoneId.systemDefault())
        val days = Duration.between(st, et).toDays() + 1
        return if (days == 0L) {
            .0
        } else {
            round((count(dataList) / (dataList.size * days * 24).toDouble()) * 1000) / 1000
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JAScore.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package cn.flightfeather.supervision.business.autooutput.score.construction
import cn.flightfeather.supervision.business.Info
import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
import cn.flightfeather.supervision.domain.ds1.entity.Score
import cn.flightfeather.supervision.domain.ds1.mapper.ScoreMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDateTime
import java.time.ZoneId
/**
 * ä¸Šæµ·å¸‚静安区单独的50分制评分结果,
 * æ ¹æ®è‡ªåŠ¨è¯„åˆ†ç»“æžœè¿›è¡Œè½¬æ¢å¾—å‡º
 */
@Component
class JAScore {
    @Autowired
    lateinit var scoreMapper: ScoreMapper
    fun toDb(e: Evaluation, info: Info) {
        val time = LocalDateTime.ofInstant(e.evaluatetime?.toInstant(), ZoneId.systemDefault())
        val scoreVo = Score().apply {
            sceneId = e.sguid
            sceneName = e.scensename
            year = time.year
            month = time.monthValue
            districtCode = e.districtcode
            districtName = e.districtname
            score = transform(e.resultscorebef?.toIntOrNull() ?: 0)
            completion = !info.online
        }
        val res = scoreMapper.selectByExample(Example(Score::class.java).apply {
            createCriteria().andEqualTo("sceneId", e.sguid)
                .andEqualTo("year", time.year)
                .andEqualTo("month", time.monthValue)
        })
        if (res.isNotEmpty()) {
            scoreVo.id = res[0].id
            scoreMapper.updateByPrimaryKeySelective(scoreVo)
        } else {
            scoreMapper.insert(scoreVo)
        }
    }
    /**
     * åˆ†æ•°è½¬æ¢
     */
    private fun transform(oldS: Int): Int {
        return when {
            // åŸºæœ¬è§„范
            oldS >= 90 -> 50
            // ä¸è§„范
            oldS >= 50 -> 30
            // ä¸¥é‡ä¸è§„范
            else -> 10
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem1.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
package cn.flightfeather.supervision.business.autooutput.score.mixingplant
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import javax.annotation.PostConstruct
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * æ…拌站
 */
@Component
class MpScoreItem1: ScoreItem() {
    companion object {
        private lateinit var instance: MpScoreItem1
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "KxWcuelbrnCtzw6n"
    override var name: String = "整改措施及效果"
    /**
     * æ‰§æ³•检查汇总情况
     * é€‰é¡¹å¦‚下:
     *      1.问题部分整改或不及时提供材料
     *      2.问题无整改
     */
    override fun otherProblem(size: Int): Int? {
        val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
            createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
//                .andGreaterThanOrEqualTo("time", info.sTime)
//                .andLessThan("time", info.eTime)
        })
        var i = 0
        val total = p.size
        var changed = 0
        p.forEach {
            if (it.ischanged == true) {
                changed++
            }
        }
        return when {
            changed == 0 && total > 0 -> 1
            changed < total -> 0
            else -> null
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem2.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
package cn.flightfeather.supervision.business.autooutput.score.mixingplant
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDateTime
import java.time.ZoneId
import javax.annotation.PostConstruct
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * æ…拌站
 */
@Component
class MpScoreItem2: ScoreItem() {
    companion object {
        private lateinit var instance: MpScoreItem2
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "BoVfRjr5r7RtsqGC"
    override var name: String = "扬尘在线监测数据量级"
    @Autowired
    lateinit var dustDataResultMapper: DustDataResultMapper
    /**
     * æ‰¬å°˜åœ¨çº¿ç›‘测数据量级
     * é€‰é¡¹å¦‚下:
     *      1.监测数据出现单日及以上有效超标
     *      2.监测数据月均值超区域月均值20%以上或数据明显异常
     */
    override fun otherProblem(size: Int): Int? {
        val time = evaluationScene.subTask.value?.planstarttime
        val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
        val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
        val et = st.plusMonths(1)
        val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply {
            createCriteria().andGreaterThanOrEqualTo("drTime", st)
                .andLessThan("drTime", et)
                .andEqualTo("drSceneId", evaluationScene.scene.value?.guid)
        })
        var result: Int? = null
        r.forEach {
            if (it == null) return@forEach
            if (it.drExceedTimes > 0) {
                result = 0
            }
            if (it.drOverAvgPer > 0.2) {
                result = 1
            }
        }
        return result
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem10.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,100 @@
package cn.flightfeather.supervision.business.autooutput.score.restaurant
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds2.entity.Punishment
import cn.flightfeather.supervision.domain.ds2.mapper.PunishmentMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneId
import java.util.*
import javax.annotation.PostConstruct
@Component
class ReScoreItem10: ScoreItem() {
    companion object {
        private lateinit var instance: ReScoreItem10
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    @Autowired
    lateinit var punishmentMapper: PunishmentMapper
    override var id: String = "dlALSsoF63Z2FOz0"
    override var name: String = "行政处罚"
    /**
     * å­£åº¦å†…行政处罚记录规格化导入
     * é€‰é¡¹å¦‚下:
     *      1.无责令整改、执法意见和行政处罚
     *      2.收到责令改正决定书
     *      3.收到执法意见书
     *      4.有环境违法行为且受到行政处罚
     */
    override fun otherProblem(size: Int): Int? {
        val time = evaluationScene.subTask.value?.planstarttime
        val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
        val s = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
        val e = s.plusMonths(1)
        var i = 1
        when {
            condition3(s, e) -> {
                i = 3
                if (i > size - 1) i = size - 1
                return i
            }
            condition2(s, e) -> {
                i = 2
                if (i > size - 1) i = size - 1
                return i
            }
            condition1(s, e) -> {
                i = 1
                if (i > size - 1) i = size - 1
                return i
            }
            else -> return null
        }
    }
    /**
     * @return true  æ”¶åˆ°è´£ä»¤æ”¹æ­£å†³å®šä¹¦
     */
    private fun condition1(s: LocalDateTime, e: LocalDateTime): Boolean {
        val p = punishmentMapper.selectByExample(Example(Punishment::class.java).apply {
            createCriteria().andEqualTo("pmSceneId", evaluationScene.userInfoTZ.value?.guid)
                .andEqualTo("pmExtension1", "1")
                .andGreaterThanOrEqualTo("pmTime", s)
                .andLessThan("pmTime", e)
        })
        return p.isNotEmpty()
    }
    /**
     * @return true  æ”¶åˆ°æ‰§æ³•意见书
     */
    private fun condition2(s: LocalDateTime, e: LocalDateTime): Boolean {
        return false
    }
    /**
     * @return true  æœ‰çŽ¯å¢ƒè¿æ³•è¡Œä¸ºä¸”å—åˆ°è¡Œæ”¿å¤„ç½š
     */
    private fun condition3(s: LocalDateTime, e: LocalDateTime): Boolean {
        val p = punishmentMapper.selectByExample(Example(Punishment::class.java).apply {
            createCriteria().andEqualTo("pmSceneId", evaluationScene.userInfoTZ.value?.guid)
                .andEqualTo("pmExtension1", "0")
                .andGreaterThanOrEqualTo("pmTime", s)
                .andLessThan("pmTime", e)
        })
        return p.isNotEmpty()
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem11.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
package cn.flightfeather.supervision.business.autooutput.score.restaurant
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import org.springframework.stereotype.Component
import javax.annotation.PostConstruct
@Component
class ReScoreItem11: ScoreItem() {
    companion object {
        private lateinit var instance: ReScoreItem11
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "QFzQPYgUXaHU4tTD"
    override var name: String="信用承诺自评"
    /**
     * é£žç¾½çŽ¯å¢ƒAPP年度承诺和月度自评记录
     * é€‰é¡¹å¦‚下:
     *      1.环境信用不规范或承诺未按时提交或超有效期,以及涉及法人变更的或营业执照变更未重新承诺的
     *      2.环境信用自评未按时自评或未按时提
     */
    override fun otherProblem(size: Int): Int? {
        var i = 1
        if (condition1()) {
            if (i > size - 1) i = size - 1
            return i
        } else if (condition2()) {
            i = 2
            if (i > size - 1) i = size - 1
            return i
        }
        return null
    }
    /**
     * @return true  çŽ¯å¢ƒä¿¡ç”¨ä¸è§„èŒƒæˆ–æ‰¿è¯ºæœªæŒ‰æ—¶æäº¤æˆ–è¶…æœ‰æ•ˆæœŸï¼Œä»¥åŠæ¶‰åŠæ³•äººå˜æ›´çš„æˆ–è¥ä¸šæ‰§ç…§å˜æ›´æœªé‡æ–°æ‰¿è¯ºçš„
     */
    private fun condition1(): Boolean {
        return false
    }
    /**
     * @return true  çŽ¯å¢ƒä¿¡ç”¨è‡ªè¯„æœªæŒ‰æ—¶è‡ªè¯„æˆ–æœªæŒ‰æ—¶æ
     */
    private fun condition2(): Boolean {
        return false
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem5.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
package cn.flightfeather.supervision.business.autooutput.score.restaurant
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDateTime
import java.time.ZoneId
import javax.annotation.PostConstruct
@Component
class ReScoreItem5: ScoreItem() {
    companion object {
        private lateinit var instance: ReScoreItem5
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "PSQUi9f0f7JK6w9d"
    override var name: String="油烟在线监测数据量级"
    @Autowired
    lateinit var dustDataResultMapper: DustDataResultMapper
    /**
     * å¾æ±‡åŒºé¤é¥®ç›‘管平台联网记录、在线率分析数据和高峰经营时段小时超标情况
     * é€‰é¡¹å¦‚下:
     *      1.数据无异常且无超标或显示净化装置清洁
     *      2.高峰经营时段数据在线率低于90%或显示净化装置故障
     *      3.当月高峰经营时段出现三次及以上10分钟均值超标或显示净化装置较脏
     *      4.当月高峰经营时段数据持续异常或出现三次及以上小时数据超标或无油烟净化装置或净化装置未正常开启
     */
    override fun otherProblem(size: Int): Int? {
        var i = 1
        when {
            condition1() -> {
                if (i > size - 1) i = size - 1
                return i
            }
            condition2() -> {
                i = 2
                if (i > size - 1) i = size - 1
                return i
            }
            condition3() -> {
                i = 3
                if (i > size - 1) i = size - 1
                return i
            }
            else -> return null
        }
    }
    /**
     * @return true  é«˜å³°ç»è¥æ—¶æ®µæ•°æ®åœ¨çº¿çŽ‡ä½ŽäºŽ90%或显示净化装置故障
     */
    private fun condition1(): Boolean {
        return false
    }
    /**
     * @return true  å½“月高峰经营时段出现三次及以上10分钟均值超标或显示净化装置较脏
     */
    private fun condition2(): Boolean {
        val time = evaluationScene.subTask.value?.planstarttime
        val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
        val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
        val et = st.plusMonths(1)
        val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply {
            createCriteria().andGreaterThanOrEqualTo("drTime", st)
                .andLessThan("drTime", et)
                .andEqualTo("drSceneId", evaluationScene.scene.value?.guid)
        })
        var result = false
        r.forEach {
            if (it == null) return@forEach
            if (it.drExceedTimes >= 3) {
                result = true
            }
        }
        return result
    }
    /**
     * @return true  å½“月高峰经营时段数据持续异常或出现三次及以上小时数据超标或无油烟净化装置或净化装置未正常开启
     */
    private fun condition3(): Boolean {
        return false
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem7.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,95 @@
package cn.flightfeather.supervision.business.autooutput.score.restaurant
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
import cn.flightfeather.supervision.domain.ds2.entity.LedgerRecord
import cn.flightfeather.supervision.domain.ds2.entity.LedgerSubType
import cn.flightfeather.supervision.domain.ds2.mapper.LedgerRecordMapper
import cn.flightfeather.supervision.domain.ds2.mapper.LedgerSubTypeMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDateTime
import java.time.ZoneId
import javax.annotation.PostConstruct
@Component
class ReScoreItem7: ScoreItem() {
    companion object {
        private lateinit var instance: ReScoreItem7
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    init {
        exemption = true
    }
    @Autowired
    lateinit var ledgerRecordMapper: LedgerRecordMapper
    @Autowired
    lateinit var ledgerSubTypeMapper: LedgerSubTypeMapper
    override var id: String = "wfzFTlcZ3xMdj5M2"
    override var name: String = "台账管理"
    /**
     * åœ¨çº¿å°è´¦è®°å½•的提交类别完整性和及时性
     * é€‰é¡¹r如下:
     *      1.台账类别齐全、完整、及时记录更新
     *      2.台账少量缺失或未及时记录更新
     *      3.台账严重缺失或关键台账无效
     */
    override fun otherProblem(size: Int): Int? {
        // TODO: 2021/3/9 æ‰¾å‡ºç”¨æˆ·ç±»åž‹å¯¹åº”的必填台账
        val time = evaluationScene.subTask.value?.planstarttime
        val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
        val year = lt.year
        val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
        val et = st.plusMonths(1)
        val ledgerTypeCount = ledgerSubTypeMapper.selectCountByExample(Example(LedgerSubType::class.java).apply {
            createCriteria().andEqualTo("lScenetype", "1").andEqualTo("lNeedupdate", true)
        })
        val rCount = ledgerRecordMapper.selectCountByExample(Example(LedgerRecord::class.java).apply {
            createCriteria().andEqualTo("lrYear", year)
                .andGreaterThanOrEqualTo("lrSubmitdate", st)
                .andLessThanOrEqualTo("lrSubmitdate", et)
                .andEqualTo("lrSubmitid", evaluationScene.userInfoTZ.value?.guid)
        })
        var i = 1
        if (condition1(ledgerTypeCount, rCount)) {
            if (i > size - 1) i = size - 1
            return i
        } else if (condition2(ledgerTypeCount, rCount)) {
            i = 2
            if (i > size - 1) i = size - 1
            return i
        }
        return null
    }
    /**
     * @param c1 å¿…填项台账类别数
     * @param c2 å®žé™…上传数
     * @return true  å°è´¦å°‘量缺失或未及时记录更新
     */
    private fun condition1(c1: Int, c2: Int): Boolean {
        return (c2.toDouble() / c1.toDouble()) >= 0.8
    }
    /**
     * @param c1 å¿…填项台账类别数
     * @param c2 å®žé™…上传数
     * @return true  å°è´¦ä¸¥é‡ç¼ºå¤±æˆ–关键台账无效
     */
    private fun condition2(c1: Int, c2: Int): Boolean {
        return (c2.toDouble() / c1.toDouble()) <= 0.3
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem8.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
package cn.flightfeather.supervision.business.autooutput.score.restaurant
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import javax.annotation.PostConstruct
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 */
@Component
class ReScoreItem8: ScoreItem() {
    companion object {
        private lateinit var instance: ReScoreItem8
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "yAAn3zm6e2PenHeJ"
    override var name: String = "整改措施及效果"
    /**
     * æ‰§æ³•检查汇总情况
     * é€‰é¡¹å¦‚下:
     *      1.问题部分整改或不及时提供材料
     *      2.问题无整改
     */
    override fun otherProblem(size: Int): Int? {
        val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
            createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
//                .andGreaterThanOrEqualTo("time", info.sTime)
//                .andLessThan("time", info.eTime)
        })
        var i = 0
        val total = p.size
        var changed = 0
        p.forEach {
            if (it.ischanged == true) {
                changed++
            }
        }
        return when {
            changed == 0 && total > 0 -> 1
            changed < total -> 0
            else -> null
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem9.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
package cn.flightfeather.supervision.business.autooutput.score.restaurant
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds2.entity.Complaint
import cn.flightfeather.supervision.domain.ds2.mapper.ComplaintMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import javax.annotation.PostConstruct
@Component
class ReScoreItem9: ScoreItem() {
    companion object {
        private lateinit var instance: ReScoreItem9
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    @Autowired
    lateinit var complaintMapper: ComplaintMapper
    override var id: String = "mTre4cqan43BOW82"
    override var name: String="信访投诉"
    /**
     * å­£åº¦å†…信访记录规格化导入
     * é€‰é¡¹å¦‚下:
     *      1.无信访、无投诉、监管配合积极
     *      2.本季度发生单次区级信访投诉
     *      3.本季度发生市级信访投诉或多次区级信访、投诉或监管不配合
     */
    override fun otherProblem(size: Int): Int? {
        val time = evaluationScene.subTask.value?.planstarttime
        val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
        val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
        val et = st.plusMonths(1)
        val complaints = complaintMapper.selectByExample(Example(Complaint::class.java).apply {
            createCriteria().andEqualTo("cpSceneid", evaluationScene.userInfoTZ.value?.guid)
                .andGreaterThanOrEqualTo("cpTime", st)
                .andLessThan("cpTime", et)
        })
        var i = 2
        if (condition2(complaints)) {
            if (i > size - 1) i = size - 1
            return i
        } else if (condition1(complaints)) {
            i = 1
            if (i > size - 1) i = size - 1
            return i
        }
        return null
    }
    /**
     * @return true  æœ¬å­£åº¦å‘生单次区级信访投诉
     */
    private fun condition1(c: List<Complaint>): Boolean {
        c.forEach {
            if (it.cpExtension1 == "1") {
                return true
            }
        }
        return false
    }
    /**
     * @return true  æœ¬å­£åº¦å‘生市级信访投诉或多次区级信访、投诉或监管不配合
     */
    private fun condition2(c: List<Complaint>): Boolean {
        var count = 0
        c.forEach {
            if (it.cpExtension1 == "0") {
                //发生市级信访投诉
                return true
            } else {
                count++
            }
        }
        return count > 1
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/storage/StScoreItem1.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
package cn.flightfeather.supervision.business.autooutput.score.storage
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import javax.annotation.PostConstruct
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * å †åœº
 */
@Component
class StScoreItem1: ScoreItem() {
    companion object {
        private lateinit var instance: StScoreItem1
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "csInMYhgbBqWRyeB"
    override var name: String = "整改措施及效果"
    /**
     * æ‰§æ³•检查汇总情况
     * é€‰é¡¹å¦‚下:
     *      1.问题部分整改或不及时提供材料
     *      2.问题无整改
     */
    override fun otherProblem(size: Int): Int? {
        val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
            createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
//                .andGreaterThanOrEqualTo("time", info.sTime)
//                .andLessThan("time", info.eTime)
        })
        var i = 0
        val total = p.size
        var changed = 0
        p.forEach {
            if (it.ischanged == true) {
                changed++
            }
        }
        return when {
            changed == 0 && total > 0 -> 1
            changed < total -> 0
            else -> null
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem1.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
package cn.flightfeather.supervision.business.autooutput.score.wharf
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import javax.annotation.PostConstruct
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * ç å¤´
 */
@Component
class WhScoreItem1: ScoreItem() {
    companion object {
        private lateinit var instance: WhScoreItem1
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "mgvVEecYRV8xrnf2"
    override var name: String = "整改措施及效果"
    /**
     * æ‰§æ³•检查汇总情况
     * é€‰é¡¹å¦‚下:
     *      1.问题部分整改或不及时提供材料
     *      2.问题无整改
     */
    override fun otherProblem(size: Int): Int? {
        val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
            createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
//                .andGreaterThanOrEqualTo("time", info.sTime)
//                .andLessThan("time", info.eTime)
        })
        var i = 0
        val total = p.size
        var changed = 0
        p.forEach {
            if (it.ischanged == true) {
                changed++
            }
        }
        return when {
            changed == 0 && total > 0 -> 1
            changed < total -> 0
            else -> null
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem2.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
package cn.flightfeather.supervision.business.autooutput.score.wharf
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDateTime
import java.time.ZoneId
import javax.annotation.PostConstruct
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * ç å¤´
 */
@Component
class WhScoreItem2: ScoreItem() {
    companion object {
        private lateinit var instance: WhScoreItem2
    }
    @PostConstruct
    fun init() {
        instance = this
    }
    override var id: String = "5NNLSvkVRFfASMhc"
    override var name: String = "扬尘在线监测数据量级"
    @Autowired
    lateinit var dustDataResultMapper: DustDataResultMapper
    /**
     * æ‰¬å°˜åœ¨çº¿ç›‘测数据量级
     * é€‰é¡¹å¦‚下:
     *      1.监测数据出现单日及以上有效超标
     *      2.监测数据月均值超区域月均值20%以上或数据明显异常
     */
    override fun otherProblem(size: Int): Int? {
        val time = evaluationScene.subTask.value?.planstarttime
        val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
        val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
        val et = st.plusMonths(1)
        val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply {
            createCriteria().andGreaterThanOrEqualTo("drTime", st)
                .andLessThan("drTime", et)
                .andEqualTo("drSceneId", evaluationScene.scene.value?.guid)
        })
        var result: Int? = null
        r.forEach {
            if (it == null) return@forEach
            if (it.drExceedTimes > 0) {
                result = 0
            }
            if (it.drOverAvgPer > 0.2) {
                result = 1
            }
        }
        return result
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt
@@ -77,6 +77,7 @@
        var result = false
        r.forEach {
            if (it == null) return@forEach
            if (it.drExceedTimes > 0) {
                result = true
            }
src/main/kotlin/cn/flightfeather/supervision/business/location/CoordinateUtil.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
package cn.flightfeather.supervision.business.location
import kotlin.math.PI
import kotlin.math.cos
import kotlin.math.sin
object CoordinateUtil {
    private const val Ea = 6378137 //赤道半径
    private const val Eb = 6356725 //极半径
    /**
     * æ ¹æ®åæ ‡ç‚¹ã€è·ç¦»å’Œè§’度,获取另一个坐标
     * @param pos åæ ‡ç‚¹
     * @param len è·ç¦»ï¼ˆç±³ï¼‰
     * @param radian å¼§åº¦
     */
    fun getPointByLen(pos: Pair<Double, Double>, len: Double, radian: Double): Pair<Double, Double> {
        val dx = len * sin(radian)
        val dy = len * cos(radian)
        val ec = Eb + (Ea - Eb) * (90.0 - pos.second) / 90.0
        val ed = ec * cos(pos.second * PI / 180)
        val lng = (dx / ed + pos.first * PI / 180.0) * 180.0 / PI
        val lat = (dy / ec + pos.second * PI / 180.0) * 180.0 / PI
        return Pair(lng, lat)
    }
    /**
     * çº¬åº¦ç›¸åŒæ—¶
     * è·ç¦»è½¬æ¢ä¸ºç»åº¦
     */
    fun disToLng(distance: Double): Double {
        return distance * 0.00001
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
package cn.flightfeather.supervision.business.location
import cn.flightfeather.supervision.common.utils.ExcelUtil
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
import tk.mybatis.mapper.entity.Example
import kotlin.math.PI
/**
 * è·¯æ®µå‘¨è¾¹æŸ¥è¯¢
 */
class LocationRoadNearby(private val scenseMapper: ScenseMapper) {
    private val utilFile = UtilFile()
    data class BasePlace(
        val name: String,
        val sP: Pair<Double, Double>,
        val eP: Pair<Double, Double>,
    )
    private fun searchOne(basePlace: BasePlace, distance: Double) {
        val range = rangeRestriction(basePlace, distance)
        getSceneFromDb(range).forEach { utilFile.parseRow(it) }
    }
    /**
     * æœå¯»å‚考路段给定半径内的点位
     * @param basePlace å‚考点位信息
     * @param distance æœç´¢åŠå¾„
     */
    fun search(basePlace: BasePlace, distance: Double) {
        utilFile.reset()
        searchOne(basePlace, distance)
        utilFile.outPutToFile()
    }
    fun searchList(pList: List<BasePlace>, distance: Double) {
        utilFile.reset()
        pList.forEach {
            val range = rangeRestriction(it, distance)
            val sceneList = getSceneFromDb(range)
            if (sceneList.isEmpty()) {
                utilFile.addRow(listOf(it.name))
            }
            sceneList.forEachIndexed { index, s->
                utilFile.parseRow(s)
                if (index == 0) {
                    utilFile.updateLastRow(0, ExcelUtil.MyCell(it.name, sceneList.size))
                }
            }
            utilFile.index = 1
        }
        utilFile.outPutToFile()
    }
    /**
     * èŒƒå›´é™å®š
     * æ ¹æ®è·¯æ®µçš„始末点坐标和查询半径,计算最大可能的范围矩形,得出经纬度的最大最小值
     */
    private fun rangeRestriction(basePlace: BasePlace, distance: Double): List<Double> {
        // æ±‚经度的最小值
        val p1 = if (basePlace.sP.first < basePlace.eP.first) basePlace.sP else basePlace.eP
        val minLng = CoordinateUtil.getPointByLen(p1, distance, PI * 1.5).first
        // æ±‚经度的最大值
        val p2 = if (basePlace.sP.first > basePlace.eP.first) basePlace.sP else basePlace.eP
        val maxLng = CoordinateUtil.getPointByLen(p2, distance, PI * 0.5).first
        // æ±‚纬度的最小值
        val p3 = if (basePlace.sP.second < basePlace.eP.second) basePlace.sP else basePlace.eP
        val minLat = CoordinateUtil.getPointByLen(p3, distance, PI).second
        // æ±‚纬度的最大值
        val p4 = if (basePlace.sP.second > basePlace.eP.second) basePlace.sP else basePlace.eP
        val maxLat = CoordinateUtil.getPointByLen(p4, distance, .0).second
        return listOf(minLng, maxLng, minLat, maxLat)
    }
    /**
     * æ ¹æ®é™å®šçŸ©å½¢èŒƒå›´ä»Žæ•°æ®åº“获取符合条件的点位
     */
    private fun getSceneFromDb(range: List<Double>): List<Scense> {
        return scenseMapper.selectByExample(Example(Scense::class.java).apply {
            createCriteria().andGreaterThanOrEqualTo("longitude", range[0])
                .andLessThanOrEqualTo("longitude", range[1])
                .andGreaterThanOrEqualTo("latitude", range[2])
                .andLessThanOrEqualTo("latitude", range[3])
            and(createCriteria().orNotEqualTo("extension1", "0")
                .orIsNull("extension1"))
        })
    }
    /**
     * ç²¾ç¡®è®¡ç®—
     */
//    private fun checkDistance(scense: Scense):Boolean {
//
//    }
}
src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,88 @@
package cn.flightfeather.supervision.business.location
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.common.utils.ExcelUtil
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import org.apache.poi.hssf.usermodel.HSSFWorkbook
import java.io.File
import java.io.FileOutputStream
import java.util.*
class UtilFile {
    private val heads = mutableListOf<Array<Any>>()
    private val contents = mutableListOf<Array<Any>>()
    var index = 1
    init {
//        val h1 = listOf(
//            ExcelUtil.MyCell("汽修单位基本信息", colSpan = 6),
//            ExcelUtil.MyCell("守法帮扶微信小程序登录", colSpan = 1),
//            ExcelUtil.MyCell("汽修单位认证(单个企业允许多用户)", colSpan = 4),
//            ExcelUtil.MyCell("守法承诺", colSpan = 1),
//            ExcelUtil.MyCell("台账规范性", colSpan = 3),
//            ExcelUtil.MyCell("自巡查规范性", colSpan = 2),
//            ExcelUtil.MyCell("守法自测自评", colSpan = 3),
//            ExcelUtil.MyCell("线上监管综合风险分析与对策", colSpan = 3),
//        )
        val h2 = listOf(
            ExcelUtil.MyCell("路段", colSpan = 1),
            ExcelUtil.MyCell("序号", colSpan = 1),
            ExcelUtil.MyCell("单位名称", colSpan = 1),
            ExcelUtil.MyCell("类型", colSpan = 1),
            ExcelUtil.MyCell("单位地址", colSpan = 1),
            ExcelUtil.MyCell("经度", colSpan = 1),
            ExcelUtil.MyCell("纬度", colSpan = 1),
            ExcelUtil.MyCell("街道", colSpan = 1),
            ExcelUtil.MyCell("常用联系人", colSpan = 1),
            ExcelUtil.MyCell("联系方式", colSpan = 1),
        )
//        heads.add(h1.toTypedArray())
        heads.add(h2.toTypedArray())
    }
    fun reset() {
        index = 1
        contents.clear()
    }
    fun addRow(row: List<Any>) {
        contents.add(row.toTypedArray())
    }
    fun updateLastRow(index: Int, cell: Any) {
        contents.last()[index] = cell
    }
    /**
     * ç”Ÿæˆä¸€è¡Œexcel数据
     */
    fun parseRow(scense: Scense) {
        val row = listOf<Any>(
            "",
            index.toDouble(),
            scense.name ?: "",
            scense.type ?: "",
            scense.location ?: "",
            scense.longitude?.toDouble() ?: .0,
            scense.latitude?.toDouble() ?: .0,
            scense.townname ?: "",
            scense.contacts ?: "",
            scense.contactst ?: ""
        )
        contents.add(row.toTypedArray())
        index++
    }
    fun outPutToFile() {
        val workbook = HSSFWorkbook()
        val fileName = "金山区周边点位-${DateUtil().DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
        val filePath = "C:\\work\\工作\\第三方监管\\周边点位\\$fileName"
        val out = FileOutputStream(File(filePath))
        ExcelUtil.write(heads, contents, workbook)
        workbook.write(out)
        workbook.close()
        out.flush()
        out.close()
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseCols.kt
@@ -69,7 +69,7 @@
     * æ–°è€è¡¨å¤´åˆå¹¶
     */
    fun combineHead(oldHeads: MutableList<MutableList<ExcelUtil.MyCell>>, dataSource: DataSource) {
        //合并表头,采取简化逻辑,只有第一行的表头会进行单元格的跨行合并
        // FIXME: 2023/1/31 åˆå¹¶è¡¨å¤´ï¼Œé‡‡å–简化逻辑,只有第一行的表头会进行单元格的跨行合并
        val newHeads = getHeads(dataSource)
        if (oldHeads.isEmpty()) {
            newHeads.forEach { oldHeads.add(it) }
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcelMulti.kt
@@ -8,7 +8,7 @@
/**
 * å„模板合并输出为整体文档
 * å•个数据源
 * å¤šä¸ªæ•°æ®æº
 */
abstract class BaseExcelMulti(private val dataSourceList: List<DataSource>) {
src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
@@ -49,11 +49,12 @@
    }
    fun loop(callback: (index:Int, rowData: RowData) -> Unit) {
        reset()
//        reset()
        for (i in sourceList.indices) {
//            rowData.recordLastScene()
            rowData.index = i
            rowData.clear()
            rowData.subTask = sourceList[i]
            rowData.clear()
            callback(i, rowData)
        }
    }
@@ -126,11 +127,12 @@
                for (s in subTaskList) {
                    if (s.scenseid == it) {
                        subtask = s
                        break
                        result.add(s)
                    }
                }
                if (subtask == null) subtask = Subtask().apply { scenseid = it }
                result.add(subtask)
                if (subtask == null) {
                    result.add(Subtask().apply { scenseid = it })
                }
            }
        } else {
            result.addAll(subTaskList)
@@ -359,23 +361,29 @@
        }
        /**
         * è®°å½•上一个场景
         */
        fun recordLastScene() {
            lastScene = scene
        }
        /**
         * æ¸…空当前处理的对象的相关数据源
         */
        fun clear() {
            if (lastScene != null && lastScene?.typeid != _scene?.typeid) {
                _problemTypes.clear()
                _topItems.clear()
                _rules.clear()
                _ledgerCount = -1
            } else {
                lastScene = _scene
            }
            _scene = null
            _baseScene = null
            _problems.clear()
            _evaluation = null
            _itemevaluationList.clear()
            _ledgerRecordNum = null
            if (lastScene != null && lastScene?.typeid != scene?.typeid) {
                _problemTypes.clear()
                _topItems.clear()
                _rules.clear()
                _ledgerCount = -1
            }
            recordLastScene()
        }
        /**
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt
@@ -6,6 +6,10 @@
import cn.flightfeather.supervision.business.report.cols.*
class ScoreDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
    override val cols: List<BaseCols> = listOf(ColSceneName(), ColTown(), ColStatus(), ColTotalGrade(), ColItemGrade())
    override val cols: List<BaseCols> = listOf(
        ColSceneName(), ColTown(), ColStatus(), ColInspectionInfo(listOf(0, 1)),
        ColTotalGrade(),
        ColItemGrade()
    )
    override val templateName: String = "规范性评估详情表"
}
src/main/kotlin/cn/flightfeather/supervision/business/storage/JinAnScore.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package cn.flightfeather.supervision.business.storage
import cn.flightfeather.supervision.business.Info
import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
import cn.flightfeather.supervision.domain.ds1.entity.Score
import cn.flightfeather.supervision.domain.ds1.mapper.ScoreMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDateTime
import java.time.ZoneId
/**
 * ä¸Šæµ·å¸‚静安区单独的50分制评分结果,
 * æ ¹æ®[StAutoScore]自动评分结果进行转换得出
 */
@Component
class JinAnScore {
    @Autowired
    lateinit var scoreMapper: ScoreMapper
    fun toDb(e: Evaluation, info: Info) {
        val time = LocalDateTime.ofInstant(e.evaluatetime?.toInstant(), ZoneId.systemDefault())
        val scoreVo = Score().apply {
            sceneId = e.sguid
            sceneName = e.scensename
            year = time.year
            month = time.monthValue
            districtCode = e.districtcode
            districtName = e.districtname
            score = transform(e.resultscorebef?.toIntOrNull() ?: 0)
            completion = !info.online
        }
        val res = scoreMapper.selectByExample(Example(Score::class.java).apply {
            createCriteria().andEqualTo("sceneId", e.sguid)
                .andEqualTo("year", time.year)
                .andEqualTo("month", time.monthValue)
        })
        if (res.isNotEmpty()) {
            scoreVo.id = res[0].id
            scoreMapper.updateByPrimaryKeySelective(scoreVo)
        } else {
            scoreMapper.insert(scoreVo)
        }
    }
    /**
     * åˆ†æ•°è½¬æ¢
     */
    private fun transform(oldS: Int): Int {
        return when {
            // åŸºæœ¬è§„范
            oldS >= 90 -> 50
            // ä¸è§„范
            oldS >= 50 -> 30
            // ä¸¥é‡ä¸è§„范
            else -> 10
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt
@@ -37,6 +37,7 @@
    stScoreItem_1: StScoreItem_1,
    whScoreItem_1: WhScoreItem_1,
    whScoreItem_2: WhScoreItem_2,
    val jinAnScore: JinAnScore,
    var sceneType: Constant.ScenseType = Constant.ScenseType.TYPE1, )
{
    companion object {
@@ -144,8 +145,9 @@
    private fun sceneGradeP(subtask: Subtask) {
        val info = itemGrade(subtask)
        val result = totalGrade(info) ?: return
        val result = totalGrade(info, subtask) ?: return
        toDb(info, result)
//        jinAnScore.toDb(result.first, info)
//        addToFile(rows, info, result.first)
//        toFile()
    }
@@ -155,7 +157,7 @@
        getScoreItem()
        val info = itemGrade(subtask)
        val result = totalGrade(info) ?: return
        val result = totalGrade(info, subtask) ?: return
        addToFile(rows, info, result.first)
    }
@@ -186,7 +188,15 @@
        val scene = scenseMapper.selectByPrimaryKey(subtask.scenseid)
        val info =
            Info(userInfo?.guid, tzUserId, subtask.scenseid, subtask.scensename, sceneType, subTask = subtask, sceneIndex = scene.index)
            Info(userInfo?.guid,
                tzUserId,
                subtask.scenseid,
                subtask.scensename,
                sceneType,
                subTask = subtask,
                sceneIndex = scene.index,
                online = scene.extension1 != "0"
            )
        /** 1. æ ¹æ®è¯„分规则对应的问题自动判断是否扣分***************************************************************/
        // èŽ·å–è¯¥æ¬¡å·¡æŸ¥ä»»åŠ¡ä¸‹çš„æ‰€æœ‰é—®é¢˜
@@ -200,6 +210,7 @@
            // å…·ä½“评分选项
            val subRule = r.second
            subRule.forEach { sr ->
                // å­˜åœ¨å¤šä¸ªè¯„分项和同一个问题关联,因此必须全部评分项都判定一遍
                sr.problemlist?.split(",")?.forEach { pId ->
                    if (pList.contains(pId)) {
                        sr.extension1 = (0 - (sr.maxscore ?: 0)).toString()
@@ -248,7 +259,7 @@
    /**
     * è®¡ç®—总分
     */
    private fun totalGrade(info: Info): Pair<Evaluation, List<Itemevaluation>>? {
    private fun totalGrade(info: Info, subtask: Subtask): Pair<Evaluation, List<Itemevaluation>>? {
        /** 4. è®¡ç®—总分*************************************************************************/
        val scene = scenseMapper.selectByPrimaryKey(info.subTask?.scenseid) ?: return null
        val inspection = inspectionMapper.selectByExample(Example(Inspection::class.java).apply {
@@ -280,12 +291,12 @@
                townname = scene.townname
                scensename = scene.name
                scenseaddress = scene.location
                evaluatetime = Date()
                evaluatetime = subtask.planstarttime
                evaluatorguid = "admin"
                evaluatorusername = "admin"
                evaluatorrealname = "admin"
                resultscorebef = (totalScore - abs(total)).toString()
                createdate = Date()
                createdate = subtask.planstarttime
                updatedate = Date()
            }
        }
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/CsScoreItem_2.kt
@@ -53,6 +53,7 @@
        var result: Int? = null
        r.forEach {
            if (it == null) return@forEach
            if (it.drExceedTimes > 0) {
                result = 0
            }
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/MpScoreItem_2.kt
@@ -13,7 +13,7 @@
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * å·¥åœ°
 * æ…拌站
 */
@Component
class MpScoreItem_2:ScoreItem() {
@@ -53,6 +53,7 @@
        var result: Int? = null
        r.forEach {
            if (it == null) return@forEach
            if (it.drExceedTimes > 0) {
                result = 0
            }
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/WhScoreItem_2.kt
@@ -13,7 +13,7 @@
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 * å·¥åœ°
 * ç å¤´
 */
@Component
class WhScoreItem_2:ScoreItem() {
@@ -53,6 +53,7 @@
        var result: Int? = null
        r.forEach {
            if (it == null) return@forEach
            if (it.drExceedTimes > 0) {
                result = 0
            }
src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt
@@ -18,7 +18,8 @@
    }
    private val fetchData = mutableListOf<FetchData>()
    private var shecdule = Executors.newScheduledThreadPool(2)
    private var schedule = Executors.newScheduledThreadPool(1)
    private var maintainSchedule = Executors.newScheduledThreadPool(1)
    private var fetchTime: Date = Date()
    private var maintainTime: Date = Date()
@@ -32,10 +33,13 @@
        maintainTask()
    }
    private fun fetchTask() {
        shecdule.scheduleAtFixedRate({
    private fun fetchTask(isFirst: Boolean = false) {
        if (!isFirst) {
            schedule = closeThread(schedule)
        }
        schedule.scheduleAtFixedRate({
            fetchTime = Date()
            if (Date().time - maintainTime.time > (MAINTAIN_PERIOD_MIN + 1) * 60 * 1000) {
            if (Date().time - maintainTime.time > (MAINTAIN_PERIOD_MIN * 2) * 60 * 1000) {
                maintainTask()
            }
            fetchData.forEach {
@@ -44,13 +48,28 @@
        }, 0, FETCH_PERIOD_MIN, TimeUnit.MINUTES)
    }
    private fun maintainTask() {
        shecdule.scheduleAtFixedRate({
    private fun maintainTask(isFirst: Boolean = false) {
        if (!isFirst) {
            maintainSchedule = closeThread(maintainSchedule)
        }
        maintainSchedule.scheduleAtFixedRate({
            maintainTime = Date()
            if (Date().time - fetchTime.time > (FETCH_PERIOD_MIN + 1) * 60 * 1000) {
            if (Date().time - fetchTime.time > (FETCH_PERIOD_MIN * 2) * 60 * 1000) {
                fetchTask()
            }
        }, 0, MAINTAIN_PERIOD_MIN, TimeUnit.MINUTES)
    }
    private fun closeThread(s: ScheduledExecutorService): ScheduledExecutorService {
        try {
            s.shutdown()
            if (s.awaitTermination(10, TimeUnit.SECONDS)) {
                s.shutdownNow()
            }
        } catch (e: InterruptedException) {
            e.printStackTrace()
            s.shutdownNow()
        }
        return Executors.newScheduledThreadPool(1)
    }
}
src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
@@ -4,9 +4,14 @@
import cn.flightfeather.supervision.domain.ds1.entity.NightConstruction
import cn.flightfeather.supervision.domain.ds1.mapper.NightConstructionMapper
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.entity.Userinfo
import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper
import com.github.pagehelper.PageHelper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import org.springframework.transaction.annotation.Transactional
import tk.mybatis.mapper.entity.Example
import java.util.*
import javax.annotation.PostConstruct
@@ -27,28 +32,37 @@
        private const val CITY_NAME = "上海市"
        private const val DISTRICT_NAME = "静安区"
        private const val DEFAULT_TIME = "2020-12-01 00:00:00"
        private const val DEFAULT_TIME = "2022-01-01 00:00:00"
    }
    @Autowired
    lateinit var nightConstructionMapper: NightConstructionMapper
    @Autowired
    lateinit var scenseMapper: ScenseMapper
    @Autowired
    lateinit var userinfoMapper: UserinfoMapper
    private val dateUtil = DateUtil()
    @PostConstruct
    fun init() {
        instance = this
        this.nightConstructionMapper = instance.nightConstructionMapper
        this.scenseMapper = instance.scenseMapper
        this.userinfoMapper = instance.userinfoMapper
    }
    override fun fetch() {
        PageHelper.startPage<NightConstruction>(1, 1)
        nightConstructionMapper.selectByExample(Example(NightConstruction::class.java).apply {
        val res = nightConstructionMapper.selectByExample(Example(NightConstruction::class.java).apply {
            createCriteria().andEqualTo("ncProvinceCode", PROVINCE_CODE)
                    .andEqualTo("ncCityCode", CITY_CODE)
                    .andEqualTo("ncDistrictCode", DISTRICT_CODE)
                .andEqualTo("ncCityCode", CITY_CODE)
                .andEqualTo("ncDistrictCode", DISTRICT_CODE)
            orderBy("ncCreateTime").desc()
        }).let {
        })
        res.let {
            val timeStr = if (it.isNotEmpty()) {
                val cal = Calendar.getInstance().apply { time = it[0]?.ncCreateTime }
                cal.add(Calendar.DAY_OF_MONTH, -1)
@@ -56,6 +70,7 @@
            } else {
                DEFAULT_TIME
            }
//            val timeStr = DEFAULT_TIME
            try {
@@ -82,19 +97,41 @@
                            ncDistrictCode = DISTRICT_CODE
                            ncDistrictName = DISTRICT_NAME
                        }
                        nightConstructionMapper.selectByExample(Example(NightConstruction::class.java).apply {
                            createCriteria().andEqualTo("ncNum", nightConstruction.ncNum)
                        }).run {
                            nightConstructionMapper.selectByExample(Example(NightConstruction::class.java).apply {
                        val history = nightConstructionMapper.selectByExample(Example(NightConstruction::class.java)
                            .apply {
                                createCriteria().andEqualTo("ncNum", nightConstruction.ncNum)
                            })
                        // åˆ¤æ–­è¯¥å¤œæ–½æ–‡ä»¶æ˜¯å¦å­˜åœ¨
                        if (history.isNotEmpty()) return@forEach
                        var sceneId: String? = null
                        var userId: String? = null
                        // èŽ·å–è¯¥å¤œæ–½å¯¹åº”ä¼ä¸šçš„åŽ†å²è®°å½•
                        val records = nightConstructionMapper.selectByExample(Example(NightConstruction::class.java)
                            .apply {
                                createCriteria().andEqualTo("ncItemName", nightConstruction.ncItemName)
                            }).takeIf { l-> l.isNotEmpty() }?.get(0)?.let { r->
                                nightConstruction.ncUserId = r.ncUserId
                                nightConstruction.ncSceneId = r.ncSceneId
                            }
                            if (isEmpty()) {
                                nightConstructionMapper.insert(nightConstruction)
                            })
                        if (records.isNotEmpty()) {
                            sceneId = records[0]?.ncSceneId
                            userId = records[0]?.ncUserId
                        }
                        // è‹¥æ— åŽ†å²è®°å½•ï¼ŒæŸ¥æ‰¾åœºæ™¯è¡¨ï¼Œåˆ¤æ–­æ˜¯å¦æœ‰ç›¸åŒåç§°çš„åœºæ™¯
                        else {
                            val scenes = scenseMapper.selectByExample(Example(Scense::class.java).apply {
                                createCriteria().andEqualTo("name", nightConstruction.ncItemName)
                            })
                            if (scenes.isNotEmpty()) {
                                sceneId = scenes[0].guid
                                val user = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
                                    createCriteria().andEqualTo("dGuid", sceneId)
                                })
                                if (user.isNotEmpty()) userId = user[0].guid
                            }
                        }
                        nightConstruction.ncUserId = userId
                        nightConstruction.ncSceneId = sceneId
                        nightConstructionMapper.insert(nightConstruction)
                    }
                }
            } catch (e: Exception) {
src/main/kotlin/cn/flightfeather/supervision/datasource/config/DataSourceConfig.kt
@@ -42,4 +42,17 @@
    fun ds2DataSource(@Qualifier("ds2DataSourceProperties") dataSourceProperties: DataSourceProperties): DataSource? {
        return dataSourceProperties.initializeDataSourceBuilder().build()
    }
    //第三个ds3数据源配置
    @Bean(name = ["ds3DataSourceProperties"])
    @ConfigurationProperties(prefix = "spring.datasource.ds3")
    fun ds3DataSourceProperties(): DataSourceProperties? {
        return DataSourceProperties()
    }
    //第三个ds3数据源
    @Bean("ds3DataSource")
    fun ds3DataSource(@Qualifier("ds3DataSourceProperties") dataSourceProperties: DataSourceProperties): DataSource? {
        return dataSourceProperties.initializeDataSourceBuilder().build()
    }
}
src/main/kotlin/cn/flightfeather/supervision/datasource/config/MybatisConfig4ds3.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
package cn.flightfeather.supervision.datasource.config
import org.apache.ibatis.session.SqlSessionFactory
import org.mybatis.spring.SqlSessionFactoryBean
import org.mybatis.spring.SqlSessionTemplate
import org.mybatis.spring.annotation.MapperScan
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.core.io.support.PathMatchingResourcePatternResolver
import org.springframework.jdbc.datasource.DataSourceTransactionManager
import javax.sql.DataSource
/**
 * Mybatis  ç¬¬ä¸‰ä¸ªds3数据源配置
 * å¤šæ•°æ®æºé…ç½®ä¾èµ–数据源配置
 * @see  DataSourceConfig
 */
@Configuration
@MapperScan(basePackages = ["cn.flightfeather.supervision.domain.ds3.mapper"],
    sqlSessionTemplateRef = "ds3SqlSessionTemplate")
class MybatisConfig4ds3 {
    //ds3数据源
    @Bean("ds3SqlSessionFactory")
    @Throws(Exception::class)
    fun ds3SqlSessionFactory(@Qualifier("ds3DataSource") dataSource: DataSource?): SqlSessionFactory? {
        val sqlSessionFactory = SqlSessionFactoryBean()
        sqlSessionFactory.setDataSource(dataSource)
        sqlSessionFactory.setMapperLocations(*PathMatchingResourcePatternResolver()
            .getResources("classpath*:mapper/ds3/*.xml"))
        return sqlSessionFactory.getObject()
    }
    //事务支持
    @Bean(name = ["ds3TransactionManager"])
    fun ds3TransactionManager(@Qualifier("ds3DataSource") dataSource: DataSource): DataSourceTransactionManager? {
        return DataSourceTransactionManager(dataSource)
    }
    @Bean(name = ["ds3SqlSessionTemplate"])
    fun ds3SqlSessionTemplate(@Qualifier("ds3SqlSessionFactory") sqlSessionFactory: SqlSessionFactory?):
            SqlSessionTemplate? {
        return SqlSessionTemplate(sqlSessionFactory)
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java
@@ -116,7 +116,7 @@
     * @param drSceneName åœºæ™¯åç§°
     */
    public void setDrSceneName(String drSceneName) {
        this.drSceneName = drSceneName;
        this.drSceneName = drSceneName == null ? null : drSceneName.trim();
    }
    /**
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt
@@ -5,4 +5,4 @@
import org.apache.ibatis.annotations.Mapper
@Mapper
interface DustDataResultMapper : MyMapper<DustDataResult>
interface DustDataResultMapper : MyMapper<DustDataResult?>
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1038 @@
package cn.flightfeather.supervision.domain.ds2.entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Table(name = "ja_t_dust_site_info")
public class DustSiteInfo {
    @Id
    private String id;
    /**
     * å®‰è£…地址
     */
    private String address;
    /**
     * å¼€å·¥æ—¶é—´
     */
    @Column(name = "begin_date")
    private Date beginDate;
    /**
     * å»ºç­‘面积
     */
    @Column(name = "build_area")
    private String buildArea;
    /**
     * é‡‡é›†æ—¶é—´
     */
    @Column(name = "data_time")
    private Date dataTime;
    /**
     * æ¸…洗措施
     */
    @Column(name = "clean_measure")
    private String cleanMeasure;
    /**
     * ç«™ç‚¹ç¼–码
     */
    private String code;
    /**
     * æ–½å·¥å•位
     */
    @Column(name = "construction_unit")
    private String constructionUnit;
    /**
     * ç‚¹ä½æŽ§åˆ¶çº§
     */
    @Column(name = "control_level")
    private String controlLevel;
    /**
     * å¼€å‘商
     */
    private String developers;
    /**
     * æ‰§è¡Œæ—¶é—´
     */
    @Column(name = "do_time")
    private Date doTime;
    /**
     * è¿ç»´å•†
     */
    @Column(name = "duty_company")
    private String dutyCompany;
    /**
     * è¿ç»´å•†id
     */
    @Column(name = "duty_company_id")
    private String dutyCompanyId;
    /**
     * ç»“束时间
     */
    @Column(name = "end_date")
    private Date endDate;
    /**
     * å½“前施工阶段
     */
    @Column(name = "engineering_stage")
    private String engineeringStage;
    /**
     * å½“前施工阶段编码
     */
    @Column(name = "engineering_stage_code")
    private String engineeringStageCode;
    /**
     * è®¾å¤‡ç¼–码
     */
    @Column(name = "equipment_code")
    private String equipmentCode;
    /**
     * å åœ°é¢ç§¯
     */
    @Column(name = "floor_area")
    private String floorArea;
    /**
     * æ‰€å±žåŒºåŽ¿ä»£ç 
     */
    @Column(name = "group_id")
    private String groupId;
    /**
     * æ‰€å±žåŒºåŽ¿
     */
    @Column(name = "group_name")
    private String groupName;
    /**
     * æ˜¯å¦æœ‰ç›‘测
     */
    @Column(name = "has_monitor")
    private String hasMonitor;
    /**
     * æ˜¯å¦åœ¨çº¿
     */
    @Column(name = "is_online")
    private String isOnline;
    /**
     * è®¾å¤‡æ˜¯å¦å¼‚常
     */
    @Column(name = "is_trouble")
    private String isTrouble;
    /**
     * åˆ é™¤æ ‡å¿—位
     */
    @Column(name = "jhpt_delete")
    private String jhptDelete;
    /**
     * æ›´æ–°æ—¶é—´
     */
    @Column(name = "jhpt_update_time")
    private String jhptUpdateTime;
    private String kindex;
    /**
     * çº¬åº¦
     */
    private String latitude;
    /**
     * è”系人
     */
    private String linkman;
    /**
     * ç»åº¦
     */
    private String longitude;
    /**
     * è®¾å¤‡ç¼–码
     */
    @Column(name = "mn_code")
    private String mnCode;
    /**
     * ç«™ç‚¹åç§°
     */
    private String name;
    /**
     * å™ªå£°åŠŸèƒ½åŒº
     */
    @Column(name = "noise_region")
    private String noiseRegion;
    /**
     * è”系人电话
     */
    private String phone;
    /**
     * æ‰€å±žçœä»½
     */
    private String province;
    /**
     * è´Ÿè´£äºº
     */
    private String responsible;
    /**
     * å†…中外环编码
     */
    @Column(name = "ring_id")
    private String ringId;
    /**
     * é˜¶æ®µå¼€å§‹æ—¥æœŸ
     */
    @Column(name = "stage_begin_date")
    private Date stageBeginDate;
    /**
     * åœæ­¢æ—¶é—´
     */
    @Column(name = "stop_time")
    private Date stopTime;
    /**
     * tsp浓度
     */
    private Double tsp;
    /**
     * ç±»åž‹ç¼–码
     */
    @Column(name = "type_id")
    private String typeId;
    /**
     * ç±»åž‹åç§°
     */
    private String typename;
    /**
     * ç»Ÿè®¡ç±»åž‹ç¼–码
     */
    @Column(name = "union_type_id")
    private String unionTypeId;
    /**
     * å›´å¢™é«˜åº¦
     */
    @Column(name = "wall_height")
    private String wallHeight;
    /**
     * ä¸šåŠ¡æ—¶é—´
     */
    @Column(name = "ywsj_date")
    private Date ywsjDate;
    /**
     * @return id
     */
    public String getId() {
        return id;
    }
    /**
     * @param id
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }
    /**
     * èŽ·å–å®‰è£…åœ°å€
     *
     * @return address - å®‰è£…地址
     */
    public String getAddress() {
        return address;
    }
    /**
     * è®¾ç½®å®‰è£…地址
     *
     * @param address å®‰è£…地址
     */
    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }
    /**
     * èŽ·å–å¼€å·¥æ—¶é—´
     *
     * @return begin_date - å¼€å·¥æ—¶é—´
     */
    public Date getBeginDate() {
        return beginDate;
    }
    /**
     * è®¾ç½®å¼€å·¥æ—¶é—´
     *
     * @param beginDate å¼€å·¥æ—¶é—´
     */
    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }
    /**
     * èŽ·å–å»ºç­‘é¢ç§¯
     *
     * @return build_area - å»ºç­‘面积
     */
    public String getBuildArea() {
        return buildArea;
    }
    /**
     * è®¾ç½®å»ºç­‘面积
     *
     * @param buildArea å»ºç­‘面积
     */
    public void setBuildArea(String buildArea) {
        this.buildArea = buildArea == null ? null : buildArea.trim();
    }
    /**
     * èŽ·å–é‡‡é›†æ—¶é—´
     *
     * @return data_time - é‡‡é›†æ—¶é—´
     */
    public Date getDataTime() {
        return dataTime;
    }
    /**
     * è®¾ç½®é‡‡é›†æ—¶é—´
     *
     * @param dataTime é‡‡é›†æ—¶é—´
     */
    public void setDataTime(Date dataTime) {
        this.dataTime = dataTime;
    }
    /**
     * èŽ·å–æ¸…æ´—æŽªæ–½
     *
     * @return clean_measure - æ¸…洗措施
     */
    public String getCleanMeasure() {
        return cleanMeasure;
    }
    /**
     * è®¾ç½®æ¸…洗措施
     *
     * @param cleanMeasure æ¸…洗措施
     */
    public void setCleanMeasure(String cleanMeasure) {
        this.cleanMeasure = cleanMeasure == null ? null : cleanMeasure.trim();
    }
    /**
     * èŽ·å–ç«™ç‚¹ç¼–ç 
     *
     * @return code - ç«™ç‚¹ç¼–码
     */
    public String getCode() {
        return code;
    }
    /**
     * è®¾ç½®ç«™ç‚¹ç¼–码
     *
     * @param code ç«™ç‚¹ç¼–码
     */
    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }
    /**
     * èŽ·å–æ–½å·¥å•ä½
     *
     * @return construction_unit - æ–½å·¥å•位
     */
    public String getConstructionUnit() {
        return constructionUnit;
    }
    /**
     * è®¾ç½®æ–½å·¥å•位
     *
     * @param constructionUnit æ–½å·¥å•位
     */
    public void setConstructionUnit(String constructionUnit) {
        this.constructionUnit = constructionUnit == null ? null : constructionUnit.trim();
    }
    /**
     * èŽ·å–ç‚¹ä½æŽ§åˆ¶çº§
     *
     * @return control_level - ç‚¹ä½æŽ§åˆ¶çº§
     */
    public String getControlLevel() {
        return controlLevel;
    }
    /**
     * è®¾ç½®ç‚¹ä½æŽ§åˆ¶çº§
     *
     * @param controlLevel ç‚¹ä½æŽ§åˆ¶çº§
     */
    public void setControlLevel(String controlLevel) {
        this.controlLevel = controlLevel == null ? null : controlLevel.trim();
    }
    /**
     * èŽ·å–å¼€å‘å•†
     *
     * @return developers - å¼€å‘商
     */
    public String getDevelopers() {
        return developers;
    }
    /**
     * è®¾ç½®å¼€å‘商
     *
     * @param developers å¼€å‘商
     */
    public void setDevelopers(String developers) {
        this.developers = developers == null ? null : developers.trim();
    }
    /**
     * èŽ·å–æ‰§è¡Œæ—¶é—´
     *
     * @return do_time - æ‰§è¡Œæ—¶é—´
     */
    public Date getDoTime() {
        return doTime;
    }
    /**
     * è®¾ç½®æ‰§è¡Œæ—¶é—´
     *
     * @param doTime æ‰§è¡Œæ—¶é—´
     */
    public void setDoTime(Date doTime) {
        this.doTime = doTime;
    }
    /**
     * èŽ·å–è¿ç»´å•†
     *
     * @return duty_company - è¿ç»´å•†
     */
    public String getDutyCompany() {
        return dutyCompany;
    }
    /**
     * è®¾ç½®è¿ç»´å•†
     *
     * @param dutyCompany è¿ç»´å•†
     */
    public void setDutyCompany(String dutyCompany) {
        this.dutyCompany = dutyCompany == null ? null : dutyCompany.trim();
    }
    /**
     * èŽ·å–è¿ç»´å•†id
     *
     * @return duty_company_id - è¿ç»´å•†id
     */
    public String getDutyCompanyId() {
        return dutyCompanyId;
    }
    /**
     * è®¾ç½®è¿ç»´å•†id
     *
     * @param dutyCompanyId è¿ç»´å•†id
     */
    public void setDutyCompanyId(String dutyCompanyId) {
        this.dutyCompanyId = dutyCompanyId == null ? null : dutyCompanyId.trim();
    }
    /**
     * èŽ·å–ç»“æŸæ—¶é—´
     *
     * @return end_date - ç»“束时间
     */
    public Date getEndDate() {
        return endDate;
    }
    /**
     * è®¾ç½®ç»“束时间
     *
     * @param endDate ç»“束时间
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
    /**
     * èŽ·å–å½“å‰æ–½å·¥é˜¶æ®µ
     *
     * @return engineering_stage - å½“前施工阶段
     */
    public String getEngineeringStage() {
        return engineeringStage;
    }
    /**
     * è®¾ç½®å½“前施工阶段
     *
     * @param engineeringStage å½“前施工阶段
     */
    public void setEngineeringStage(String engineeringStage) {
        this.engineeringStage = engineeringStage == null ? null : engineeringStage.trim();
    }
    /**
     * èŽ·å–å½“å‰æ–½å·¥é˜¶æ®µç¼–ç 
     *
     * @return engineering_stage_code - å½“前施工阶段编码
     */
    public String getEngineeringStageCode() {
        return engineeringStageCode;
    }
    /**
     * è®¾ç½®å½“前施工阶段编码
     *
     * @param engineeringStageCode å½“前施工阶段编码
     */
    public void setEngineeringStageCode(String engineeringStageCode) {
        this.engineeringStageCode = engineeringStageCode == null ? null : engineeringStageCode.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡ç¼–ç 
     *
     * @return equipment_code - è®¾å¤‡ç¼–码
     */
    public String getEquipmentCode() {
        return equipmentCode;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç¼–码
     *
     * @param equipmentCode è®¾å¤‡ç¼–码
     */
    public void setEquipmentCode(String equipmentCode) {
        this.equipmentCode = equipmentCode == null ? null : equipmentCode.trim();
    }
    /**
     * èŽ·å–å åœ°é¢ç§¯
     *
     * @return floor_area - å åœ°é¢ç§¯
     */
    public String getFloorArea() {
        return floorArea;
    }
    /**
     * è®¾ç½®å åœ°é¢ç§¯
     *
     * @param floorArea å åœ°é¢ç§¯
     */
    public void setFloorArea(String floorArea) {
        this.floorArea = floorArea == null ? null : floorArea.trim();
    }
    /**
     * èŽ·å–æ‰€å±žåŒºåŽ¿ä»£ç 
     *
     * @return group_id - æ‰€å±žåŒºåŽ¿ä»£ç 
     */
    public String getGroupId() {
        return groupId;
    }
    /**
     * è®¾ç½®æ‰€å±žåŒºåŽ¿ä»£ç 
     *
     * @param groupId æ‰€å±žåŒºåŽ¿ä»£ç 
     */
    public void setGroupId(String groupId) {
        this.groupId = groupId == null ? null : groupId.trim();
    }
    /**
     * èŽ·å–æ‰€å±žåŒºåŽ¿
     *
     * @return group_name - æ‰€å±žåŒºåŽ¿
     */
    public String getGroupName() {
        return groupName;
    }
    /**
     * è®¾ç½®æ‰€å±žåŒºåŽ¿
     *
     * @param groupName æ‰€å±žåŒºåŽ¿
     */
    public void setGroupName(String groupName) {
        this.groupName = groupName == null ? null : groupName.trim();
    }
    /**
     * èŽ·å–æ˜¯å¦æœ‰ç›‘æµ‹
     *
     * @return has_monitor - æ˜¯å¦æœ‰ç›‘测
     */
    public String getHasMonitor() {
        return hasMonitor;
    }
    /**
     * è®¾ç½®æ˜¯å¦æœ‰ç›‘测
     *
     * @param hasMonitor æ˜¯å¦æœ‰ç›‘测
     */
    public void setHasMonitor(String hasMonitor) {
        this.hasMonitor = hasMonitor == null ? null : hasMonitor.trim();
    }
    /**
     * èŽ·å–æ˜¯å¦åœ¨çº¿
     *
     * @return is_online - æ˜¯å¦åœ¨çº¿
     */
    public String getIsOnline() {
        return isOnline;
    }
    /**
     * è®¾ç½®æ˜¯å¦åœ¨çº¿
     *
     * @param isOnline æ˜¯å¦åœ¨çº¿
     */
    public void setIsOnline(String isOnline) {
        this.isOnline = isOnline == null ? null : isOnline.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡æ˜¯å¦å¼‚å¸¸
     *
     * @return is_trouble - è®¾å¤‡æ˜¯å¦å¼‚常
     */
    public String getIsTrouble() {
        return isTrouble;
    }
    /**
     * è®¾ç½®è®¾å¤‡æ˜¯å¦å¼‚常
     *
     * @param isTrouble è®¾å¤‡æ˜¯å¦å¼‚常
     */
    public void setIsTrouble(String isTrouble) {
        this.isTrouble = isTrouble == null ? null : isTrouble.trim();
    }
    /**
     * èŽ·å–åˆ é™¤æ ‡å¿—ä½
     *
     * @return jhpt_delete - åˆ é™¤æ ‡å¿—位
     */
    public String getJhptDelete() {
        return jhptDelete;
    }
    /**
     * è®¾ç½®åˆ é™¤æ ‡å¿—位
     *
     * @param jhptDelete åˆ é™¤æ ‡å¿—位
     */
    public void setJhptDelete(String jhptDelete) {
        this.jhptDelete = jhptDelete == null ? null : jhptDelete.trim();
    }
    /**
     * èŽ·å–æ›´æ–°æ—¶é—´
     *
     * @return jhpt_update_time - æ›´æ–°æ—¶é—´
     */
    public String getJhptUpdateTime() {
        return jhptUpdateTime;
    }
    /**
     * è®¾ç½®æ›´æ–°æ—¶é—´
     *
     * @param jhptUpdateTime æ›´æ–°æ—¶é—´
     */
    public void setJhptUpdateTime(String jhptUpdateTime) {
        this.jhptUpdateTime = jhptUpdateTime == null ? null : jhptUpdateTime.trim();
    }
    /**
     * @return kindex
     */
    public String getKindex() {
        return kindex;
    }
    /**
     * @param kindex
     */
    public void setKindex(String kindex) {
        this.kindex = kindex == null ? null : kindex.trim();
    }
    /**
     * èŽ·å–çº¬åº¦
     *
     * @return latitude - çº¬åº¦
     */
    public String getLatitude() {
        return latitude;
    }
    /**
     * è®¾ç½®çº¬åº¦
     *
     * @param latitude çº¬åº¦
     */
    public void setLatitude(String latitude) {
        this.latitude = latitude == null ? null : latitude.trim();
    }
    /**
     * èŽ·å–è”ç³»äºº
     *
     * @return linkman - è”系人
     */
    public String getLinkman() {
        return linkman;
    }
    /**
     * è®¾ç½®è”系人
     *
     * @param linkman è”系人
     */
    public void setLinkman(String linkman) {
        this.linkman = linkman == null ? null : linkman.trim();
    }
    /**
     * èŽ·å–ç»åº¦
     *
     * @return longitude - ç»åº¦
     */
    public String getLongitude() {
        return longitude;
    }
    /**
     * è®¾ç½®ç»åº¦
     *
     * @param longitude ç»åº¦
     */
    public void setLongitude(String longitude) {
        this.longitude = longitude == null ? null : longitude.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡ç¼–ç 
     *
     * @return mn_code - è®¾å¤‡ç¼–码
     */
    public String getMnCode() {
        return mnCode;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç¼–码
     *
     * @param mnCode è®¾å¤‡ç¼–码
     */
    public void setMnCode(String mnCode) {
        this.mnCode = mnCode == null ? null : mnCode.trim();
    }
    /**
     * èŽ·å–ç«™ç‚¹åç§°
     *
     * @return name - ç«™ç‚¹åç§°
     */
    public String getName() {
        return name;
    }
    /**
     * è®¾ç½®ç«™ç‚¹åç§°
     *
     * @param name ç«™ç‚¹åç§°
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }
    /**
     * èŽ·å–å™ªå£°åŠŸèƒ½åŒº
     *
     * @return noise_region - å™ªå£°åŠŸèƒ½åŒº
     */
    public String getNoiseRegion() {
        return noiseRegion;
    }
    /**
     * è®¾ç½®å™ªå£°åŠŸèƒ½åŒº
     *
     * @param noiseRegion å™ªå£°åŠŸèƒ½åŒº
     */
    public void setNoiseRegion(String noiseRegion) {
        this.noiseRegion = noiseRegion == null ? null : noiseRegion.trim();
    }
    /**
     * èŽ·å–è”ç³»äººç”µè¯
     *
     * @return phone - è”系人电话
     */
    public String getPhone() {
        return phone;
    }
    /**
     * è®¾ç½®è”系人电话
     *
     * @param phone è”系人电话
     */
    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }
    /**
     * èŽ·å–æ‰€å±žçœä»½
     *
     * @return province - æ‰€å±žçœä»½
     */
    public String getProvince() {
        return province;
    }
    /**
     * è®¾ç½®æ‰€å±žçœä»½
     *
     * @param province æ‰€å±žçœä»½
     */
    public void setProvince(String province) {
        this.province = province == null ? null : province.trim();
    }
    /**
     * èŽ·å–è´Ÿè´£äºº
     *
     * @return responsible - è´Ÿè´£äºº
     */
    public String getResponsible() {
        return responsible;
    }
    /**
     * è®¾ç½®è´Ÿè´£äºº
     *
     * @param responsible è´Ÿè´£äºº
     */
    public void setResponsible(String responsible) {
        this.responsible = responsible == null ? null : responsible.trim();
    }
    /**
     * èŽ·å–å†…ä¸­å¤–çŽ¯ç¼–ç 
     *
     * @return ring_id - å†…中外环编码
     */
    public String getRingId() {
        return ringId;
    }
    /**
     * è®¾ç½®å†…中外环编码
     *
     * @param ringId å†…中外环编码
     */
    public void setRingId(String ringId) {
        this.ringId = ringId == null ? null : ringId.trim();
    }
    /**
     * èŽ·å–é˜¶æ®µå¼€å§‹æ—¥æœŸ
     *
     * @return stage_begin_date - é˜¶æ®µå¼€å§‹æ—¥æœŸ
     */
    public Date getStageBeginDate() {
        return stageBeginDate;
    }
    /**
     * è®¾ç½®é˜¶æ®µå¼€å§‹æ—¥æœŸ
     *
     * @param stageBeginDate é˜¶æ®µå¼€å§‹æ—¥æœŸ
     */
    public void setStageBeginDate(Date stageBeginDate) {
        this.stageBeginDate = stageBeginDate;
    }
    /**
     * èŽ·å–åœæ­¢æ—¶é—´
     *
     * @return stop_time - åœæ­¢æ—¶é—´
     */
    public Date getStopTime() {
        return stopTime;
    }
    /**
     * è®¾ç½®åœæ­¢æ—¶é—´
     *
     * @param stopTime åœæ­¢æ—¶é—´
     */
    public void setStopTime(Date stopTime) {
        this.stopTime = stopTime;
    }
    /**
     * èŽ·å–tsp浓度
     *
     * @return tsp - tsp浓度
     */
    public Double getTsp() {
        return tsp;
    }
    /**
     * è®¾ç½®tsp浓度
     *
     * @param tsp tsp浓度
     */
    public void setTsp(Double tsp) {
        this.tsp = tsp;
    }
    /**
     * èŽ·å–ç±»åž‹ç¼–ç 
     *
     * @return type_id - ç±»åž‹ç¼–码
     */
    public String getTypeId() {
        return typeId;
    }
    /**
     * è®¾ç½®ç±»åž‹ç¼–码
     *
     * @param typeId ç±»åž‹ç¼–码
     */
    public void setTypeId(String typeId) {
        this.typeId = typeId == null ? null : typeId.trim();
    }
    /**
     * èŽ·å–ç±»åž‹åç§°
     *
     * @return typename - ç±»åž‹åç§°
     */
    public String getTypename() {
        return typename;
    }
    /**
     * è®¾ç½®ç±»åž‹åç§°
     *
     * @param typename ç±»åž‹åç§°
     */
    public void setTypename(String typename) {
        this.typename = typename == null ? null : typename.trim();
    }
    /**
     * èŽ·å–ç»Ÿè®¡ç±»åž‹ç¼–ç 
     *
     * @return union_type_id - ç»Ÿè®¡ç±»åž‹ç¼–码
     */
    public String getUnionTypeId() {
        return unionTypeId;
    }
    /**
     * è®¾ç½®ç»Ÿè®¡ç±»åž‹ç¼–码
     *
     * @param unionTypeId ç»Ÿè®¡ç±»åž‹ç¼–码
     */
    public void setUnionTypeId(String unionTypeId) {
        this.unionTypeId = unionTypeId == null ? null : unionTypeId.trim();
    }
    /**
     * èŽ·å–å›´å¢™é«˜åº¦
     *
     * @return wall_height - å›´å¢™é«˜åº¦
     */
    public String getWallHeight() {
        return wallHeight;
    }
    /**
     * è®¾ç½®å›´å¢™é«˜åº¦
     *
     * @param wallHeight å›´å¢™é«˜åº¦
     */
    public void setWallHeight(String wallHeight) {
        this.wallHeight = wallHeight == null ? null : wallHeight.trim();
    }
    /**
     * èŽ·å–ä¸šåŠ¡æ—¶é—´
     *
     * @return ywsj_date - ä¸šåŠ¡æ—¶é—´
     */
    public Date getYwsjDate() {
        return ywsjDate;
    }
    /**
     * è®¾ç½®ä¸šåŠ¡æ—¶é—´
     *
     * @param ywsjDate ä¸šåŠ¡æ—¶é—´
     */
    public void setYwsjDate(Date ywsjDate) {
        this.ywsjDate = ywsjDate;
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteMap.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,146 @@
package cn.flightfeather.supervision.domain.ds2.entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Table(name = "ja_t_dust_site_map")
public class DustSiteMap {
    @Id
    @Column(name = "Id")
    private Integer id;
    @Column(name = "TZ_User_Id")
    private String tzUserId;
    @Column(name = "TZ_User_Name")
    private String tzUserName;
    @Column(name = "JA_MN_Code")
    private String jaMnCode;
    @Column(name = "JA_Scene_Name")
    private String jaSceneName;
    @Column(name = "SV_User_Id")
    private String svUserId;
    @Column(name = "SV_User_name")
    private String svUserName;
    @Column(name = "Create_Time")
    private Date createTime;
    /**
     * @return Id
     */
    public Integer getId() {
        return id;
    }
    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }
    /**
     * @return TZ_User_Id
     */
    public String getTzUserId() {
        return tzUserId;
    }
    /**
     * @param tzUserId
     */
    public void setTzUserId(String tzUserId) {
        this.tzUserId = tzUserId == null ? null : tzUserId.trim();
    }
    /**
     * @return TZ_User_Name
     */
    public String getTzUserName() {
        return tzUserName;
    }
    /**
     * @param tzUserName
     */
    public void setTzUserName(String tzUserName) {
        this.tzUserName = tzUserName == null ? null : tzUserName.trim();
    }
    /**
     * @return JA_MN_Code
     */
    public String getJaMnCode() {
        return jaMnCode;
    }
    /**
     * @param jaMnCode
     */
    public void setJaMnCode(String jaMnCode) {
        this.jaMnCode = jaMnCode == null ? null : jaMnCode.trim();
    }
    /**
     * @return JA_Scene_Name
     */
    public String getJaSceneName() {
        return jaSceneName;
    }
    /**
     * @param jaSceneName
     */
    public void setJaSceneName(String jaSceneName) {
        this.jaSceneName = jaSceneName == null ? null : jaSceneName.trim();
    }
    /**
     * @return SV_User_Id
     */
    public String getSvUserId() {
        return svUserId;
    }
    /**
     * @param svUserId
     */
    public void setSvUserId(String svUserId) {
        this.svUserId = svUserId == null ? null : svUserId.trim();
    }
    /**
     * @return SV_User_name
     */
    public String getSvUserName() {
        return svUserName;
    }
    /**
     * @param svUserName
     */
    public void setSvUserName(String svUserName) {
        this.svUserName = svUserName == null ? null : svUserName.trim();
    }
    /**
     * @return Create_Time
     */
    public Date getCreateTime() {
        return createTime;
    }
    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/HourDustData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,326 @@
package cn.flightfeather.supervision.domain.ds2.entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Table(name = "ja_t_hour_dust_data")
public class HourDustData {
    @Id
    private String id;
    /**
     * æ‰¬å°˜å€¼
     */
    private Double dustvalue;
    /**
     * FLAG
     */
    private String flag;
    /**
     * ç­‰çº§
     */
    private String grade;
    /**
     * æ‰€å±žåŒºåŽ¿
     */
    private String groupname;
    /**
     * å…¥åº“æ—¶é—´
     */
    private Date inserttime;
    /**
     * å¼€å§‹æ—¶é—´
     */
    private Date lst;
    /**
     * ç»“束时间
     */
    @Column(name = "lst_end")
    private Date lstEnd;
    /**
     * ç›‘测设备编码
     */
    private String mncode;
    /**
     * å·¥ç¨‹åç§°
     */
    private String name;
    /**
     * å™ªå£°å€¼
     */
    private String noisevalue;
    /**
     * å·¥ç¨‹ID
     */
    private String projectid;
    /**
     * å·¥ç¨‹ç±»åˆ«ID
     */
    private String projecttypeid;
    /**
     * è´¨é‡
     */
    private String quality;
    /**
     * @return id
     */
    public String getId() {
        return id;
    }
    /**
     * @param id
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }
    /**
     * èŽ·å–æ‰¬å°˜å€¼
     *
     * @return dustvalue - æ‰¬å°˜å€¼
     */
    public Double getDustvalue() {
        return dustvalue;
    }
    /**
     * è®¾ç½®æ‰¬å°˜å€¼
     *
     * @param dustvalue æ‰¬å°˜å€¼
     */
    public void setDustvalue(Double dustvalue) {
        this.dustvalue = dustvalue;
    }
    /**
     * èŽ·å–FLAG
     *
     * @return flag - FLAG
     */
    public String getFlag() {
        return flag;
    }
    /**
     * è®¾ç½®FLAG
     *
     * @param flag FLAG
     */
    public void setFlag(String flag) {
        this.flag = flag == null ? null : flag.trim();
    }
    /**
     * èŽ·å–ç­‰çº§
     *
     * @return grade - ç­‰çº§
     */
    public String getGrade() {
        return grade;
    }
    /**
     * è®¾ç½®ç­‰çº§
     *
     * @param grade ç­‰çº§
     */
    public void setGrade(String grade) {
        this.grade = grade == null ? null : grade.trim();
    }
    /**
     * èŽ·å–æ‰€å±žåŒºåŽ¿
     *
     * @return groupname - æ‰€å±žåŒºåŽ¿
     */
    public String getGroupname() {
        return groupname;
    }
    /**
     * è®¾ç½®æ‰€å±žåŒºåŽ¿
     *
     * @param groupname æ‰€å±žåŒºåŽ¿
     */
    public void setGroupname(String groupname) {
        this.groupname = groupname == null ? null : groupname.trim();
    }
    /**
     * èŽ·å–å…¥åº“æ—¶é—´
     *
     * @return inserttime - å…¥åº“æ—¶é—´
     */
    public Date getInserttime() {
        return inserttime;
    }
    /**
     * è®¾ç½®å…¥åº“æ—¶é—´
     *
     * @param inserttime å…¥åº“æ—¶é—´
     */
    public void setInserttime(Date inserttime) {
        this.inserttime = inserttime;
    }
    /**
     * èŽ·å–å¼€å§‹æ—¶é—´
     *
     * @return lst - å¼€å§‹æ—¶é—´
     */
    public Date getLst() {
        return lst;
    }
    /**
     * è®¾ç½®å¼€å§‹æ—¶é—´
     *
     * @param lst å¼€å§‹æ—¶é—´
     */
    public void setLst(Date lst) {
        this.lst = lst;
    }
    /**
     * èŽ·å–ç»“æŸæ—¶é—´
     *
     * @return lst_end - ç»“束时间
     */
    public Date getLstEnd() {
        return lstEnd;
    }
    /**
     * è®¾ç½®ç»“束时间
     *
     * @param lstEnd ç»“束时间
     */
    public void setLstEnd(Date lstEnd) {
        this.lstEnd = lstEnd;
    }
    /**
     * èŽ·å–ç›‘æµ‹è®¾å¤‡ç¼–ç 
     *
     * @return mncode - ç›‘测设备编码
     */
    public String getMncode() {
        return mncode;
    }
    /**
     * è®¾ç½®ç›‘测设备编码
     *
     * @param mncode ç›‘测设备编码
     */
    public void setMncode(String mncode) {
        this.mncode = mncode == null ? null : mncode.trim();
    }
    /**
     * èŽ·å–å·¥ç¨‹åç§°
     *
     * @return name - å·¥ç¨‹åç§°
     */
    public String getName() {
        return name;
    }
    /**
     * è®¾ç½®å·¥ç¨‹åç§°
     *
     * @param name å·¥ç¨‹åç§°
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }
    /**
     * èŽ·å–å™ªå£°å€¼
     *
     * @return noisevalue - å™ªå£°å€¼
     */
    public String getNoisevalue() {
        return noisevalue;
    }
    /**
     * è®¾ç½®å™ªå£°å€¼
     *
     * @param noisevalue å™ªå£°å€¼
     */
    public void setNoisevalue(String noisevalue) {
        this.noisevalue = noisevalue == null ? null : noisevalue.trim();
    }
    /**
     * èŽ·å–å·¥ç¨‹ID
     *
     * @return projectid - å·¥ç¨‹ID
     */
    public String getProjectid() {
        return projectid;
    }
    /**
     * è®¾ç½®å·¥ç¨‹ID
     *
     * @param projectid å·¥ç¨‹ID
     */
    public void setProjectid(String projectid) {
        this.projectid = projectid == null ? null : projectid.trim();
    }
    /**
     * èŽ·å–å·¥ç¨‹ç±»åˆ«ID
     *
     * @return projecttypeid - å·¥ç¨‹ç±»åˆ«ID
     */
    public String getProjecttypeid() {
        return projecttypeid;
    }
    /**
     * è®¾ç½®å·¥ç¨‹ç±»åˆ«ID
     *
     * @param projecttypeid å·¥ç¨‹ç±»åˆ«ID
     */
    public void setProjecttypeid(String projecttypeid) {
        this.projecttypeid = projecttypeid == null ? null : projecttypeid.trim();
    }
    /**
     * èŽ·å–è´¨é‡
     *
     * @return quality - è´¨é‡
     */
    public String getQuality() {
        return quality;
    }
    /**
     * è®¾ç½®è´¨é‡
     *
     * @param quality è´¨é‡
     */
    public void setQuality(String quality) {
        this.quality = quality == null ? null : quality.trim();
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampDeviceData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,290 @@
package cn.flightfeather.supervision.domain.ds2.entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Table(name = "ja_t_lamp_device_data")
public class LampDeviceData {
    @Id
    private Integer id;
    /**
     * é€šé“号
     */
    @Column(name = "channel_num")
    private String channelNum;
    /**
     * æ¸…洁度
     */
    @Column(name = "clean_liness")
    private String cleanLiness;
    /**
     * è®¾å¤‡ç¼–号
     */
    @Column(name = "device_code")
    private String deviceCode;
    /**
     * è®¾å¤‡åç§°
     */
    @Column(name = "device_name")
    private String deviceName;
    /**
     * è®¾å¤‡çŠ¶æ€
     */
    @Column(name = "device_state")
    private String deviceState;
    /**
     * ä¼ä¸šç¼–号
     */
    @Column(name = "enter_id")
    private String enterId;
    /**
     * é£Žæ‰‡çŠ¶æ€
     */
    @Column(name = "fan_state")
    private String fanState;
    /**
     * æ²¹çƒŸæµ“度
     */
    @Column(name = "lampblack_value")
    private Double lampblackValue;
    /**
     * ç›‘测时间
     */
    @Column(name = "monitor_time")
    private Date monitorTime;
    /**
     * ç”Ÿäº§æ—¶é—´
     */
    @Column(name = "production_date")
    private Date productionDate;
    /**
     * å‡€åŒ–器状态
     */
    @Column(name = "purifier_state")
    private String purifierState;
    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }
    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }
    /**
     * èŽ·å–é€šé“å·
     *
     * @return channel_num - é€šé“号
     */
    public String getChannelNum() {
        return channelNum;
    }
    /**
     * è®¾ç½®é€šé“号
     *
     * @param channelNum é€šé“号
     */
    public void setChannelNum(String channelNum) {
        this.channelNum = channelNum == null ? null : channelNum.trim();
    }
    /**
     * èŽ·å–æ¸…æ´åº¦
     *
     * @return clean_liness - æ¸…洁度
     */
    public String getCleanLiness() {
        return cleanLiness;
    }
    /**
     * è®¾ç½®æ¸…洁度
     *
     * @param cleanLiness æ¸…洁度
     */
    public void setCleanLiness(String cleanLiness) {
        this.cleanLiness = cleanLiness == null ? null : cleanLiness.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡ç¼–å·
     *
     * @return device_code - è®¾å¤‡ç¼–号
     */
    public String getDeviceCode() {
        return deviceCode;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç¼–号
     *
     * @param deviceCode è®¾å¤‡ç¼–号
     */
    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode == null ? null : deviceCode.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡åç§°
     *
     * @return device_name - è®¾å¤‡åç§°
     */
    public String getDeviceName() {
        return deviceName;
    }
    /**
     * è®¾ç½®è®¾å¤‡åç§°
     *
     * @param deviceName è®¾å¤‡åç§°
     */
    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName == null ? null : deviceName.trim();
    }
    /**
     * èŽ·å–è®¾å¤‡çŠ¶æ€
     *
     * @return device_state - è®¾å¤‡çŠ¶æ€
     */
    public String getDeviceState() {
        return deviceState;
    }
    /**
     * è®¾ç½®è®¾å¤‡çŠ¶æ€
     *
     * @param deviceState è®¾å¤‡çŠ¶æ€
     */
    public void setDeviceState(String deviceState) {
        this.deviceState = deviceState == null ? null : deviceState.trim();
    }
    /**
     * èŽ·å–ä¼ä¸šç¼–å·
     *
     * @return enter_id - ä¼ä¸šç¼–号
     */
    public String getEnterId() {
        return enterId;
    }
    /**
     * è®¾ç½®ä¼ä¸šç¼–号
     *
     * @param enterId ä¼ä¸šç¼–号
     */
    public void setEnterId(String enterId) {
        this.enterId = enterId == null ? null : enterId.trim();
    }
    /**
     * èŽ·å–é£Žæ‰‡çŠ¶æ€
     *
     * @return fan_state - é£Žæ‰‡çŠ¶æ€
     */
    public String getFanState() {
        return fanState;
    }
    /**
     * è®¾ç½®é£Žæ‰‡çŠ¶æ€
     *
     * @param fanState é£Žæ‰‡çŠ¶æ€
     */
    public void setFanState(String fanState) {
        this.fanState = fanState == null ? null : fanState.trim();
    }
    /**
     * èŽ·å–æ²¹çƒŸæµ“åº¦
     *
     * @return lampblack_value - æ²¹çƒŸæµ“度
     */
    public Double getLampblackValue() {
        return lampblackValue;
    }
    /**
     * è®¾ç½®æ²¹çƒŸæµ“度
     *
     * @param lampblackValue æ²¹çƒŸæµ“度
     */
    public void setLampblackValue(Double lampblackValue) {
        this.lampblackValue = lampblackValue;
    }
    /**
     * èŽ·å–ç›‘æµ‹æ—¶é—´
     *
     * @return monitor_time - ç›‘测时间
     */
    public Date getMonitorTime() {
        return monitorTime;
    }
    /**
     * è®¾ç½®ç›‘测时间
     *
     * @param monitorTime ç›‘测时间
     */
    public void setMonitorTime(Date monitorTime) {
        this.monitorTime = monitorTime;
    }
    /**
     * èŽ·å–ç”Ÿäº§æ—¶é—´
     *
     * @return production_date - ç”Ÿäº§æ—¶é—´
     */
    public Date getProductionDate() {
        return productionDate;
    }
    /**
     * è®¾ç½®ç”Ÿäº§æ—¶é—´
     *
     * @param productionDate ç”Ÿäº§æ—¶é—´
     */
    public void setProductionDate(Date productionDate) {
        this.productionDate = productionDate;
    }
    /**
     * èŽ·å–å‡€åŒ–å™¨çŠ¶æ€
     *
     * @return purifier_state - å‡€åŒ–器状态
     */
    public String getPurifierState() {
        return purifierState;
    }
    /**
     * è®¾ç½®å‡€åŒ–器状态
     *
     * @param purifierState å‡€åŒ–器状态
     */
    public void setPurifierState(String purifierState) {
        this.purifierState = purifierState == null ? null : purifierState.trim();
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampEnterBaseInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,377 @@
package cn.flightfeather.supervision.domain.ds2.entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Table(name = "ja_t_lamp_enter_base_info")
public class LampEnterBaseInfo {
    /**
     * ä¼ä¸šç¼–码
     */
    @Id
    @Column(name = "enter_id")
    private String enterId;
    /**
     * ä¼ä¸šåç§°
     */
    @Column(name = "enter_name")
    private String enterName;
    /**
     * ä¼ä¸šåœ°å€
     */
    private String address;
    /**
     * è¥ä¸šæ—¶é—´
     */
    @Column(name = "business_date")
    private String businessDate;
    /**
     * æ•°æ®æº
     */
    private String datasource;
    /**
     * é›†èšåŒºç¼–码
     */
    @Column(name = "jjq_code")
    private String jjqCode;
    /**
     * é›†èšåŒºåç§°
     */
    @Column(name = "jjq_name")
    private String jjqName;
    /**
     * çº¬åº¦
     */
    private Double latitude;
    /**
     * è”系人
     */
    @Column(name = "link_man")
    private String linkMan;
    /**
     * è”系电话
     */
    @Column(name = "link_phone")
    private String linkPhone;
    /**
     * ç»åº¦
     */
    private Double longitude;
    /**
     * è¡Œæ”¿åŒºåç§°
     */
    @Column(name = "region_name")
    private String regionName;
    /**
     * æ³¨å†Œæ—¶é—´
     */
    @Column(name = "regist_date")
    private Date registDate;
    /**
     * çŠ¶æ€
     */
    private String state;
    /**
     * æ‰€å±žè¡—道
     */
    private String street;
    /**
     * æŽ’口类型
     */
    private String outfallType;
    /**
     * èŽ·å–ä¼ä¸šç¼–ç 
     *
     * @return enter_id - ä¼ä¸šç¼–码
     */
    public String getEnterId() {
        return enterId;
    }
    /**
     * è®¾ç½®ä¼ä¸šç¼–码
     *
     * @param enterId ä¼ä¸šç¼–码
     */
    public void setEnterId(String enterId) {
        this.enterId = enterId == null ? null : enterId.trim();
    }
    /**
     * èŽ·å–ä¼ä¸šåç§°
     *
     * @return enter_name - ä¼ä¸šåç§°
     */
    public String getEnterName() {
        return enterName;
    }
    /**
     * è®¾ç½®ä¼ä¸šåç§°
     *
     * @param enterName ä¼ä¸šåç§°
     */
    public void setEnterName(String enterName) {
        this.enterName = enterName == null ? null : enterName.trim();
    }
    /**
     * èŽ·å–ä¼ä¸šåœ°å€
     *
     * @return address - ä¼ä¸šåœ°å€
     */
    public String getAddress() {
        return address;
    }
    /**
     * è®¾ç½®ä¼ä¸šåœ°å€
     *
     * @param address ä¼ä¸šåœ°å€
     */
    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }
    /**
     * èŽ·å–è¥ä¸šæ—¶é—´
     *
     * @return business_date - è¥ä¸šæ—¶é—´
     */
    public String getBusinessDate() {
        return businessDate;
    }
    /**
     * è®¾ç½®è¥ä¸šæ—¶é—´
     *
     * @param businessDate è¥ä¸šæ—¶é—´
     */
    public void setBusinessDate(String businessDate) {
        this.businessDate = businessDate == null ? null : businessDate.trim();
    }
    /**
     * èŽ·å–æ•°æ®æº
     *
     * @return datasource - æ•°æ®æº
     */
    public String getDatasource() {
        return datasource;
    }
    /**
     * è®¾ç½®æ•°æ®æº
     *
     * @param datasource æ•°æ®æº
     */
    public void setDatasource(String datasource) {
        this.datasource = datasource == null ? null : datasource.trim();
    }
    /**
     * èŽ·å–é›†èšåŒºç¼–ç 
     *
     * @return jjq_code - é›†èšåŒºç¼–码
     */
    public String getJjqCode() {
        return jjqCode;
    }
    /**
     * è®¾ç½®é›†èšåŒºç¼–码
     *
     * @param jjqCode é›†èšåŒºç¼–码
     */
    public void setJjqCode(String jjqCode) {
        this.jjqCode = jjqCode == null ? null : jjqCode.trim();
    }
    /**
     * èŽ·å–é›†èšåŒºåç§°
     *
     * @return jjq_name - é›†èšåŒºåç§°
     */
    public String getJjqName() {
        return jjqName;
    }
    /**
     * è®¾ç½®é›†èšåŒºåç§°
     *
     * @param jjqName é›†èšåŒºåç§°
     */
    public void setJjqName(String jjqName) {
        this.jjqName = jjqName == null ? null : jjqName.trim();
    }
    /**
     * èŽ·å–çº¬åº¦
     *
     * @return latitude - çº¬åº¦
     */
    public Double getLatitude() {
        return latitude;
    }
    /**
     * è®¾ç½®çº¬åº¦
     *
     * @param latitude çº¬åº¦
     */
    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }
    /**
     * èŽ·å–è”ç³»äºº
     *
     * @return link_man - è”系人
     */
    public String getLinkMan() {
        return linkMan;
    }
    /**
     * è®¾ç½®è”系人
     *
     * @param linkMan è”系人
     */
    public void setLinkMan(String linkMan) {
        this.linkMan = linkMan == null ? null : linkMan.trim();
    }
    /**
     * èŽ·å–è”ç³»ç”µè¯
     *
     * @return link_phone - è”系电话
     */
    public String getLinkPhone() {
        return linkPhone;
    }
    /**
     * è®¾ç½®è”系电话
     *
     * @param linkPhone è”系电话
     */
    public void setLinkPhone(String linkPhone) {
        this.linkPhone = linkPhone == null ? null : linkPhone.trim();
    }
    /**
     * èŽ·å–ç»åº¦
     *
     * @return longitude - ç»åº¦
     */
    public Double getLongitude() {
        return longitude;
    }
    /**
     * è®¾ç½®ç»åº¦
     *
     * @param longitude ç»åº¦
     */
    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }
    /**
     * èŽ·å–è¡Œæ”¿åŒºåç§°
     *
     * @return region_name - è¡Œæ”¿åŒºåç§°
     */
    public String getRegionName() {
        return regionName;
    }
    /**
     * è®¾ç½®è¡Œæ”¿åŒºåç§°
     *
     * @param regionName è¡Œæ”¿åŒºåç§°
     */
    public void setRegionName(String regionName) {
        this.regionName = regionName == null ? null : regionName.trim();
    }
    /**
     * èŽ·å–æ³¨å†Œæ—¶é—´
     *
     * @return regist_date - æ³¨å†Œæ—¶é—´
     */
    public Date getRegistDate() {
        return registDate;
    }
    /**
     * è®¾ç½®æ³¨å†Œæ—¶é—´
     *
     * @param registDate æ³¨å†Œæ—¶é—´
     */
    public void setRegistDate(Date registDate) {
        this.registDate = registDate;
    }
    /**
     * èŽ·å–çŠ¶æ€
     *
     * @return state - çŠ¶æ€
     */
    public String getState() {
        return state;
    }
    /**
     * è®¾ç½®çŠ¶æ€
     *
     * @param state çŠ¶æ€
     */
    public void setState(String state) {
        this.state = state == null ? null : state.trim();
    }
    /**
     * èŽ·å–æ‰€å±žè¡—é“
     *
     * @return street - æ‰€å±žè¡—道
     */
    public String getStreet() {
        return street;
    }
    /**
     * è®¾ç½®æ‰€å±žè¡—道
     *
     * @param street æ‰€å±žè¡—道
     */
    public void setStreet(String street) {
        this.street = street == null ? null : street.trim();
    }
    public String getOutfallType() {
        return outfallType;
    }
    public void setOutfallType(String outfallType) {
        this.outfallType = outfallType;
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/RestaurantBaseInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,600 @@
package cn.flightfeather.supervision.domain.ds2.entity;
import cn.flightfeather.supervision.domain.ds1.entity.BaseScene;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "ea_t_restaurant_base_info")
public class RestaurantBaseInfo implements BaseScene {
    @Id
    @Column(name = "RB_GUID")
    private String rbGuid;
    /**
     * ç»è¥èœç³»
     */
    @Column(name = "RB_Cuisine")
    private String rbCuisine;
    /**
     * æ²¹çƒŸç±»åž‹
     */
    @Column(name = "RB_Cooking_Fumes_Type")
    private String rbCookingFumesType;
    /**
     * æ¥å®¢é«˜å³°æ—¶æ®µ
     */
    @Column(name = "RB_Peak_Period")
    private String rbPeakPeriod;
    /**
     * å®¤å†…就餐位
     */
    @Column(name = "RB_Indoor_Seating")
    private Integer rbIndoorSeating;
    /**
     * å®¤å¤–就餐位
     */
    @Column(name = "RB_Outdoor_Seating")
    private Integer rbOutdoorSeating;
    /**
     * å°±é¤ä½æ€»æ•°
     */
    @Column(name = "RB_Total_Seating")
    private Integer rbTotalSeating;
    /**
     * æ˜¯å¦å­˜åœ¨å¤§å ‚烧烤或户外烧烤
     */
    @Column(name = "RB_Outdoor_Barbecue")
    private Boolean rbOutdoorBarbecue;
    /**
     * åŽåŽ¨æ˜¯å¦æœ‰å‘å¤–æ•žå¼€é—¨çª—
     */
    @Column(name = "RB_Open_Kitchen")
    private Boolean rbOpenKitchen;
    /**
     * å¤§å ‚、后厨环境情况
     */
    @Column(name = "RB_Environment")
    private String rbEnvironment;
    /**
     * ç¶å¤´æ•°
     */
    @Column(name = "RB_Cooking_Range_Num")
    private Integer rbCookingRangeNum;
    /**
     * ç”µçƒ¤ç‚‰
     */
    @Column(name = "RB_Electric_Oven_Num")
    private Integer rbElectricOvenNum;
    /**
     * å…¶ä»–涉油烟炊具
     */
    @Column(name = "RB_Other_Cooker_Num")
    private String rbOtherCookerNum;
    /**
     * åŽåŽ¨æ˜¯å¦æœ‰æ–°é£Ž
     */
    @Column(name = "RB_Fresh_Air")
    private Boolean rbFreshAir;
    /**
     * åŽåŽ¨æ˜¯å¦æœ‰ç©ºè°ƒ
     */
    @Column(name = "RB_Air_Conditioner")
    private Boolean rbAirConditioner;
    /**
     * åŽåŽ¨æ˜¯å¦æœ‰æŽ’æ°”æ‰‡
     */
    @Column(name = "RB_Exhaust_Fan")
    private Boolean rbExhaustFan;
    /**
     * ç”¨æ²¹ç±»åž‹
     */
    @Column(name = "RB_Cooking_Oil_Type")
    private String rbCookingOilType;
    /**
     * æœˆåº¦ç”¨æ²¹é‡ï¼ˆL)
     */
    @Column(name = "RB_Cooking_Oil_Capacity")
    private String rbCookingOilCapacity;
    /**
     * æ‰€å±žé›†ä¸­åŒº
     */
    @Column(name = "RB_Concentration_Area")
    private String rbConcentrationArea;
    /**
     * æŽ’口数量
     */
    @Column(name = "RB_Outfall_Count")
    private Integer rbOutfallCount;
    /**
     * æŽ’口位置
     */
    @Column(name = "RB_Outfall_Location")
    private String rbOutfallLocation;
    /**
     * æŽ’口编号
     */
    @Column(name = "RB_Outfall_Num")
    private String rbOutfallNum;
    @Column(name = "RB_Extension1")
    private String rbExtension1;
    @Column(name = "RB_Extension2")
    private String rbExtension2;
    @Column(name = "RB_Extension3")
    private String rbExtension3;
    @Column(name = "RB_Remark")
    private String rbRemark;
    /**
     * @return RB_GUID
     */
    public String getRbGuid() {
        return rbGuid;
    }
    /**
     * @param rbGuid
     */
    public void setRbGuid(String rbGuid) {
        this.rbGuid = rbGuid == null ? null : rbGuid.trim();
    }
    /**
     * èŽ·å–ç»è¥èœç³»
     *
     * @return RB_Cuisine - ç»è¥èœç³»
     */
    public String getRbCuisine() {
        return rbCuisine;
    }
    /**
     * è®¾ç½®ç»è¥èœç³»
     *
     * @param rbCuisine ç»è¥èœç³»
     */
    public void setRbCuisine(String rbCuisine) {
        this.rbCuisine = rbCuisine == null ? null : rbCuisine.trim();
    }
    /**
     * èŽ·å–æ²¹çƒŸç±»åž‹
     *
     * @return RB_Cooking_Fumes_Type - æ²¹çƒŸç±»åž‹
     */
    public String getRbCookingFumesType() {
        return rbCookingFumesType;
    }
    /**
     * è®¾ç½®æ²¹çƒŸç±»åž‹
     *
     * @param rbCookingFumesType æ²¹çƒŸç±»åž‹
     */
    public void setRbCookingFumesType(String rbCookingFumesType) {
        this.rbCookingFumesType = rbCookingFumesType == null ? null : rbCookingFumesType.trim();
    }
    /**
     * èŽ·å–æ¥å®¢é«˜å³°æ—¶æ®µ
     *
     * @return RB_Peak_Period - æ¥å®¢é«˜å³°æ—¶æ®µ
     */
    public String getRbPeakPeriod() {
        return rbPeakPeriod;
    }
    /**
     * è®¾ç½®æ¥å®¢é«˜å³°æ—¶æ®µ
     *
     * @param rbPeakPeriod æ¥å®¢é«˜å³°æ—¶æ®µ
     */
    public void setRbPeakPeriod(String rbPeakPeriod) {
        this.rbPeakPeriod = rbPeakPeriod == null ? null : rbPeakPeriod.trim();
    }
    /**
     * èŽ·å–å®¤å†…å°±é¤ä½
     *
     * @return RB_Indoor_Seating - å®¤å†…就餐位
     */
    public Integer getRbIndoorSeating() {
        return rbIndoorSeating;
    }
    /**
     * è®¾ç½®å®¤å†…就餐位
     *
     * @param rbIndoorSeating å®¤å†…就餐位
     */
    public void setRbIndoorSeating(Integer rbIndoorSeating) {
        this.rbIndoorSeating = rbIndoorSeating;
    }
    /**
     * èŽ·å–å®¤å¤–å°±é¤ä½
     *
     * @return RB_Outdoor_Seating - å®¤å¤–就餐位
     */
    public Integer getRbOutdoorSeating() {
        return rbOutdoorSeating;
    }
    /**
     * è®¾ç½®å®¤å¤–就餐位
     *
     * @param rbOutdoorSeating å®¤å¤–就餐位
     */
    public void setRbOutdoorSeating(Integer rbOutdoorSeating) {
        this.rbOutdoorSeating = rbOutdoorSeating;
    }
    /**
     * èŽ·å–å°±é¤ä½æ€»æ•°
     *
     * @return RB_Total_Seating - å°±é¤ä½æ€»æ•°
     */
    public Integer getRbTotalSeating() {
        return rbTotalSeating;
    }
    /**
     * è®¾ç½®å°±é¤ä½æ€»æ•°
     *
     * @param rbTotalSeating å°±é¤ä½æ€»æ•°
     */
    public void setRbTotalSeating(Integer rbTotalSeating) {
        this.rbTotalSeating = rbTotalSeating;
    }
    /**
     * èŽ·å–æ˜¯å¦å­˜åœ¨å¤§å ‚çƒ§çƒ¤æˆ–æˆ·å¤–çƒ§çƒ¤
     *
     * @return RB_Outdoor_Barbecue - æ˜¯å¦å­˜åœ¨å¤§å ‚烧烤或户外烧烤
     */
    public Boolean getRbOutdoorBarbecue() {
        return rbOutdoorBarbecue;
    }
    /**
     * è®¾ç½®æ˜¯å¦å­˜åœ¨å¤§å ‚烧烤或户外烧烤
     *
     * @param rbOutdoorBarbecue æ˜¯å¦å­˜åœ¨å¤§å ‚烧烤或户外烧烤
     */
    public void setRbOutdoorBarbecue(Boolean rbOutdoorBarbecue) {
        this.rbOutdoorBarbecue = rbOutdoorBarbecue;
    }
    /**
     * èŽ·å–åŽåŽ¨æ˜¯å¦æœ‰å‘å¤–æ•žå¼€é—¨çª—
     *
     * @return RB_Open_Kitchen - åŽåŽ¨æ˜¯å¦æœ‰å‘å¤–æ•žå¼€é—¨çª—
     */
    public Boolean getRbOpenKitchen() {
        return rbOpenKitchen;
    }
    /**
     * è®¾ç½®åŽåŽ¨æ˜¯å¦æœ‰å‘å¤–æ•žå¼€é—¨çª—
     *
     * @param rbOpenKitchen åŽåŽ¨æ˜¯å¦æœ‰å‘å¤–æ•žå¼€é—¨çª—
     */
    public void setRbOpenKitchen(Boolean rbOpenKitchen) {
        this.rbOpenKitchen = rbOpenKitchen;
    }
    /**
     * èŽ·å–å¤§å ‚ã€åŽåŽ¨çŽ¯å¢ƒæƒ…å†µ
     *
     * @return RB_Environment - å¤§å ‚、后厨环境情况
     */
    public String getRbEnvironment() {
        return rbEnvironment;
    }
    /**
     * è®¾ç½®å¤§å ‚、后厨环境情况
     *
     * @param rbEnvironment å¤§å ‚、后厨环境情况
     */
    public void setRbEnvironment(String rbEnvironment) {
        this.rbEnvironment = rbEnvironment == null ? null : rbEnvironment.trim();
    }
    /**
     * èŽ·å–ç¶å¤´æ•°
     *
     * @return RB_Cooking_Range_Num - ç¶å¤´æ•°
     */
    public Integer getRbCookingRangeNum() {
        return rbCookingRangeNum;
    }
    /**
     * è®¾ç½®ç¶å¤´æ•°
     *
     * @param rbCookingRangeNum ç¶å¤´æ•°
     */
    public void setRbCookingRangeNum(Integer rbCookingRangeNum) {
        this.rbCookingRangeNum = rbCookingRangeNum;
    }
    /**
     * èŽ·å–ç”µçƒ¤ç‚‰
     *
     * @return RB_Electric_Oven_Num - ç”µçƒ¤ç‚‰
     */
    public Integer getRbElectricOvenNum() {
        return rbElectricOvenNum;
    }
    /**
     * è®¾ç½®ç”µçƒ¤ç‚‰
     *
     * @param rbElectricOvenNum ç”µçƒ¤ç‚‰
     */
    public void setRbElectricOvenNum(Integer rbElectricOvenNum) {
        this.rbElectricOvenNum = rbElectricOvenNum;
    }
    /**
     * èŽ·å–å…¶ä»–æ¶‰æ²¹çƒŸç‚Šå…·
     *
     * @return RB_Other_Cooker_Num - å…¶ä»–涉油烟炊具
     */
    public String getRbOtherCookerNum() {
        return rbOtherCookerNum;
    }
    /**
     * è®¾ç½®å…¶ä»–涉油烟炊具
     *
     * @param rbOtherCookerNum å…¶ä»–涉油烟炊具
     */
    public void setRbOtherCookerNum(String rbOtherCookerNum) {
        this.rbOtherCookerNum = rbOtherCookerNum == null ? null : rbOtherCookerNum.trim();
    }
    /**
     * èŽ·å–åŽåŽ¨æ˜¯å¦æœ‰æ–°é£Ž
     *
     * @return RB_Fresh_Air - åŽåŽ¨æ˜¯å¦æœ‰æ–°é£Ž
     */
    public Boolean getRbFreshAir() {
        return rbFreshAir;
    }
    /**
     * è®¾ç½®åŽåŽ¨æ˜¯å¦æœ‰æ–°é£Ž
     *
     * @param rbFreshAir åŽåŽ¨æ˜¯å¦æœ‰æ–°é£Ž
     */
    public void setRbFreshAir(Boolean rbFreshAir) {
        this.rbFreshAir = rbFreshAir;
    }
    /**
     * èŽ·å–åŽåŽ¨æ˜¯å¦æœ‰ç©ºè°ƒ
     *
     * @return RB_Air_Conditioner - åŽåŽ¨æ˜¯å¦æœ‰ç©ºè°ƒ
     */
    public Boolean getRbAirConditioner() {
        return rbAirConditioner;
    }
    /**
     * è®¾ç½®åŽåŽ¨æ˜¯å¦æœ‰ç©ºè°ƒ
     *
     * @param rbAirConditioner åŽåŽ¨æ˜¯å¦æœ‰ç©ºè°ƒ
     */
    public void setRbAirConditioner(Boolean rbAirConditioner) {
        this.rbAirConditioner = rbAirConditioner;
    }
    /**
     * èŽ·å–åŽåŽ¨æ˜¯å¦æœ‰æŽ’æ°”æ‰‡
     *
     * @return RB_Exhaust_Fan - åŽåŽ¨æ˜¯å¦æœ‰æŽ’æ°”æ‰‡
     */
    public Boolean getRbExhaustFan() {
        return rbExhaustFan;
    }
    /**
     * è®¾ç½®åŽåŽ¨æ˜¯å¦æœ‰æŽ’æ°”æ‰‡
     *
     * @param rbExhaustFan åŽåŽ¨æ˜¯å¦æœ‰æŽ’æ°”æ‰‡
     */
    public void setRbExhaustFan(Boolean rbExhaustFan) {
        this.rbExhaustFan = rbExhaustFan;
    }
    /**
     * èŽ·å–ç”¨æ²¹ç±»åž‹
     *
     * @return RB_Cooking_Oil_Type - ç”¨æ²¹ç±»åž‹
     */
    public String getRbCookingOilType() {
        return rbCookingOilType;
    }
    /**
     * è®¾ç½®ç”¨æ²¹ç±»åž‹
     *
     * @param rbCookingOilType ç”¨æ²¹ç±»åž‹
     */
    public void setRbCookingOilType(String rbCookingOilType) {
        this.rbCookingOilType = rbCookingOilType == null ? null : rbCookingOilType.trim();
    }
    /**
     * èŽ·å–æœˆåº¦ç”¨æ²¹é‡ï¼ˆL)
     *
     * @return RB_Cooking_Oil_Capacity - æœˆåº¦ç”¨æ²¹é‡ï¼ˆL)
     */
    public String getRbCookingOilCapacity() {
        return rbCookingOilCapacity;
    }
    /**
     * è®¾ç½®æœˆåº¦ç”¨æ²¹é‡ï¼ˆL)
     *
     * @param rbCookingOilCapacity æœˆåº¦ç”¨æ²¹é‡ï¼ˆL)
     */
    public void setRbCookingOilCapacity(String rbCookingOilCapacity) {
        this.rbCookingOilCapacity = rbCookingOilCapacity == null ? null : rbCookingOilCapacity.trim();
    }
    /**
     * èŽ·å–æ‰€å±žé›†ä¸­åŒº
     *
     * @return RB_Concentration_Area - æ‰€å±žé›†ä¸­åŒº
     */
    public String getRbConcentrationArea() {
        return rbConcentrationArea;
    }
    /**
     * è®¾ç½®æ‰€å±žé›†ä¸­åŒº
     *
     * @param rbConcentrationArea æ‰€å±žé›†ä¸­åŒº
     */
    public void setRbConcentrationArea(String rbConcentrationArea) {
        this.rbConcentrationArea = rbConcentrationArea == null ? null : rbConcentrationArea.trim();
    }
    /**
     * èŽ·å–æŽ’å£æ•°é‡
     *
     * @return RB_Outfall_Count - æŽ’口数量
     */
    public Integer getRbOutfallCount() {
        return rbOutfallCount;
    }
    /**
     * è®¾ç½®æŽ’口数量
     *
     * @param rbOutfallCount æŽ’口数量
     */
    public void setRbOutfallCount(Integer rbOutfallCount) {
        this.rbOutfallCount = rbOutfallCount;
    }
    /**
     * èŽ·å–æŽ’å£ä½ç½®
     *
     * @return RB_Outfall_Location - æŽ’口位置
     */
    public String getRbOutfallLocation() {
        return rbOutfallLocation;
    }
    /**
     * è®¾ç½®æŽ’口位置
     *
     * @param rbOutfallLocation æŽ’口位置
     */
    public void setRbOutfallLocation(String rbOutfallLocation) {
        this.rbOutfallLocation = rbOutfallLocation == null ? null : rbOutfallLocation.trim();
    }
    /**
     * èŽ·å–æŽ’å£ç¼–å·
     *
     * @return RB_Outfall_Num - æŽ’口编号
     */
    public String getRbOutfallNum() {
        return rbOutfallNum;
    }
    /**
     * è®¾ç½®æŽ’口编号
     *
     * @param rbOutfallNum æŽ’口编号
     */
    public void setRbOutfallNum(String rbOutfallNum) {
        this.rbOutfallNum = rbOutfallNum == null ? null : rbOutfallNum.trim();
    }
    /**
     * @return RB_Extension1
     */
    public String getRbExtension1() {
        return rbExtension1;
    }
    /**
     * @param rbExtension1
     */
    public void setRbExtension1(String rbExtension1) {
        this.rbExtension1 = rbExtension1 == null ? null : rbExtension1.trim();
    }
    /**
     * @return RB_Extension2
     */
    public String getRbExtension2() {
        return rbExtension2;
    }
    /**
     * @param rbExtension2
     */
    public void setRbExtension2(String rbExtension2) {
        this.rbExtension2 = rbExtension2 == null ? null : rbExtension2.trim();
    }
    /**
     * @return RB_Extension3
     */
    public String getRbExtension3() {
        return rbExtension3;
    }
    /**
     * @param rbExtension3
     */
    public void setRbExtension3(String rbExtension3) {
        this.rbExtension3 = rbExtension3 == null ? null : rbExtension3.trim();
    }
    /**
     * @return RB_Remark
     */
    public String getRbRemark() {
        return rbRemark;
    }
    /**
     * @param rbRemark
     */
    public void setRbRemark(String rbRemark) {
        this.rbRemark = rbRemark == null ? null : rbRemark.trim();
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/UserinfoTZ.kt
@@ -1,16 +1,20 @@
package cn.flightfeather.supervision.domain.ds2.entity
import com.fasterxml.jackson.annotation.JsonInclude
import java.util.*
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table
@Table(name = "sm_t_userinfo")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UserinfoTZ {
open class UserinfoTZ {
    @Id
    @Column(name = "UI_GUID")
    var guid: String? = null
    @Column(name = "UI_HeadIconUrl")
    var headIconUrl: String? = null
    @Column(name = "UI_AcountName")
    var acountname: String? = null
@@ -36,6 +40,12 @@
    @Column(name = "UI_UserType")
    var usertype: String? = null
    @Column(name = "UI_User_SubType_Id")
    var userSubTypeId: Int? = null
    @Column(name = "UI_User_SubType")
    var userSubType: String? = null
    @Column(name = "D_GUID")
    var dGuid: String? = null
@@ -54,6 +64,12 @@
    @Column(name = "UI_WechatID")
    var wechatid: String? = null
    @Column(name = "UI_Create_Time")
    var uiCreateTime: Date? = null
    @Column(name = "UI_Login_Time")
    var uiLoginTime: Date? = null
    @Column(name = "UI_Extension1")
    var extension1: String? = null
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/VehicleBaseInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,172 @@
package cn.flightfeather.supervision.domain.ds2.entity;
import cn.flightfeather.supervision.domain.ds1.entity.BaseScene;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "ea_t_vehicle_base_info")
public class VehicleBaseInfo implements BaseScene {
    @Id
    @Column(name = "VB_GUID")
    private String vbGuid;
    /**
     * æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯ç¼–号
     */
    @Column(name = "VB_Repair_License")
    private String vbRepairLicense;
    /**
     * æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯æœ‰æ•ˆæœŸ
     */
    @Column(name = "VB_Repair_License_Validity")
    private String vbRepairLicenseValidity;
    /**
     * çŽ¯ä¿è´Ÿè´£äºº
     */
    @Column(name = "VB_Environment_Manager")
    private String vbEnvironmentManager;
    /**
     * çŽ¯ä¿è´Ÿè´£äººç”µè¯
     */
    @Column(name = "VB_Environment_Manager_Tel")
    private String vbEnvironmentManagerTel;
    /**
     * ä¿®è½¦ç±»åž‹
     */
    @Column(name = "VB_Repair_Type")
    private String vbRepairType;
    /**
     * ç»´ä¿®èµ„质级别
     */
    @Column(name = "VB_Repair_Level")
    private String vbRepairLevel;
    /**
     * @return VB_GUID
     */
    public String getVbGuid() {
        return vbGuid;
    }
    /**
     * @param vbGuid
     */
    public void setVbGuid(String vbGuid) {
        this.vbGuid = vbGuid == null ? null : vbGuid.trim();
    }
    /**
     * èŽ·å–æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯ç¼–å·
     *
     * @return VB_Repair_License - æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯ç¼–号
     */
    public String getVbRepairLicense() {
        return vbRepairLicense;
    }
    /**
     * è®¾ç½®æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯ç¼–号
     *
     * @param vbRepairLicense æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯ç¼–号
     */
    public void setVbRepairLicense(String vbRepairLicense) {
        this.vbRepairLicense = vbRepairLicense == null ? null : vbRepairLicense.trim();
    }
    /**
     * èŽ·å–æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯æœ‰æ•ˆæœŸ
     *
     * @return VB_Repair_License_Validity - æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯æœ‰æ•ˆæœŸ
     */
    public String getVbRepairLicenseValidity() {
        return vbRepairLicenseValidity;
    }
    /**
     * è®¾ç½®æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯æœ‰æ•ˆæœŸ
     *
     * @param vbRepairLicenseValidity æ±½è½¦ç»´ä¿®ç»è¥è®¸å¯è¯æœ‰æ•ˆæœŸ
     */
    public void setVbRepairLicenseValidity(String vbRepairLicenseValidity) {
        this.vbRepairLicenseValidity = vbRepairLicenseValidity == null ? null : vbRepairLicenseValidity.trim();
    }
    /**
     * èŽ·å–çŽ¯ä¿è´Ÿè´£äºº
     *
     * @return VB_Environment_Manager - çŽ¯ä¿è´Ÿè´£äºº
     */
    public String getVbEnvironmentManager() {
        return vbEnvironmentManager;
    }
    /**
     * è®¾ç½®çŽ¯ä¿è´Ÿè´£äºº
     *
     * @param vbEnvironmentManager çŽ¯ä¿è´Ÿè´£äºº
     */
    public void setVbEnvironmentManager(String vbEnvironmentManager) {
        this.vbEnvironmentManager = vbEnvironmentManager == null ? null : vbEnvironmentManager.trim();
    }
    /**
     * èŽ·å–çŽ¯ä¿è´Ÿè´£äººç”µè¯
     *
     * @return VB_Environment_Manager_Tel - çŽ¯ä¿è´Ÿè´£äººç”µè¯
     */
    public String getVbEnvironmentManagerTel() {
        return vbEnvironmentManagerTel;
    }
    /**
     * è®¾ç½®çŽ¯ä¿è´Ÿè´£äººç”µè¯
     *
     * @param vbEnvironmentManagerTel çŽ¯ä¿è´Ÿè´£äººç”µè¯
     */
    public void setVbEnvironmentManagerTel(String vbEnvironmentManagerTel) {
        this.vbEnvironmentManagerTel = vbEnvironmentManagerTel == null ? null : vbEnvironmentManagerTel.trim();
    }
    /**
     * èŽ·å–ä¿®è½¦ç±»åž‹
     *
     * @return VB_Repair_Type - ä¿®è½¦ç±»åž‹
     */
    public String getVbRepairType() {
        return vbRepairType;
    }
    /**
     * è®¾ç½®ä¿®è½¦ç±»åž‹
     *
     * @param vbRepairType ä¿®è½¦ç±»åž‹
     */
    public void setVbRepairType(String vbRepairType) {
        this.vbRepairType = vbRepairType == null ? null : vbRepairType.trim();
    }
    /**
     * èŽ·å–ç»´ä¿®èµ„è´¨çº§åˆ«
     *
     * @return VB_Repair_Level - ç»´ä¿®èµ„质级别
     */
    public String getVbRepairLevel() {
        return vbRepairLevel;
    }
    /**
     * è®¾ç½®ç»´ä¿®èµ„质级别
     *
     * @param vbRepairLevel ç»´ä¿®èµ„质级别
     */
    public void setVbRepairLevel(String vbRepairLevel) {
        this.vbRepairLevel = vbRepairLevel == null ? null : vbRepairLevel.trim();
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteInfoMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds2.mapper
import cn.flightfeather.supervision.domain.ds2.entity.DustSiteInfo
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface DustSiteInfoMapper : MyMapper<DustSiteInfo?>
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteMapMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds2.mapper
import cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface DustSiteMapMapper : MyMapper<DustSiteMap?>
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/HourDustDataMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds2.mapper
import cn.flightfeather.supervision.domain.ds2.entity.HourDustData
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface HourDustDataMapper : MyMapper<HourDustData?>
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampDeviceDataMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds2.mapper
import cn.flightfeather.supervision.domain.ds2.entity.LampDeviceData
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface LampDeviceDataMapper : MyMapper<LampDeviceData?>
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampEnterBaseInfoMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds2.mapper
import cn.flightfeather.supervision.domain.ds2.entity.LampEnterBaseInfo
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface LampEnterBaseInfoMapper : MyMapper<LampEnterBaseInfo?>
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/RestaurantBaseInfoMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds2.mapper
import cn.flightfeather.supervision.domain.ds2.entity.RestaurantBaseInfo
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface RestaurantBaseInfoMapper : MyMapper<RestaurantBaseInfo>
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/VehicleBaseInfoMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds2.mapper
import cn.flightfeather.supervision.domain.ds2.entity.VehicleBaseInfo
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface VehicleBaseInfoMapper : MyMapper<VehicleBaseInfo?>
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/entity/FumeDailyAnalysis.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,403 @@
package cn.flightfeather.supervision.domain.ds3.entity;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
@Table(name = "fm_web_analysis_data")
public class FumeDailyAnalysis {
    /**
     * è®¾å¤‡ç¼–号
     */
    @Column(name = "fume_dev_id")
    private String fumeDevId;
    @Column(name = "fume_date")
    private Date fumeDate;
    /**
     * æŽ’烟浓度,单位mg/m^3
     */
    @Column(name = "fume_day_min")
    private Double fumeDayMin;
    /**
     * æŽ’烟浓度,单位mg/m^3
     */
    @Column(name = "fume_day_max")
    private Double fumeDayMax;
    @Column(name = "fume_day_average")
    private Double fumeDayAverage;
    @Column(name = "purifier_open_rate")
    private String purifierOpenRate;
    @Column(name = "fume_minute_exceeding_num")
    private BigDecimal fumeMinuteExceedingNum;
    @Column(name = "fume_over_standard_rate")
    private String fumeOverStandardRate;
    @Column(name = "fume_data_efficiency")
    private String fumeDataEfficiency;
    @Column(name = "daily_online_rate")
    private String dailyOnlineRate;
    @Column(name = "noon_online_rate")
    private String noonOnlineRate;
    @Column(name = "night_online_rate")
    private String nightOnlineRate;
    @Column(name = "key_online_rate")
    private String keyOnlineRate;
    @Column(name = "noon__valid_rate")
    private String noonValidRate;
    @Column(name = "night__valid_rate")
    private String nightValidRate;
    @Column(name = "key_valid_rate")
    private String keyValidRate;
    @Column(name = "noon_opening_count")
    private String noonOpeningCount;
    @Column(name = "night_opening_count")
    private String nightOpeningCount;
    @Column(name = "key_opening_rate")
    private String keyOpeningRate;
    @Column(name = "noon_exceeding_num")
    private String noonExceedingNum;
    @Column(name = "night_exceeding_num")
    private String nightExceedingNum;
    @Column(name = "key_exceeding_rate")
    private String keyExceedingRate;
    /**
     * èŽ·å–è®¾å¤‡ç¼–å·
     *
     * @return fume_dev_id - è®¾å¤‡ç¼–号
     */
    public String getFumeDevId() {
        return fumeDevId;
    }
    /**
     * è®¾ç½®è®¾å¤‡ç¼–号
     *
     * @param fumeDevId è®¾å¤‡ç¼–号
     */
    public void setFumeDevId(String fumeDevId) {
        this.fumeDevId = fumeDevId == null ? null : fumeDevId.trim();
    }
    /**
     * @return fume_date
     */
    public Date getFumeDate() {
        return fumeDate;
    }
    /**
     * @param fumeDate
     */
    public void setFumeDate(Date fumeDate) {
        this.fumeDate = fumeDate;
    }
    /**
     * èŽ·å–æŽ’çƒŸæµ“åº¦ï¼Œå•ä½mg/m^3
     *
     * @return fume_day_min - æŽ’烟浓度,单位mg/m^3
     */
    public Double getFumeDayMin() {
        return fumeDayMin;
    }
    /**
     * è®¾ç½®æŽ’烟浓度,单位mg/m^3
     *
     * @param fumeDayMin æŽ’烟浓度,单位mg/m^3
     */
    public void setFumeDayMin(Double fumeDayMin) {
        this.fumeDayMin = fumeDayMin;
    }
    /**
     * èŽ·å–æŽ’çƒŸæµ“åº¦ï¼Œå•ä½mg/m^3
     *
     * @return fume_day_max - æŽ’烟浓度,单位mg/m^3
     */
    public Double getFumeDayMax() {
        return fumeDayMax;
    }
    /**
     * è®¾ç½®æŽ’烟浓度,单位mg/m^3
     *
     * @param fumeDayMax æŽ’烟浓度,单位mg/m^3
     */
    public void setFumeDayMax(Double fumeDayMax) {
        this.fumeDayMax = fumeDayMax;
    }
    /**
     * @return fume_day_average
     */
    public Double getFumeDayAverage() {
        return fumeDayAverage;
    }
    /**
     * @param fumeDayAverage
     */
    public void setFumeDayAverage(Double fumeDayAverage) {
        this.fumeDayAverage = fumeDayAverage;
    }
    /**
     * @return purifier_open_rate
     */
    public String getPurifierOpenRate() {
        return purifierOpenRate;
    }
    /**
     * @param purifierOpenRate
     */
    public void setPurifierOpenRate(String purifierOpenRate) {
        this.purifierOpenRate = purifierOpenRate == null ? null : purifierOpenRate.trim();
    }
    /**
     * @return fume_minute_exceeding_num
     */
    public BigDecimal getFumeMinuteExceedingNum() {
        return fumeMinuteExceedingNum;
    }
    /**
     * @param fumeMinuteExceedingNum
     */
    public void setFumeMinuteExceedingNum(BigDecimal fumeMinuteExceedingNum) {
        this.fumeMinuteExceedingNum = fumeMinuteExceedingNum;
    }
    /**
     * @return fume_over_standard_rate
     */
    public String getFumeOverStandardRate() {
        return fumeOverStandardRate;
    }
    /**
     * @param fumeOverStandardRate
     */
    public void setFumeOverStandardRate(String fumeOverStandardRate) {
        this.fumeOverStandardRate = fumeOverStandardRate == null ? null : fumeOverStandardRate.trim();
    }
    /**
     * @return fume_data_efficiency
     */
    public String getFumeDataEfficiency() {
        return fumeDataEfficiency;
    }
    /**
     * @param fumeDataEfficiency
     */
    public void setFumeDataEfficiency(String fumeDataEfficiency) {
        this.fumeDataEfficiency = fumeDataEfficiency == null ? null : fumeDataEfficiency.trim();
    }
    /**
     * @return daily_online_rate
     */
    public String getDailyOnlineRate() {
        return dailyOnlineRate;
    }
    /**
     * @param dailyOnlineRate
     */
    public void setDailyOnlineRate(String dailyOnlineRate) {
        this.dailyOnlineRate = dailyOnlineRate == null ? null : dailyOnlineRate.trim();
    }
    /**
     * @return noon_online_rate
     */
    public String getNoonOnlineRate() {
        return noonOnlineRate;
    }
    /**
     * @param noonOnlineRate
     */
    public void setNoonOnlineRate(String noonOnlineRate) {
        this.noonOnlineRate = noonOnlineRate == null ? null : noonOnlineRate.trim();
    }
    /**
     * @return night_online_rate
     */
    public String getNightOnlineRate() {
        return nightOnlineRate;
    }
    /**
     * @param nightOnlineRate
     */
    public void setNightOnlineRate(String nightOnlineRate) {
        this.nightOnlineRate = nightOnlineRate == null ? null : nightOnlineRate.trim();
    }
    /**
     * @return key_online_rate
     */
    public String getKeyOnlineRate() {
        return keyOnlineRate;
    }
    /**
     * @param keyOnlineRate
     */
    public void setKeyOnlineRate(String keyOnlineRate) {
        this.keyOnlineRate = keyOnlineRate == null ? null : keyOnlineRate.trim();
    }
    /**
     * @return noon__valid_rate
     */
    public String getNoonValidRate() {
        return noonValidRate;
    }
    /**
     * @param noonValidRate
     */
    public void setNoonValidRate(String noonValidRate) {
        this.noonValidRate = noonValidRate == null ? null : noonValidRate.trim();
    }
    /**
     * @return night__valid_rate
     */
    public String getNightValidRate() {
        return nightValidRate;
    }
    /**
     * @param nightValidRate
     */
    public void setNightValidRate(String nightValidRate) {
        this.nightValidRate = nightValidRate == null ? null : nightValidRate.trim();
    }
    /**
     * @return key_valid_rate
     */
    public String getKeyValidRate() {
        return keyValidRate;
    }
    /**
     * @param keyValidRate
     */
    public void setKeyValidRate(String keyValidRate) {
        this.keyValidRate = keyValidRate == null ? null : keyValidRate.trim();
    }
    /**
     * @return noon_opening_count
     */
    public String getNoonOpeningCount() {
        return noonOpeningCount;
    }
    /**
     * @param noonOpeningCount
     */
    public void setNoonOpeningCount(String noonOpeningCount) {
        this.noonOpeningCount = noonOpeningCount == null ? null : noonOpeningCount.trim();
    }
    /**
     * @return night_opening_count
     */
    public String getNightOpeningCount() {
        return nightOpeningCount;
    }
    /**
     * @param nightOpeningCount
     */
    public void setNightOpeningCount(String nightOpeningCount) {
        this.nightOpeningCount = nightOpeningCount == null ? null : nightOpeningCount.trim();
    }
    /**
     * @return key_opening_rate
     */
    public String getKeyOpeningRate() {
        return keyOpeningRate;
    }
    /**
     * @param keyOpeningRate
     */
    public void setKeyOpeningRate(String keyOpeningRate) {
        this.keyOpeningRate = keyOpeningRate == null ? null : keyOpeningRate.trim();
    }
    /**
     * @return noon_exceeding_num
     */
    public String getNoonExceedingNum() {
        return noonExceedingNum;
    }
    /**
     * @param noonExceedingNum
     */
    public void setNoonExceedingNum(String noonExceedingNum) {
        this.noonExceedingNum = noonExceedingNum == null ? null : noonExceedingNum.trim();
    }
    /**
     * @return night_exceeding_num
     */
    public String getNightExceedingNum() {
        return nightExceedingNum;
    }
    /**
     * @param nightExceedingNum
     */
    public void setNightExceedingNum(String nightExceedingNum) {
        this.nightExceedingNum = nightExceedingNum == null ? null : nightExceedingNum.trim();
    }
    /**
     * @return key_exceeding_rate
     */
    public String getKeyExceedingRate() {
        return keyExceedingRate;
    }
    /**
     * @param keyExceedingRate
     */
    public void setKeyExceedingRate(String keyExceedingRate) {
        this.keyExceedingRate = keyExceedingRate == null ? null : keyExceedingRate.trim();
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/mapper/FumeDailyAnalysisMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds3.mapper
import cn.flightfeather.supervision.domain.ds3.entity.FumeDailyAnalysis
import cn.flightfeather.supervision.domain.util.MyMapper
import org.apache.ibatis.annotations.Mapper
@Mapper
interface FumeDailyAnalysisMapper : MyMapper<FumeDailyAnalysis?>
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt
@@ -39,4 +39,6 @@
    fun getSceneDetail(sceneId: String):BaseResponse<SceneDetail>
    fun updateSceneDetail(typeId: Int, sceneDetailStr: SceneDetailStr): BaseResponse<String>
    fun searchScene(areaVo: AreaVo, page: Int?, perPage: Int?): BaseResponse<List<Scense>>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt
@@ -3,7 +3,7 @@
import cn.flightfeather.supervision.domain.ds1.entity.Userinfo
interface UserinfoService {
    fun findOne(id: String): Userinfo
    fun findOne(id: String): Userinfo?
    fun findAll(): MutableList<Userinfo>
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt
@@ -182,12 +182,12 @@
        }
        //根据子任务id获取单项考核评估
        val itemevaluation = itemevaluationService.findBySubTaskID(subTaskID)
        if (!itemevaluation.isEmpty()) {
            inspectionVo.itemevaluationList = itemevaluation
        } else {
            inspectionVo.itemevaluationList = mutableListOf()
        }
//        val itemevaluation = itemevaluationService.findBySubTaskID(subTaskID)
//        if (!itemevaluation.isEmpty()) {
//            inspectionVo.itemevaluationList = itemevaluation
//        } else {
//            inspectionVo.itemevaluationList = mutableListOf()
//        }
        //返回
        return inspectionVo
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt
@@ -300,60 +300,88 @@
            }
        }
        var r = 0
        var isUpdate = true
        when (typeId.toString()) {
            Constant.ScenseType.TYPE1.value -> {
                val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneConstructionSite::class.java)
                if (subScene.getsGuid() != null) {
                    val record =sceneConstructionSiteMapper.selectByPrimaryKey(subScene.getsGuid())
                    isUpdate = record != null
                    r = if (record == null) {
                        sceneConstructionSiteMapper.insert(subScene)
                    } else {
                        sceneConstructionSiteMapper.updateByPrimaryKeySelective(subScene)
        if (sceneDetailStr.subScene != null) {
            var r = 0
            var isUpdate = true
            when (typeId.toString()) {
                Constant.ScenseType.TYPE1.value -> {
                    val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneConstructionSite::class.java)
                    if (subScene.getsGuid() != null) {
                        val record = sceneConstructionSiteMapper.selectByPrimaryKey(subScene.getsGuid())
                        isUpdate = record != null
                        r = if (record == null) {
                            sceneConstructionSiteMapper.insert(subScene)
                        } else {
                            sceneConstructionSiteMapper.updateByPrimaryKeySelective(subScene)
                        }
                    }
                }
                Constant.ScenseType.TYPE2.value -> {
                    val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneWharf::class.java)
                    if (subScene.getsGuid() != null) {
                        val record = sceneWharfMapper.selectByPrimaryKey(subScene.getsGuid())
                        isUpdate = record != null
                        r = if (record == null) {
                            sceneWharfMapper.insert(subScene)
                        } else {
                            sceneWharfMapper.updateByPrimaryKeySelective(subScene)
                        }
                    }
                }
                Constant.ScenseType.TYPE3.value -> {
                    val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneMixingPlant::class.java)
                    if (subScene.getsGuid() != null) {
                        val record = sceneMixingPlantMapper.selectByPrimaryKey(subScene.getsGuid())
                        isUpdate = record != null
                        r = if (record == null) {
                            sceneMixingPlantMapper.insert(subScene)
                        } else {
                            sceneMixingPlantMapper.updateByPrimaryKeySelective(subScene)
                        }
                    }
                }
                Constant.ScenseType.TYPE14.value -> {
                    val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneStorageYard::class.java)
                    if (subScene.getsGuid() != null) {
                        val record = sceneStorageYardMapper.selectByPrimaryKey(subScene.getsGuid())
                        isUpdate = record != null
                        r = if (record == null) {
                            sceneStorageYardMapper.insert(subScene)
                        } else {
                            sceneStorageYardMapper.updateByPrimaryKeySelective(subScene)
                        }
                    }
                }
            }
            Constant.ScenseType.TYPE2.value -> {
                val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneWharf::class.java)
                if (subScene.getsGuid() != null) {
                    val record =sceneWharfMapper.selectByPrimaryKey(subScene.getsGuid())
                    isUpdate = record != null
                    r = if (record == null) {
                        sceneWharfMapper.insert(subScene)
                    } else {
                        sceneWharfMapper.updateByPrimaryKeySelective(subScene)
                    }
                }
            }
            Constant.ScenseType.TYPE3.value -> {
                val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneMixingPlant::class.java)
                if (subScene.getsGuid() != null) {
                    val record =sceneMixingPlantMapper.selectByPrimaryKey(subScene.getsGuid())
                    isUpdate = record != null
                    r = if (record == null) {
                        sceneMixingPlantMapper.insert(subScene)
                    } else {
                        sceneMixingPlantMapper.updateByPrimaryKeySelective(subScene)
                    }
                }
            }
            Constant.ScenseType.TYPE14.value -> {
                val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneStorageYard::class.java)
                if (subScene.getsGuid() != null) {
                    val record =sceneStorageYardMapper.selectByPrimaryKey(subScene.getsGuid())
                    isUpdate = record != null
                    r = if (record == null) {
                        sceneStorageYardMapper.insert(subScene)
                    } else {
                        sceneStorageYardMapper.updateByPrimaryKeySelective(subScene)
                    }
                }
            }
            result.append("场景特有信息${if (isUpdate) "更新" else "新增"}: $r; ")
        }
        result.append("场景特有信息${if (isUpdate) "更新" else "新增"}: $r; ")
        return BaseResponse(true, data = result.toString())
    }
    override fun searchScene(areaVo: AreaVo, page: Int?, perPage: Int?): BaseResponse<List<Scense>> {
        val p = PageHelper.startPage<Scense>(page ?: 1, perPage ?: 30)
        val list = scenseMapper.selectByExample(Example(Scense::class.java).apply {
            createCriteria().apply {
                areaVo.provincecode?.let { andEqualTo("provincecode", it) }
                areaVo.citycode?.let { andEqualTo("citycode", it) }
                areaVo.districtcode?.let { andEqualTo("districtcode", it) }
                areaVo.towncode?.let { andEqualTo("towncode", it) }
                areaVo.scensetypeid?.let { andEqualTo("typeid", it) }
                areaVo.sceneName?.let { andLike("name", "%${it}%") }
            }
            areaVo.online?.let {
                and(createCriteria().apply {
                    if (it) {
                        orNotEqualTo("extension1", "0").orIsNull("extension1")
                    } else {
                        andEqualTo("extension1", "0")
                    }
                })
            }
            orderBy("typeid").orderBy("index")
        })
        return BaseResponse(true, head = DataHead(p.pageNum, p.pages, p.total), data = list)
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
@@ -79,25 +79,6 @@
        )
        val dataSource = DataSource(config, dbMapper)
        val t = when (mode) {
//            //问题与整改跟踪汇总表
//            0 -> ProDetailSummary(dataSource)
//            //分街镇问题整改分析汇总表
//            1 -> ProAnalysisSummary(dataSource)
//
//            //规范性评估详情表
//            2 -> ScoreDetailSummary(dataSource)
//            //分街镇规范性分析表
//            3 -> ScoreAnalysisSummary(dataSource)
//
//            //问题与整改分类统计表
//            4 -> ProTypeDetailSummary(dataSource)
//            //问题与整改分类排名
//            5 -> ProTypeRankSummary(dataSource)
//            //月度主要或典型问题分析表
//            6 -> ProTypeRankMainSummary(dataSource)
//            //工地施工阶段问题分类分析表
//            7 -> ProTypeStatusSummary(dataSource)
            8 -> ReportOne(dataSource)
            9 -> ReportTwo(dataSource)
            10 -> ReportThree(dataSource)
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.service.impl
import cn.flightfeather.supervision.business.storage.JinAnScore
import cn.flightfeather.supervision.business.storage.StAutoScore
import cn.flightfeather.supervision.business.storage.item.*
import cn.flightfeather.supervision.domain.ds1.entity.*
@@ -18,6 +19,7 @@
import tk.mybatis.mapper.entity.Example
import tk.mybatis.mapper.util.StringUtil
import java.util.*
import kotlin.math.ceil
@Service
class SubtaskServiceImpl(
@@ -27,6 +29,7 @@
    private val stScoreItem_1: StScoreItem_1,
    private val whScoreItem_1: WhScoreItem_1,
    private val whScoreItem_2: WhScoreItem_2,
    private val jinAnScore: JinAnScore,
) : SubtaskService {
    val dateUtil = DateUtil()
@@ -486,7 +489,8 @@
//                    autoScore.calculateScore()
//                }
                val s = scenseMapper.selectByPrimaryKey(subtask.scenseid)
                val autoScore = StAutoScore(scoreItem1, scoreItem2, mpScoreItem_1, mpScoreItem_2, stScoreItem_1, whScoreItem_1, whScoreItem_2)
                val autoScore = StAutoScore(scoreItem1, scoreItem2, mpScoreItem_1, mpScoreItem_2, stScoreItem_1,
                    whScoreItem_1, whScoreItem_2, jinAnScore)
                autoScore.sceneType = Constant.ScenseType.getByValue(s.typeid?.toString())
                autoScore.sceneGrade(subtask)
            }
@@ -542,7 +546,7 @@
            }
        }
        val tempResult = BaseSearchResultVo()
        val result = BaseSearchResultVo()
        val _sceneType = sceneType ?: 1
        val _districtCode = "310106"
@@ -570,97 +574,126 @@
            }
        }
        val example = Example(Subtask::class.java).apply {
            createCriteria().andEqualTo("districtcode", _districtCode)
                    .andGreaterThanOrEqualTo("planstarttime", _startTime)
                    .andLessThanOrEqualTo("planendtime", _endTime)
        }
        var counts = 0
//        val offset = (perPage ?: 30).times((page ?: 1).minus(1))
//        PageHelper.offsetPage<Subtask>(offset, 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
        val subtaskMap = mutableMapOf<String?, SubtaskSearchResultVo>()
        val problemMap = mutableMapOf<String?, ProblemDetail>()
//        val  p = PageHelper.startPage<Subtask>(page ?: 1, perPage ?: 30)
        subtaskMapper.getSubtask2(null, null, _districtCode, _sceneType.toByte(), _startTime, _endTime).forEach {
            if (!subtaskMap.containsKey(it.subTaskId)) {
                val vo =SubtaskSearchResultVo()
                BeanUtils.copyProperties(it, vo)
                subtaskMap[it.subTaskId] = vo
            }
            if (!problemMap.containsKey(it.problemId)) {
                val problemDetail = ProblemDetail()
                BeanUtils.copyProperties(it, problemDetail)
                problemMap[it.problemId] = problemDetail
                subtaskMap[it.subTaskId]?.problemList?.add(problemDetail)
            }
            val url = it.mExtension1 + it.mGuid+ ".jpg"
            if (it.isChanged == true) {
                problemMap[it.problemId]?.rectificationPics?.add(url)
            } else {
                counts++
            }
            val subtaskSearchResultVo = SubtaskSearchResultVo().apply {
                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.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)
                    }
                }
                problemMap[it.problemId]?.problemPics?.add(url)
            }
        }
        val totalPage = Math.ceil(counts.toDouble() / (perPage ?: 30).toDouble()).toInt()
        val result = BaseSearchResultVo()
        val totalPage = ceil(subtaskMap.size.toDouble() / (perPage ?: 30).toDouble()).toInt()
        result.head = DataHead().apply {
            this.page = page ?: 1
            this.totalPage = totalPage
            this.totalCount = subtaskMap.size.toLong()
        }
        val firstIndex = 0 + ((page ?: 1) - 1).times(perPage ?: 30)
        val lastIndex = firstIndex + (perPage ?: 30) - 1
        for (i in firstIndex until tempResult.data.size) {
            if (i > lastIndex) {
                break
        var count = 0
        val startIndex = ((page ?: 1) - 1) * (perPage ?: 30)
        val endIndex = startIndex + (perPage ?: 30) - 1
        with(subtaskMap) exit@{
            subtaskMap.forEach {
                if (count in startIndex..endIndex) {
                    result.data.add(it.value)
                }
                count++
                if (count > endIndex) return@exit
            }
            result.data.add(tempResult.data[i])
        }
//        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
    }
@@ -768,6 +801,7 @@
            result.head = DataHead().apply {
                this.page = p.pageNum
                this.totalPage = p.pages
                this.totalCount = p.total
            }
            subtasklist.forEach {
@@ -781,6 +815,7 @@
            }
            val subtaskMap = mutableMapOf<String?, SubtaskSearchResultVo>()
            val problemMap = mutableMapOf<String?, ProblemDetail>()
//            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()
@@ -803,6 +838,7 @@
            result.head = DataHead().apply {
                this.page = 1
                this.totalPage = 1
                this.totalCount = subtaskMap.size.toLong()
            }
            subtaskMap.forEach {
                result.data.add(it.value)
@@ -921,6 +957,7 @@
            result.head = DataHead().apply {
                this.page = p.pageNum
                this.totalPage = p.pages
                this.totalCount = p.total
            }
            subtasklist.forEach {
@@ -934,6 +971,7 @@
            }
            val subtaskMap = mutableMapOf<String?, SubtaskSearchResultVo>()
            val problemMap = mutableMapOf<String?, ProblemDetail>()
//            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()
@@ -956,6 +994,7 @@
            result.head = DataHead().apply {
                this.page = 1
                this.totalPage = 1
                this.totalCount = subtaskMap.size.toLong()
            }
            subtaskMap.forEach {
                result.data.add(it.value)
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
@@ -222,7 +222,7 @@
//        example.or(
                example.createCriteria().andIsNull("tsguid")
                        .andEqualTo("districtcode", districtCode)
                        .andLessThan("starttime", date)
                        .andLessThanOrEqualTo("starttime", date)
                        .andGreaterThanOrEqualTo("endtime", date)
//        )
        example.orderBy("starttime").desc()
@@ -506,7 +506,7 @@
        val criteria = example.createCriteria()
        //获取用户信息
        val userInfo = userinfoMapper.findOne(guid)
        val districtCode = userInfo.dGuid
        val districtCode = userInfo?.dGuid
        //添加日期过滤
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt
@@ -38,7 +38,7 @@
        return result
    }
    override fun findOne(id: String): Userinfo = userinfoMapper.selectByPrimaryKey(id)
    override fun findOne(id: String): Userinfo? = userinfoMapper.selectByPrimaryKey(id)
    override fun findAll(): MutableList<Userinfo> = userinfoMapper.selectAll()
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AreaVo.kt
@@ -25,9 +25,14 @@
    var endtime: String? = null
    var sceneName: String? = null
    var scensetypeid: String? = null
    var notstandardnum: Int = 0
    var allsensenum: Int = 0
    //是否上线
    var online: Boolean? = null
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt
@@ -14,7 +14,8 @@
data class DataHead(
    var page: Int = 1,
    var totalPage: Int = 1
    var totalPage: Int = 1,
    var totalCount:Long = 0
)
open class DataContent{
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.entity.Task
import cn.flightfeather.supervision.lightshare.service.ScenseService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.BaseResponse
import cn.flightfeather.supervision.lightshare.vo.SceneDetailStr
import io.swagger.annotations.Api
@@ -73,4 +74,11 @@
            @RequestBody sceneDetailStr: SceneDetailStr
    ) = scenseService.updateSceneDetail(typeId, sceneDetailStr)
    @PostMapping("/find")
    fun searchScene(
        @RequestBody areaVo: AreaVo,
        @RequestParam("page", required = false) page: Int?,
        @RequestParam("per_page", required = false) perPage: Int?
    ) = scenseService.searchScene(areaVo, page, perPage)
}
src/main/resources/application.yml
@@ -14,19 +14,19 @@
  #    password: cn.FLIGHTFEATHER
      #-远程测试服务器-
#      url: jdbc:mysql://47.100.191.150:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#      username: remoteU1
#      password: eSoF8DnzfGTlhAjE
      url: jdbc:mysql://47.100.191.150:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: remoteU1
      password: eSoF8DnzfGTlhAjE
      #-发布服务器-
      url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: supervision
      password: supervision_feiyu2021
#      url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#      username: supervision
#      password: supervision_feiyu2021
      #-环境督察测试服务器-
  #    url: jdbc:mysql://192.168.0.200:3306/supervision_ii?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
  #    username: root
  #    password: cn.FLIGHTFEATHER
#      url: jdbc:mysql://192.168.0.200:3306/supervision_ii?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#      username: root
#      password: cn.FLIGHTFEATHER
      initialSize: 5
      minIdle: 5
@@ -45,15 +45,6 @@
    ds2:
      type: com.alibaba.druid.pool.DruidDataSource
      driver-class-name: com.mysql.jdbc.Driver
      #-Test-
      #    url: jdbc:mysql://192.168.0.200:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      #    username: root
      #    password: cn.FLIGHTFEATHER
      #    url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      #    username: root
      #    password: 123456
      #-TestEnd-
      #-发布服务器-
#      url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
@@ -80,6 +71,15 @@
      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
      useGlobalDataSourceStat: true
    ds3:
      type: com.alibaba.druid.pool.DruidDataSource
      driver-class-name: com.mysql.jdbc.Driver
      #   è¿œç¨‹æœåС噍
      url: jdbc:mysql://114.215.109.124:3306/fume?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
      username: fumeRemote
      password: feiyu2023
#thymeleaf设置不缓存
  thymeleaf:
    cache: false
src/main/resources/generator/generatorConfig4ds1.xml
@@ -4,7 +4,8 @@
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
    <!-- æ•°æ®åº“驱动:选择你的本地硬盘上面的数据库驱动包-->
    <classPathEntry  location="C:\Users\feiyu\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>
<!--    <classPathEntry  location="C:\Users\feiyu\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>-->
    <classPathEntry  location="C:\Users\feiyu02\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>
    <context id="DB2Tables"  targetRuntime="MyBatis3" defaultModelType="flat">
        <!-- TKmybatis配置 -->
        <property name="javaFileEncoding" value="UTF-8"/>
src/main/resources/generator/generatorConfig4ds3.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
<!--<?xml version="1.0" encoding="UTF-8"?>-->
<!DOCTYPE generatorConfiguration
        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
    <!-- æ•°æ®åº“驱动:选择你的本地硬盘上面的数据库驱动包-->
<!--    <classPathEntry  location="C:\Users\feiyu\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>-->
    <classPathEntry  location="C:\Users\feiyu02\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>
    <context id="DB2Tables"  targetRuntime="MyBatis3" defaultModelType="flat">
        <!-- TKmybatis配置 -->
        <property name="javaFileEncoding" value="UTF-8"/>
        <property name="beginningDelimiter" value="`"/>
        <property name="endingDelimiter" value="`"/>
        <plugin type="${mapper.plugin}">
          <property name="mappers" value="${mapper.Mapper}"/>
        </plugin>
        <commentGenerator>
            <property name="suppressDate" value="true"/>
            <!-- æ˜¯å¦åŽ»é™¤è‡ªåŠ¨ç”Ÿæˆçš„æ³¨é‡Š true:是 ï¼š false:否 -->
            <property name="suppressAllComments" value="true"/>
        </commentGenerator>
        <!--数据库链接URL,用户名、密码 -->
        <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://114.215.109.124:3306/fume?serverTimezone=Asia/Shanghai"
                        userId="fumeRemote"
                        password="feiyu2023">
        </jdbcConnection>
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false"/>
        </javaTypeResolver>
        <!-- ç”Ÿæˆæ¨¡åž‹çš„包名和位置-->
        <javaModelGenerator targetPackage="cn.flightfeather.supervision.domain.ds3.entity"
                            targetProject="src/main/kotlin">
            <property name="enableSubPackages" value="true"/>
            <property name="trimStrings" value="true"/>
        </javaModelGenerator>
        <!-- ç”Ÿæˆæ˜ å°„文件的包名和位置-->
        <sqlMapGenerator targetPackage="ds3" targetProject="src/main/resources/mapper">
            <property name="enableSubPackages" value="true"/>
        </sqlMapGenerator>
        <!-- ç”ŸæˆDAO的包名和位置-->
        <javaClientGenerator type="XMLMAPPER" targetPackage="cn.flightfeather.supervision.domain.ds3.mapper"
                             targetProject="src/main/kotlin">
            <property name="enableSubPackages" value="true"/>
        </javaClientGenerator>
        <!-- è¦ç”Ÿæˆçš„表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
        <table tableName="fm_web_analysis_data" domainObjectName="FumeDailyAnalysis" enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false"/>
    </context>
</generatorConfiguration>
src/main/resources/mapper/ds1/DustDataResultMapper.xml
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DustDataResult" >
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper">
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DustDataResult">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="DR_Id" property="drId" jdbcType="INTEGER" />
    <result column="DR_Scene_Id" property="drSceneId" jdbcType="VARCHAR" />
    <result column="DR_Scene_Name" property="drSceneName" jdbcType="VARCHAR" />
    <result column="DR_Time" property="drTime" jdbcType="DATE" />
    <result column="DR_Exceed_Times" property="drExceedTimes" jdbcType="INTEGER" />
    <result column="DR_Avg" property="drAvg" jdbcType="DOUBLE" />
    <result column="DR_Max" property="drMax" jdbcType="DOUBLE" />
    <result column="DR_Min" property="drMin" jdbcType="DOUBLE" />
    <result column="DR_Over_Avg_Per" property="drOverAvgPer" jdbcType="DOUBLE" />
    <result column="DR_Data_Num" property="drDataNum" jdbcType="INTEGER" />
    <result column="DR_Effective_Rate" property="drEffectiveRate" jdbcType="DOUBLE" />
    <id column="DR_Id" jdbcType="INTEGER" property="drId" />
    <result column="DR_Scene_Id" jdbcType="VARCHAR" property="drSceneId" />
    <result column="DR_Scene_Name" jdbcType="VARCHAR" property="drSceneName" />
    <result column="DR_Time" jdbcType="DATE" property="drTime" />
    <result column="DR_Exceed_Times" jdbcType="INTEGER" property="drExceedTimes" />
    <result column="DR_Avg" jdbcType="DOUBLE" property="drAvg" />
    <result column="DR_Max" jdbcType="DOUBLE" property="drMax" />
    <result column="DR_Min" jdbcType="DOUBLE" property="drMin" />
    <result column="DR_Over_Avg_Per" jdbcType="DOUBLE" property="drOverAvgPer" />
    <result column="DR_Data_Num" jdbcType="INTEGER" property="drDataNum" />
    <result column="DR_Effective_Rate" jdbcType="DOUBLE" property="drEffectiveRate" />
  </resultMap>
  <sql id="Base_Column_List" >
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
src/main/resources/mapper/ds1/SubtaskMapper.xml
@@ -240,10 +240,10 @@
        LEFT JOIN sm_t_problemtype AS f ON d.PT_GUID = f.PT_GUID
        RIGHT JOIN im_t_mediafile AS e ON d.PL_GUID = e.MF_BusinessGUID
        WHERE
        a.ST_DistrictCode = #{param3}
        <if test="param1 != null">
          ((d.PL_ChangedTime is not null and d.PL_ChangedTime > #{param1}) OR d.PL_Time > #{param2})
            AND ((d.PL_ChangedTime is not null and d.PL_ChangedTime > #{param1}) OR d.PL_Time > #{param2})
        </if>
        AND a.ST_DistrictCode = #{param3}
        <if test="param4 != null">
            AND b.S_TypeID = #{param4}
        </if>
src/main/resources/mapper/ds2/DustSiteInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.DustSiteInfoMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.DustSiteInfo" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="address" property="address" jdbcType="VARCHAR" />
    <result column="begin_date" property="beginDate" jdbcType="TIMESTAMP" />
    <result column="build_area" property="buildArea" jdbcType="VARCHAR" />
    <result column="data_time" property="dataTime" jdbcType="TIMESTAMP" />
    <result column="clean_measure" property="cleanMeasure" jdbcType="VARCHAR" />
    <result column="code" property="code" jdbcType="VARCHAR" />
    <result column="construction_unit" property="constructionUnit" jdbcType="VARCHAR" />
    <result column="control_level" property="controlLevel" jdbcType="VARCHAR" />
    <result column="developers" property="developers" jdbcType="VARCHAR" />
    <result column="do_time" property="doTime" jdbcType="TIMESTAMP" />
    <result column="duty_company" property="dutyCompany" jdbcType="VARCHAR" />
    <result column="duty_company_id" property="dutyCompanyId" jdbcType="VARCHAR" />
    <result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
    <result column="engineering_stage" property="engineeringStage" jdbcType="VARCHAR" />
    <result column="engineering_stage_code" property="engineeringStageCode" jdbcType="VARCHAR" />
    <result column="equipment_code" property="equipmentCode" jdbcType="VARCHAR" />
    <result column="floor_area" property="floorArea" jdbcType="VARCHAR" />
    <result column="group_id" property="groupId" jdbcType="VARCHAR" />
    <result column="group_name" property="groupName" jdbcType="VARCHAR" />
    <result column="has_monitor" property="hasMonitor" jdbcType="VARCHAR" />
    <result column="is_online" property="isOnline" jdbcType="VARCHAR" />
    <result column="is_trouble" property="isTrouble" jdbcType="VARCHAR" />
    <result column="jhpt_delete" property="jhptDelete" jdbcType="VARCHAR" />
    <result column="jhpt_update_time" property="jhptUpdateTime" jdbcType="VARCHAR" />
    <result column="kindex" property="kindex" jdbcType="VARCHAR" />
    <result column="latitude" property="latitude" jdbcType="VARCHAR" />
    <result column="linkman" property="linkman" jdbcType="VARCHAR" />
    <result column="longitude" property="longitude" jdbcType="VARCHAR" />
    <result column="mn_code" property="mnCode" jdbcType="VARCHAR" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="noise_region" property="noiseRegion" jdbcType="VARCHAR" />
    <result column="phone" property="phone" jdbcType="VARCHAR" />
    <result column="province" property="province" jdbcType="VARCHAR" />
    <result column="responsible" property="responsible" jdbcType="VARCHAR" />
    <result column="ring_id" property="ringId" jdbcType="VARCHAR" />
    <result column="stage_begin_date" property="stageBeginDate" jdbcType="TIMESTAMP" />
    <result column="stop_time" property="stopTime" jdbcType="TIMESTAMP" />
    <result column="tsp" property="tsp" jdbcType="DOUBLE" />
    <result column="type_id" property="typeId" jdbcType="VARCHAR" />
    <result column="typename" property="typename" jdbcType="VARCHAR" />
    <result column="union_type_id" property="unionTypeId" jdbcType="VARCHAR" />
    <result column="wall_height" property="wallHeight" jdbcType="VARCHAR" />
    <result column="ywsj_date" property="ywsjDate" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, address, begin_date, build_area, data_time, clean_measure, code, construction_unit,
    control_level, developers, do_time, duty_company, duty_company_id, end_date, engineering_stage,
    engineering_stage_code, equipment_code, floor_area, group_id, group_name, has_monitor,
    is_online, is_trouble, jhpt_delete, jhpt_update_time, kindex, latitude, linkman,
    longitude, mn_code, name, noise_region, phone, province, responsible, ring_id, stage_begin_date,
    stop_time, tsp, type_id, typename, union_type_id, wall_height, ywsj_date
  </sql>
</mapper>
src/main/resources/mapper/ds2/DustSiteMapMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.DustSiteMapMapper">
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="Id" jdbcType="INTEGER" property="id" />
    <result column="TZ_User_Id" jdbcType="VARCHAR" property="tzUserId" />
    <result column="TZ_User_Name" jdbcType="VARCHAR" property="tzUserName" />
    <result column="JA_MN_Code" jdbcType="VARCHAR" property="jaMnCode" />
    <result column="JA_Scene_Name" jdbcType="VARCHAR" property="jaSceneName" />
    <result column="SV_User_Id" jdbcType="VARCHAR" property="svUserId" />
    <result column="SV_User_name" jdbcType="VARCHAR" property="svUserName" />
    <result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    Id, TZ_User_Id, TZ_User_Name, JA_MN_Code, JA_Scene_Name, SV_User_Id, SV_User_name,
    Create_Time
  </sql>
</mapper>
src/main/resources/mapper/ds2/HourDustDataMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.HourDustDataMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.HourDustData" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="dustvalue" property="dustvalue" jdbcType="DOUBLE" />
    <result column="flag" property="flag" jdbcType="VARCHAR" />
    <result column="grade" property="grade" jdbcType="VARCHAR" />
    <result column="groupname" property="groupname" jdbcType="VARCHAR" />
    <result column="inserttime" property="inserttime" jdbcType="TIMESTAMP" />
    <result column="lst" property="lst" jdbcType="TIMESTAMP" />
    <result column="lst_end" property="lstEnd" jdbcType="TIMESTAMP" />
    <result column="mncode" property="mncode" jdbcType="VARCHAR" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="noisevalue" property="noisevalue" jdbcType="VARCHAR" />
    <result column="projectid" property="projectid" jdbcType="VARCHAR" />
    <result column="projecttypeid" property="projecttypeid" jdbcType="VARCHAR" />
    <result column="quality" property="quality" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, dustvalue, flag, grade, groupname, inserttime, lst, lst_end, mncode, name, noisevalue,
    projectid, projecttypeid, quality
  </sql>
</mapper>
src/main/resources/mapper/ds2/LampDeviceDataMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.LampDeviceDataMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.LampDeviceData" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="channel_num" property="channelNum" jdbcType="VARCHAR" />
    <result column="clean_liness" property="cleanLiness" jdbcType="VARCHAR" />
    <result column="device_code" property="deviceCode" jdbcType="VARCHAR" />
    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
    <result column="device_state" property="deviceState" jdbcType="VARCHAR" />
    <result column="enter_id" property="enterId" jdbcType="VARCHAR" />
    <result column="fan_state" property="fanState" jdbcType="VARCHAR" />
    <result column="lampblack_value" property="lampblackValue" jdbcType="DOUBLE" />
    <result column="monitor_time" property="monitorTime" jdbcType="TIMESTAMP" />
    <result column="production_date" property="productionDate" jdbcType="TIMESTAMP" />
    <result column="purifier_state" property="purifierState" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, channel_num, clean_liness, device_code, device_name, device_state, enter_id,
    fan_state, lampblack_value, monitor_time, production_date, purifier_state
  </sql>
</mapper>
src/main/resources/mapper/ds2/LampEnterBaseInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.LampEnterBaseInfoMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.LampEnterBaseInfo" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="enter_id" property="enterId" jdbcType="VARCHAR" />
    <result column="enter_name" property="enterName" jdbcType="VARCHAR" />
    <result column="address" property="address" jdbcType="VARCHAR" />
    <result column="business_date" property="businessDate" jdbcType="VARCHAR" />
    <result column="datasource" property="datasource" jdbcType="VARCHAR" />
    <result column="jjq_code" property="jjqCode" jdbcType="VARCHAR" />
    <result column="jjq_name" property="jjqName" jdbcType="VARCHAR" />
    <result column="latitude" property="latitude" jdbcType="DOUBLE" />
    <result column="link_man" property="linkMan" jdbcType="VARCHAR" />
    <result column="link_phone" property="linkPhone" jdbcType="VARCHAR" />
    <result column="longitude" property="longitude" jdbcType="DOUBLE" />
    <result column="region_name" property="regionName" jdbcType="VARCHAR" />
    <result column="regist_date" property="registDate" jdbcType="TIMESTAMP" />
    <result column="state" property="state" jdbcType="VARCHAR" />
    <result column="street" property="street" jdbcType="VARCHAR" />
    <result column="outfall_type" property="outfallType" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    enter_id, enter_name, address, business_date, datasource, jjq_code, jjq_name, latitude,
    link_man, link_phone, longitude, region_name, regist_date, state, street
  </sql>
</mapper>
src/main/resources/mapper/ds3/FumeDailyAnalysisMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.ds3.mapper.FumeDailyAnalysisMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds3.entity.FumeDailyAnalysis" >
    <!--
      WARNING - @mbg.generated
    -->
    <result column="fume_dev_id" property="fumeDevId" jdbcType="VARCHAR" />
    <result column="fume_date" property="fumeDate" jdbcType="DATE" />
    <result column="fume_day_min" property="fumeDayMin" jdbcType="DOUBLE" />
    <result column="fume_day_max" property="fumeDayMax" jdbcType="DOUBLE" />
    <result column="fume_day_average" property="fumeDayAverage" jdbcType="DOUBLE" />
    <result column="purifier_open_rate" property="purifierOpenRate" jdbcType="VARCHAR" />
    <result column="fume_minute_exceeding_num" property="fumeMinuteExceedingNum" jdbcType="DECIMAL" />
    <result column="fume_over_standard_rate" property="fumeOverStandardRate" jdbcType="VARCHAR" />
    <result column="fume_data_efficiency" property="fumeDataEfficiency" jdbcType="VARCHAR" />
    <result column="daily_online_rate" property="dailyOnlineRate" jdbcType="VARCHAR" />
    <result column="noon_online_rate" property="noonOnlineRate" jdbcType="VARCHAR" />
    <result column="night_online_rate" property="nightOnlineRate" jdbcType="VARCHAR" />
    <result column="key_online_rate" property="keyOnlineRate" jdbcType="VARCHAR" />
    <result column="noon__valid_rate" property="noonValidRate" jdbcType="VARCHAR" />
    <result column="night__valid_rate" property="nightValidRate" jdbcType="VARCHAR" />
    <result column="key_valid_rate" property="keyValidRate" jdbcType="VARCHAR" />
    <result column="noon_opening_count" property="noonOpeningCount" jdbcType="VARCHAR" />
    <result column="night_opening_count" property="nightOpeningCount" jdbcType="VARCHAR" />
    <result column="key_opening_rate" property="keyOpeningRate" jdbcType="VARCHAR" />
    <result column="noon_exceeding_num" property="noonExceedingNum" jdbcType="VARCHAR" />
    <result column="night_exceeding_num" property="nightExceedingNum" jdbcType="VARCHAR" />
    <result column="key_exceeding_rate" property="keyExceedingRate" jdbcType="VARCHAR" />
  </resultMap>
</mapper>
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
package cn.flightfeather.supervision.business.autooutput
import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation
import cn.flightfeather.supervision.business.autooutput.score.construction.JADataAnalysis
import cn.flightfeather.supervision.lightshare.service.SearchService
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import org.junit.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@SpringBootTest
class AopEvaluationTest {
    @Autowired
    lateinit var aopEvaluation: AopEvaluation
    @Autowired
    lateinit var searchService: SearchService
    @Autowired
    lateinit var jaDataAnalysis: JADataAnalysis
    /**
     * ç»Ÿè®¡ç›‘测数据结果
     */
    @Test
    fun test1() {
        jaDataAnalysis.setResource("VHXHS1dHsykTNUf2", 1, 2023, 8)
        jaDataAnalysis.execute()
    }
    /**
     * è‡ªåŠ¨è¯„ä¼°
     */
    @Test
    fun test() {
        aopEvaluation.setResource("VHXHS1dHsykTNUf2", 1)
        aopEvaluation.execute()
    }
    /**
     * å¯¼å‡ºè‡ªåŠ¨è¯„ä¼°ç»“æžœ
     */
    @Test
    fun test2() {
        val mode = 9
        searchService.writeToFile(ExcelConfigVo(
            "VHXHS1dHsykTNUf2",
            districtCode = "310106",
            sceneType = 1), mode)
    }
}
src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt
@@ -42,13 +42,13 @@
//        val t = s.substring(0, s.length - 2)
//        println(t)
//        autoScore.sceneType = Constant.ScenseType.TYPE1
//        autoScore.topTaskGrade("8QN1VzftuhBJmrF8")
//        val subtask = subtaskMapper.selectByPrimaryKey("OPmza2ddEAKiQHqz")
        autoScore.sceneType = Constant.ScenseType.TYPE1
        autoScore.topTaskGrade("BdSm7KhSYWar3BSp")
//        val subtask = subtaskMapper.selectByPrimaryKey("YoKxHlojS1wIlFoQ")
//        autoScore.sceneGrade(subtask)
//        autoScore.sceneGradeToFile(subtask)
        autoScore3.go(2022, 9, 1)
//        autoScore3.go(2022, 9, 1)
//        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/business/location/LocationRoadNearbyTest.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
package cn.flightfeather.supervision.business.location
import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
import org.junit.Test
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@SpringBootTest
class LocationRoadNearbyTest {
    @Autowired
    lateinit var scenseMapper: ScenseMapper
    @Test
    fun foo1() {
        val locationRoadNearby = LocationRoadNearby(scenseMapper)
//        val b = LocationRoadNearby.BasePlace("", Pair(121.378346, 30.84923), Pair(121.378296, 30.861472))
//        locationRoadNearby.search(b, 1000.0)
        val bList = listOf(
            LocationRoadNearby.BasePlace("干钱路-金石北路-金张公路", Pair(121.218411,30.826654), Pair(121.227142,30.828403)),
            LocationRoadNearby.BasePlace("金廊公路-建乐路-朱吕公路", Pair(121.18409,30.835699), Pair(121.183811,30.831636)),
            LocationRoadNearby.BasePlace("金张公路-田新路-干钱路", Pair(121.219555,30.829319), Pair(121.227142,30.828403)),
            LocationRoadNearby.BasePlace("大茫中心路-朱平公路-朱增路", Pair(121.147448,30.858481), Pair(121.149312,30.857804)),
            LocationRoadNearby.BasePlace("大茫中心路-建富路-朱平公路", Pair(121.141819,30.858344), Pair(121.147448,30.858481)),
            LocationRoadNearby.BasePlace("朱吕公路-金张公路-康兴路", Pair(121.177261,30.83326), Pair(121.18053,30.830751)),
            LocationRoadNearby.BasePlace("朱吕公路-金廊公路-康兴路", Pair(121.183811,30.831636), Pair(121.18053,30.830751)),
            LocationRoadNearby.BasePlace("吕新路-建乐路-朱吕公路", Pair(121.191766,30.835612), Pair(121.196591,30.831604)),
            LocationRoadNearby.BasePlace("溪北路-朱吕公路-新东街", Pair(121.171163,30.832014), Pair(121.174958,30.827349)),
            LocationRoadNearby.BasePlace("东方红中心路-农建路-朱平公路", Pair(121.141617,30.870365), Pair(121.145145,30.870635)),
            LocationRoadNearby.BasePlace("东方红中心路-朱平公路-朱增路", Pair(121.145145,30.870635), Pair(121.155051,30.870966)),
            LocationRoadNearby.BasePlace("朱吕公路-金廊公路-田欢路", Pair(121.183811,30.831636), Pair(121.18989,30.831606)),
            LocationRoadNearby.BasePlace("朱平公路-东富路-大茫中心路", Pair(121.146281,30.864199), Pair(121.147448,30.858481)),
            LocationRoadNearby.BasePlace("朱平公路-东方红中心路-东富路", Pair(121.145404,30.869592), Pair(121.146281,30.864199)),
            LocationRoadNearby.BasePlace("金张公路-金石北路-田新路", Pair(121.215668,30.830838), Pair(121.219555,30.829319)),
            LocationRoadNearby.BasePlace("朱平公路-吕青路-蔷荚路", Pair(121.148479,30.836083), Pair(121.14842,30.842135)),
            LocationRoadNearby.BasePlace("朱泾农建路-建富路-朱平公路", Pair(121.142609,30.863955), Pair(121.146407,30.864167)),
            LocationRoadNearby.BasePlace("朱泾农建路-朱平公路-朱增路", Pair(121.146407,30.864167), Pair(121.153675,30.864075)),
            LocationRoadNearby.BasePlace("吕青路-朱吕公路-朱平公路", Pair(121.136318,30.833325), Pair(121.148624,30.836094)),
            LocationRoadNearby.BasePlace("泖湾支路-吕青路-朱平公路", Pair(121.155048,30.835229), Pair(121.148659,30.829861)),
        )
        locationRoadNearby.searchList(bList, 1000.0)
    }
}
src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
package cn.flightfeather.supervision.datafetch
import cn.flightfeather.supervision.SupervisionApplication
import org.junit.Test
import org.junit.jupiter.api.Assertions.*
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
@RunWith(SpringJUnit4ClassRunner::class)
@SpringBootTest(classes = [SupervisionApplication::class])
class FetchNightConstructionTest {
    @Autowired
    lateinit var fetchNightConstruction: FetchNightConstruction
    @Test
    fun foo1() {
        fetchNightConstruction.fetch()
    }
}
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt
@@ -37,10 +37,10 @@
        val sD = Date.from(localTimeS.atZone(ZoneId.systemDefault()).toInstant())
        val eD = Date.from(localTimeE.atZone(ZoneId.systemDefault()).toInstant())
        val mode = 8
        val mode = 9
        //金山2022å¹´6月
        searchService.writeToFile(ExcelConfigVo(
            "udXAWrrRbM2MvZ5u",
            "0kG5dblu1uPqo8qW",
            districtCode = "310106",
//            townCode = "310116113",
            sceneType = 1), mode)