feiyu02
2025-10-30 9cb8d7e0f4ffca386b14a15f8a0aca4d1db23252
2025.10.30
新增单场景纵向统计接口
已修改11个文件
已删除3个文件
已添加7个文件
已重命名4个文件
548 ■■■■ 文件已修改
pom.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductBase.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductFinal.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductMiddle.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/DataProductRep.kt 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProdBaseService.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProdSingleSceneService.kt 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdSingleSceneServiceImpl.kt 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPChangeInfo.kt 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPProblemRecurrence.kt 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOpt.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOptSingle.kt 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/base/DPEvaluateInfo.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/base/DPInspectionInfo.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/base/DPMonitorDataInfo.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/base/DPSceneInfo.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProdSingleSceneController.kt 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomainitemController.kt 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/generator/generatorConfig4ds1.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DataProductBaseMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DataProductFinalMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DataProductMiddleMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -468,6 +468,7 @@
                        <artifactId>mapper</artifactId>
                        <version>3.3.9</version>
                    </dependency>
                    <!-- 2025.10.17 å¼•入自定义插件, ç”¨äºŽåœ¨ç”Ÿæˆæ•°æ®åº“表模型时,自动添加swagger的@ApiModel注解 -->
                    <dependency>
                        <groupId>cn.flight.feather.devtool</groupId>
                        <artifactId>mybatis-plugin</artifactId>
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductBase.java
@@ -73,6 +73,13 @@
    private Byte dpbSceneTypeId;
    /**
     * æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    @Column(name = "DPB_Version")
    @ApiModelProperty(value = "数据产品版本号,从1开始的自然数,数字越大,版本越新")
    private Integer dpbVersion;
    /**
     * æ•°æ®äº§å“å†…容
     */
    @Column(name = "DPB_Content")
@@ -242,6 +249,24 @@
    }
    /**
     * èŽ·å–æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     *
     * @return DPB_Version - æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    public Integer getDpbVersion() {
        return dpbVersion;
    }
    /**
     * è®¾ç½®æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     *
     * @param dpbVersion æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    public void setDpbVersion(Integer dpbVersion) {
        this.dpbVersion = dpbVersion;
    }
    /**
     * èŽ·å–æ•°æ®äº§å“å†…å®¹
     *
     * @return DPB_Content - æ•°æ®äº§å“å†…容
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductFinal.java
@@ -73,6 +73,13 @@
    private Byte dpfSceneTypeId;
    /**
     * æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    @Column(name = "DPF_Version")
    @ApiModelProperty(value = "数据产品版本号,从1开始的自然数,数字越大,版本越新")
    private Integer dpfVersion;
    /**
     * æ•°æ®äº§å“å†…容
     */
    @Column(name = "DPF_Content")
@@ -242,6 +249,24 @@
    }
    /**
     * èŽ·å–æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     *
     * @return DPF_Version - æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    public Integer getDpfVersion() {
        return dpfVersion;
    }
    /**
     * è®¾ç½®æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     *
     * @param dpfVersion æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    public void setDpfVersion(Integer dpfVersion) {
        this.dpfVersion = dpfVersion;
    }
    /**
     * èŽ·å–æ•°æ®äº§å“å†…å®¹
     *
     * @return DPF_Content - æ•°æ®äº§å“å†…容
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductMiddle.java
@@ -73,6 +73,13 @@
    private Byte dpmSceneTypeId;
    /**
     * æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    @Column(name = "DPM_Version")
    @ApiModelProperty(value = "数据产品版本号,从1开始的自然数,数字越大,版本越新")
    private Integer dpmVersion;
    /**
     * æ•°æ®äº§å“å†…容
     */
    @Column(name = "DPM_Content")
@@ -242,6 +249,24 @@
    }
    /**
     * èŽ·å–æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     *
     * @return DPM_Version - æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    public Integer getDpmVersion() {
        return dpmVersion;
    }
    /**
     * è®¾ç½®æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     *
     * @param dpmVersion æ•°æ®äº§å“ç‰ˆæœ¬å·ï¼Œä»Ž1开始的自然数,数字越大,版本越新
     */
    public void setDpmVersion(Integer dpmVersion) {
        this.dpmVersion = dpmVersion;
    }
    /**
     * èŽ·å–æ•°æ®äº§å“å†…å®¹
     *
     * @return DPM_Content - æ•°æ®äº§å“å†…容
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/DataProductRep.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
package cn.flightfeather.supervision.domain.ds1.repository
import cn.flightfeather.supervision.domain.ds1.mapper.DataProductBaseMapper
import cn.flightfeather.supervision.domain.ds1.mapper.DataProductFinalMapper
import cn.flightfeather.supervision.domain.ds1.mapper.DataProductMiddleMapper
import org.springframework.stereotype.Repository
/**
 * æ•°æ®äº§å“æ•°æ®åº“查询
 * @date 2025/10/17
 * @author feiyu02
 */
@Repository
class DataProductRep(
    private val dataProductBaseMapper: DataProductBaseMapper,
    private val dataProductMiddleMapper: DataProductMiddleMapper,
    private val dataProductFinalMapper: DataProductFinalMapper
) {
    /**
     * æ’入数据产品
     */
    fun insertDataProduct() {
    }
    fun selectDataProduct() {
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProdBaseService.kt
@@ -1,6 +1,10 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.lightshare.vo.dataprod.*
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPEvaluateInfo
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPInspectionInfo
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPMonitorDataInfo
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPSceneInfo
/**
 * åŸºç¡€æ•°æ®äº§å“æœåŠ¡æŽ¥å£
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProdSingleSceneService.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
package cn.flightfeather.supervision.lightshare.service
import cn.flightfeather.supervision.lightshare.vo.dataprod.DPChangeInfo
import cn.flightfeather.supervision.lightshare.vo.dataprod.DPProblemRecurrence
import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOptSingle
/**
 * å•场景纵向数据统计产品服务接口
 * @date 2025/10/30
 * @author feiyu02
 */
interface DataProdSingleSceneService {
    /**
     * æ•´æ”¹æƒ…况
     */
    fun getChangeInfo(option: QueryOptSingle): DPChangeInfo
    /**
     * æ‰¹é‡æŸ¥è¯¢æ•´æ”¹æƒ…况
     */
    fun getChangeInfoList(options: List<QueryOptSingle>): List<DPChangeInfo>
    /**
     * é—®é¢˜é‡å¤æƒ…况
     */
    fun getProblemRecurrence(option: QueryOptSingle): List<DPProblemRecurrence>
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt
@@ -38,9 +38,9 @@
    fun getSceneByToken(token: String, page: Int? = 1, perPage: Int? = 30): BaseResponse<BaseSearchResultVo>
    fun getSceneDetail(sceneId: String):BaseResponse<SceneDetail>
    fun getSceneDetail(sceneId: String):SceneDetail
    fun updateSceneDetail(typeId: Int, sceneDetailStr: SceneDetailStr): BaseResponse<String>
    fun updateSceneDetail(typeId: Int, sceneDetailStr: SceneDetailStr): String
    fun searchScene(areaVo: AreaVo, page: Int?, perPage: Int?): BaseResponse<List<Scense>>
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt
@@ -7,6 +7,10 @@
import cn.flightfeather.supervision.lightshare.service.DataProdBaseService
import cn.flightfeather.supervision.lightshare.vo.ProblemListVo
import cn.flightfeather.supervision.lightshare.vo.dataprod.*
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPEvaluateInfo
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPInspectionInfo
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPMonitorDataInfo
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPSceneInfo
import org.springframework.beans.BeanUtils
import org.springframework.stereotype.Service
import tk.mybatis.mapper.entity.Example
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdSingleSceneServiceImpl.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,110 @@
package cn.flightfeather.supervision.lightshare.service.impl
import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper
import cn.flightfeather.supervision.common.utils.QueryByCache
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import cn.flightfeather.supervision.domain.ds1.entity.Problemtype
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import cn.flightfeather.supervision.lightshare.service.DataProdSingleSceneService
import cn.flightfeather.supervision.lightshare.vo.ProblemListVo
import cn.flightfeather.supervision.lightshare.vo.dataprod.DPChangeInfo
import cn.flightfeather.supervision.lightshare.vo.dataprod.DPProblemRecurrence
import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOptSingle
import cn.flightfeather.supervision.lightshare.vo.dataprod.base.DPInspectionInfo
import org.springframework.beans.BeanUtils
import org.springframework.stereotype.Service
import tk.mybatis.mapper.entity.Example
/**
 * å•场景纵向数据统计产品服务实现类
 * @date 2025/10/30
 * @author feiyu02
 */
@Service
class DataProdSingleSceneServiceImpl(private val aopDbMapper: AopDbMapper) : DataProdSingleSceneService {
    // æ•´æ”¹è¦æ±‚最大耗时(天)
    private val maxChangeTime = 3
    override fun getChangeInfo(option: QueryOptSingle): DPChangeInfo {
        return QueryByCache.queryCache(
            cache = { return@queryCache null },
            calculate = {
                val subtaskList = aopDbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
                    createCriteria().andEqualTo("scenseid", option.sceneId)
                        .andBetween("planstarttime", option.startTime, option.endTime)
                    orderBy("planstarttime").desc()
                })
                if (subtaskList.isEmpty()) return@queryCache DPChangeInfo()
                val problemList = aopDbMapper.problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
                    createCriteria().andIn("stguid", subtaskList.map { it.stguid })
                })
                return@queryCache DPChangeInfo().apply {
                    subTasks = subtaskList
                    problems = problemList.map {problem ->
                        val problemListVo = ProblemListVo()
                        BeanUtils.copyProperties(problem, problemListVo)
                        problemListVo
                    }
                    proCount = problemList.size
                    changeCount = problemList.count { it.ischanged == true }
                    changePer = if (proCount == 0) 0.0 else changeCount.toDouble() / proCount
                    changeTime = problemList
                        .filter { it.ischanged == true }
                        .maxOf { (it.changedtime?.time?:0L) - (it?.time?.time?:0L) }.toInt()
                        .div(1000 * 60 * 60 * 24)
                    val eff = if (changeTime == 0) 1.0 else maxChangeTime.toDouble() / changeTime
                    changeEfficiency = if (eff > 1.0) 1.0 else eff
                }
            }
        )
    }
    override fun getChangeInfoList(options: List<QueryOptSingle>): List<DPChangeInfo> {
        return options.map { getChangeInfo(it) }
    }
    override fun getProblemRecurrence(option: QueryOptSingle): List<DPProblemRecurrence> {
        return QueryByCache.queryCache(
            cache = { return@queryCache null },
            calculate = {
                val problemList = aopDbMapper.problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
                    createCriteria().andEqualTo("scenseid", option.sceneId)
                        .andBetween("planstarttime", option.startTime, option.endTime)
                    orderBy("planstarttime").desc()
                })
                if (problemList.isEmpty()) return@queryCache emptyList()
                val problemTypeList = aopDbMapper.problemtypeMapper.selectByExample(Example(Problemtype::class.java)
                    .apply { createCriteria().andIn("guid", problemList.map { it.ptguid }) })
                val problemMap = problemList
                    .filter {
                        val type = problemTypeList.find { type-> type.guid == it.ptguid }
                        type?.typename != "道路扬尘" || type.description == "工地内多条道路明显泥痕/泥泞/积尘/遗撒"
                    }.groupBy { problem ->
                    val type = problemTypeList.find { type-> type.guid == problem.ptguid } ?: return@groupBy null
                    /**
                     * 2025.10.30 ç›®å‰æ ¹æ®ä¸šåŠ¡è¦æ±‚ï¼Œåœ¨å·¥åœ°ç±»åž‹ä¸­ï¼Œâ€œé“è·¯æ‰¬å°˜â€é—®é¢˜å‡ºçŽ°æ¦‚çŽ‡éžå¸¸é«˜ï¼Œ
                     * å› æ­¤è¯¥é—®é¢˜åœ¨åšé‡å¤æ€§ç»Ÿè®¡æ—¶ï¼Œ åªç»Ÿè®¡ç”¨å…¶å­ç±»åž‹"工地内多条道路明显泥痕/泥泞/积尘/遗撒"为分类类型
                     */
                    if (type.typename == "道路扬尘") {
                        type.description
                    } else {
                        type.typename
                    }
                }
                return@queryCache problemMap.map { (key, value) ->
                    val type = problemTypeList.find { type-> type.guid == value.first().ptguid }
                    DPProblemRecurrence().apply {
                        problemTag = key
                        problemType = type
                        count = value.size
                        changeCount = value.count { it.ischanged == true }
                        changePer = if (count == 0) 0.0 else changeCount.toDouble() / count
                    }
                }
            }
        )
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt
@@ -280,7 +280,7 @@
        return BaseResponse(true, "请求成功", data = result)
    }
    override fun getSceneDetail(sceneId: String): BaseResponse<SceneDetail> {
    override fun getSceneDetail(sceneId: String): SceneDetail {
        val sceneDetail = SceneDetail()
        val scene = sceneRep.findScene(sceneId = sceneId)
@@ -302,10 +302,10 @@
        val sceneDevice = sceneDeviceMapper.selectByPrimaryKey(sceneId)
        sceneDetail.sceneDevice = sceneDevice
        return BaseResponse(true, data = sceneDetail)
        return sceneDetail
    }
    override fun updateSceneDetail(typeId: Int, sceneDetailStr: SceneDetailStr): BaseResponse<String> {
    override fun updateSceneDetail(typeId: Int, sceneDetailStr: SceneDetailStr): String {
        val result = StringBuilder()
        if (sceneDetailStr.scense?.guid != null) {
@@ -380,7 +380,7 @@
            result.append("场景特有信息${if (isUpdate) "更新" else "新增"}: $r; ")
        }
        return BaseResponse(true, data = result.toString())
        return result.toString()
    }
    override fun searchScene(areaVo: AreaVo, page: Int?, perPage: Int?): BaseResponse<List<Scense>> {
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPChangeInfo.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import cn.flightfeather.supervision.lightshare.vo.ProblemListVo
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.time.LocalDateTime
import java.util.*
/**
 * åœºæ™¯æ•´æ”¹æƒ…况
 * @date 2025/10/30
 * @author feiyu02
 */
@ApiModel("场景整改情况")
class DPChangeInfo {
//    /**
//     * æ—¶é—´æ ‡ç­¾ï¼Œå¯å¯¹åº”不同的统计时间颗粒度,目前常见的是月度、季度、任意多个月等
//     * ä¾‹å¦‚:2025å¹´10月、2025年第一季度、2025年上半年等
//     */
//    @ApiModelProperty(value = "时间标签,可对应不同的统计时间颗粒度,目前常见的是月度、季度、任意多个月等")
//    var timeTag: String? = null
//
//    @ApiModelProperty("起始时间")
//    var startTime: Date? = null
//
//    @ApiModelProperty("结束时间")
//    var endTime: Date? = null
    @ApiModelProperty(value = "子任务信息")
    var subTasks: List<Subtask>? = null
    @ApiModelProperty(value = "问题列表")
    var problems: List<ProblemListVo>? = null
    @ApiModelProperty(value = "问题数")
    var proCount = 0
    @ApiModelProperty(value = "整改数")
    var changeCount = 0
    @ApiModelProperty(value = "整改率")
    var changePer: Double = 0.0
    @ApiModelProperty(value = "整改耗时(天)(取耗时最长的问题作为最终整改耗时)")
    var changeTime: Int = 0
    // æ•´æ”¹æ•ˆçއ = æ•´æ”¹è¦æ±‚最大耗时 / æ•´æ”¹å®žé™…耗时
    @ApiModelProperty(value = "整改效率")
    var changeEfficiency: Double = 0.0
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPProblemRecurrence.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
import cn.flightfeather.supervision.domain.ds1.entity.Problemtype
import io.swagger.annotations.ApiModelProperty
/**
 * é—®é¢˜é‡å¤æƒ…况
 * @date 2025/10/30
 * @author feiyu02
 */
class DPProblemRecurrence {
    @ApiModelProperty(value = "问题标签")
    var problemTag:String? = null
    @ApiModelProperty(value = "问题类型")
    var problemType: Problemtype? = null
    @ApiModelProperty(value = "出现次数")
    var count = 0
    @ApiModelProperty(value = "整改数")
    var changeCount = 0
    @ApiModelProperty(value = "整改率")
    var changePer: Double = 0.0
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOpt.kt
@@ -1,6 +1,7 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.time.LocalDateTime
@@ -9,6 +10,7 @@
 * @date 2025/9/15
 * @author feiyu02
 */
@ApiModel("查询参数")
class QueryOpt {
    @ApiModelProperty("总任务id")
    var topTaskId: String? = null
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOptSingle.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.time.LocalDateTime
/**
 * å•个场景纵向数据统计产品查询条件
 * @date 2025/10/30
 * @author feiyu02
 */
@ApiModel("单个场景纵向数据统计产品查询条件")
class QueryOptSingle {
    @ApiModelProperty("场景id")
    var sceneId: String? = null
    @ApiModelProperty("起始时间,格式 yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    var startTime: LocalDateTime? = null
    @ApiModelProperty("结束时间,格式 yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    var endTime: LocalDateTime? = null
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/base/DPEvaluateInfo.kt
ÎļþÃû´Ó src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPEvaluateInfo.kt ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
package cn.flightfeather.supervision.lightshare.vo.dataprod.base
import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/base/DPInspectionInfo.kt
ÎļþÃû´Ó src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPInspectionInfo.kt ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
package cn.flightfeather.supervision.lightshare.vo.dataprod.base
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import cn.flightfeather.supervision.lightshare.vo.ProblemListVo
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/base/DPMonitorDataInfo.kt
ÎļþÃû´Ó src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPMonitorDataInfo.kt ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
package cn.flightfeather.supervision.lightshare.vo.dataprod.base
import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
import cn.flightfeather.supervision.domain.ds1.entity.Scense
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/base/DPSceneInfo.kt
ÎļþÃû´Ó src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPSceneInfo.kt ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.supervision.lightshare.vo.dataprod
package cn.flightfeather.supervision.lightshare.vo.dataprod.base
import cn.flightfeather.supervision.domain.ds1.entity.BaseScene
import cn.flightfeather.supervision.domain.ds1.entity.Scense
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProdSingleSceneController.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package cn.flightfeather.supervision.lightshare.web
import cn.flightfeather.supervision.lightshare.service.DataProdSingleSceneService
import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOptSingle
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
/**
 * å•场景纵向数据统计产品控制器
 * @date 2025/10/30
 * @author feiyu02
 */
@Api(tags = ["单场景纵向数据统计产品相关API接口"], description = "单场景纵向数据统计产品相关API接口")
@RestController
@RequestMapping("/dataProd/singleScene")
class DataProdSingleSceneController(private val dataProdSingleSceneService: DataProdSingleSceneService) {
    @ApiOperation(value = "整改情况")
    @PostMapping("/changeInfo/get")
    fun getChangeInfo(@ApiParam("查询条件") @RequestBody queryOpt: QueryOptSingle) =
        dataProdSingleSceneService.getChangeInfo(queryOpt)
    @ApiOperation(value = "批量查询整改情况")
    @PostMapping("/changeInfo/get/list")
    fun getChangeInfoList(@ApiParam("查询条件") @RequestBody queryOpts: List<QueryOptSingle>) =
        dataProdSingleSceneService.getChangeInfoList(queryOpts)
    @ApiOperation(value = "问题重复情况")
    @PostMapping("/problemRecurrence/get")
    fun getProblemRecurrence(@ApiParam("查询条件") @RequestBody queryOpt: QueryOptSingle) =
        dataProdSingleSceneService.getProblemRecurrence(queryOpt)
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomainitemController.kt
@@ -10,46 +10,61 @@
@Api(tags = ["DomainitemController"], description = "值域信息API接口")
@RestController
@IgnoreResponseAdvice
@RequestMapping("/domainitem")
class DomainitemController (val domainitemService: DomainitemService) {
    @IgnoreResponseAdvice
    @GetMapping
    fun getAll() = domainitemService.findAll()
    @IgnoreResponseAdvice
    @PutMapping
    fun add(@RequestBody domainitem: Domainitem) = domainitemService.save(domainitem)
    @IgnoreResponseAdvice
    @PostMapping
    fun update(@RequestBody domainitem: Domainitem) = domainitemService.update(domainitem)
    @IgnoreResponseAdvice
    @GetMapping("/{id}")
    fun getById(@PathVariable id:String) = domainitemService.findOne(id)
    @IgnoreResponseAdvice
    @DeleteMapping("/{id}")
    fun delete (@PathVariable id: String) = domainitemService.delete(id)
    @IgnoreResponseAdvice
    @ApiOperation("获取某类场景的问题位置选项")
    @GetMapping("/location")
    fun getLocation(
        @ApiParam("场景类型id") @RequestParam("sceneType") sceneType:Int
    ) = domainitemService.getLocation(sceneType)
    @IgnoreResponseAdvice
    @ApiOperation("获取巡查任务的类型选项")
    @GetMapping("/taskType")
    fun getTaskType() = domainitemService.getTaskType()
    @IgnoreResponseAdvice
    @ApiOperation("获取巡查任务的期限类型选项")
    @GetMapping("/deadlineType")
    fun getDeadlineType() = domainitemService.getDeadlineType()
    @IgnoreResponseAdvice
    @ApiOperation("获取巡查任务层次类型选项")
    @GetMapping("/level")
    fun getLevelType() = domainitemService.getLevelType()
    @IgnoreResponseAdvice
    @ApiOperation("根据场景类型获取任意拍的类型")
    @GetMapping("/mediaFileType")
    fun getMediaFileType(
        @ApiParam("场景类型id") @RequestParam("sceneType") sceneType:Int
    ) = domainitemService.getMediaFileType(sceneType)
    @ApiOperation("根据值域类别名称,获取具体的选项")
    @GetMapping("/name")
    fun getItemByName(
        @ApiParam("值域名称") @RequestParam("name") name:String
    ) = domainitemService.findOneByName(name)
}
src/main/resources/generator/generatorConfig4ds1.xml
@@ -11,7 +11,7 @@
        <property name="javaFileEncoding" value="UTF-8"/>
        <property name="beginningDelimiter" value="`"/>
        <property name="endingDelimiter" value="`"/>
        <!-- é…ç½®è‡ªå®šä¹‰æ³¨è§£æ’ä»¶ -->
        <!-- é…ç½®è‡ªå®šä¹‰æ³¨è§£æ’件,用于在生成数据库表模型时,自动添加swagger的@ApiModel注解 -->
        <plugin type="cn.flight.feather.devtool.mybatis.plugin.CustomAnnotationPlugin">
            <!-- å¯ä»¥åœ¨è¿™é‡Œæ·»åŠ æ’ä»¶å±žæ€§ -->
        </plugin>
src/main/resources/mapper/ds1/DataProductBaseMapper.xml
ÎļþÒÑɾ³ý
src/main/resources/mapper/ds1/DataProductFinalMapper.xml
ÎļþÒÑɾ³ý
src/main/resources/mapper/ds1/DataProductMiddleMapper.xml
ÎļþÒÑɾ³ý