1. 完成数据产品中间结果基本信息和具体信息入库 2. 修改ColInspectionInfo.kt 监管时间格式修改为yyyy-mm-dd 3. 新增数据产品类型枚举类 DataProductType 4. 修改BaseTemplate实现类通过重写genData方法生成Template相关数据 5. TODO 其他未涉及到的产品对象的中间结果对象
已修改13个文件
已添加19个文件
2336 ■■■■■ 文件已修改
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/ReportTaskCtrl.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcel.kt 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseTemplate.kt 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/BaseTemplateResult.kt 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProAnalysisSummaryResult.kt 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProDetailSummaryResult.kt 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProTypeDetailSummaryResult.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProTypeRankMainSummaryResult.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProTypeRankSummaryResult.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProTypeStatusSummaryResult.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ScoreAnalysisSummaryResult.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ScoreDetailSummaryResult.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColInspectionInfo.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProDetailSummary.kt 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeDetailSummary.kt 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankSummary.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreAnalysisSummary.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProduct.java 411 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductProDetail.java 753 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductTownProAnalysis.java 465 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DataProductMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DataProductProDetailMapper.kt 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DataProductTownProAnalysisMapper.kt 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/DataProductRep.kt 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DataProductMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DataProductProDetailMapper.xml 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/DataProductTownProAnalysisMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/ReportTaskCtrl.kt
@@ -9,6 +9,7 @@
import cn.flightfeather.supervision.common.executor.BackgroundTaskCtrl
import cn.flightfeather.supervision.common.executor.BgTaskStatus
import cn.flightfeather.supervision.common.executor.BgTaskType
import cn.flightfeather.supervision.domain.ds1.repository.DataProductRep
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
@@ -22,6 +23,7 @@
class ReportTaskCtrl(
    private val backgroundTaskCtrl: BackgroundTaskCtrl,
    private val dbMapper: DbMapper,
    private val mapper: DataProductRep,
    @Value("\${filePath}") private val filePath: String,
) {
@@ -32,6 +34,11 @@
        val bgTask = backgroundTaskCtrl.startNewTask(BgTaskType.DOCUMENT, id, taskName) {
            val p = "$filePath/autoscore/"
            baseExcel.toFile(p)
            baseExcel.templates.forEach {
                it.toDBEntity()
                it.toDBBaseInfoEntity()
                mapper.insertDataProduct(it.dataProduct, it.entities)
            }
            true
        }
        bgTask.taskStatus.extra = downloadUrl
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcel.kt
@@ -1,10 +1,10 @@
package cn.flightfeather.supervision.business.report
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import org.apache.poi.hssf.usermodel.HSSFWorkbook
import java.io.File
import java.io.FileOutputStream
import java.io.OutputStream
import java.util.*
/**
 * å„模板合并输出为整体文档
@@ -16,10 +16,23 @@
    abstract val fileName: String
    // ä¸­é—´ç»“果对象 by hc 2024.12.06
    private val objectResults: MutableList<MutableList<BaseTemplateResult>> = mutableListOf()
    // excel文档
    private var workbook = HSSFWorkbook()
    fun getReportName(): String = "${dataSource.areaName()}-${fileName}.xlsx"
    // è¾“出到对象
    fun toObject() {
        templates.forEach {
            if (!it.isExecuted) {
                it.execute()
            }
            objectResults.add(it.toObject())
        }
    }
    fun toFile(path: String) {
        val fileName = getReportName()
@@ -33,7 +46,9 @@
    fun toOutputStream(out: OutputStream) {
        templates.forEach {
            it.execute()
            if (!it.isExecuted) {
                it.execute()
            }
            it.toWorkBook(workbook)
        }
        workbook.write(out)
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseTemplate.kt
@@ -1,14 +1,15 @@
package cn.flightfeather.supervision.business.report
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.common.utils.ExcelUtil
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.common.utils.UUIDGenerator
import cn.flightfeather.supervision.domain.ds1.entity.DataProduct
import org.apache.poi.hssf.usermodel.HSSFWorkbook
import tk.mybatis.mapper.entity.Example
import java.io.FileOutputStream
import java.io.OutputStream
import java.util.*
import kotlin.collections.ArrayList
import kotlin.reflect.full.createInstance
/**
 * excel报告模板基类
@@ -23,14 +24,26 @@
    //模板名称
    abstract val templateName: String
    // ä¸­é—´ç»“果对象 by hc 2024.12.5
    abstract var resultObjects: MutableList<BaseTemplateResult>
    // ä¸­é—´ç»“果基本信息对应数据库中的entity
    var dataProduct = DataProduct()
    // ä¸­é—´ç»“果具体信息对应数据库中的entity
    val entities = ArrayList<Any>()
    // æ‰§è¡ŒçŠ¶æ€ by hc 2024.12.5
    var isExecuted: Boolean = false
    //表头
    val head = mutableListOf<MutableList<ExcelUtil.MyCell>>()
    //内容
    val contents = mutableListOf<MutableList<Any>>()
    open fun execute() {
    // ç”ŸæˆTemplate相关数据 by hc 2024.12.9
    open fun genData() {
        //数据源重置
        dataSource.reset()
        //合成表头
@@ -49,6 +62,16 @@
        }
    }
    open fun execute() {
        try {
            genData()
            // æ²¡æœ‰é”™è¯¯æ­£å¸¸è¿è¡Œç»“束
            isExecuted = true
        } catch (e: Exception) {
            // TODO: handle exception
        }
    }
    override fun toWorkBook(wb: HSSFWorkbook) {
        val f = tableFormat()
        ExcelUtil.write(f.first, f.second, wb, templateName)
@@ -60,6 +83,66 @@
    }
    /**
     * è¾“出到对象
     * hc 2024.12.06
     */
    fun toObject(): MutableList<BaseTemplateResult>  {
        if (!isExecuted) {
            execute()
        }
        // èŽ·å¾—å’Œtemplate对应的中间结果数据对象KCLASS对象
        val classType = resultObjects.first()::class
        try {
            // æ¸…空数组
            resultObjects.clear()
            contents.forEach {
                // åˆ›å»ºå¯¹åº”的中间结果数据对象
                val resultObj = classType.createInstance()
                resultObj.setProperties(it)
                resultObjects.add(resultObj)
            }
        }catch (e: Exception) {
            // å¦‚果出现异常恢复到初始状态 é¿å…ä¸‹æ¬¡è°ƒç”¨toObject数据重复
            resultObjects.clear()
            resultObjects.add(classType.createInstance())
        }
        return resultObjects
    }
    /**
     * ç”Ÿæˆä¸­é—´ç»“果具体信息entity
     * by hc 2024.12.12
     */
    fun toDBEntity() {
        entities.clear()
        if (!isExecuted) {
            execute()
        }
        // å…ˆæ‰§è¡ŒtoObject后将toObject的结果转化为DBEntity
        toObject()
        resultObjects.forEach {
            entities.add(it.convertToDBEntity())
        }
    }
    /**
     * ç”Ÿæˆä¸­é—´ç»“果基本信息entity
     * by hc 2024.12.12
     */
    fun toDBBaseInfoEntity() {
        dataProduct = DataProduct()
        dataProduct.guid = UUIDGenerator.generate16ShortUUID()
        dataProduct.townCode = dataSource.config.townCode
        dataProduct.cityCode = dataSource.config.cityCode
        dataProduct.districtCode = dataSource.config.districtCode
        dataProduct.endTime = dataSource.config.endTime
        dataProduct.startTime = dataSource.config.startTime
        dataProduct.provinceCode = dataSource.config.provinceCode
        dataProduct.sceneTypeId = dataSource.config.sceneType?.toByte() ?: -1
        dataProduct.taskGuid = dataSource.config.topTaskGuid
    }
    /**
     * è¾“出为文档
     */
    override fun toFile(path: String) {
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/BaseTemplateResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
package cn.flightfeather.supervision.business.report.bean
import cn.flightfeather.supervision.common.utils.ExcelUtil
import kotlin.reflect.KMutableProperty
import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.full.findAnnotation
/**
 * excel报告模板中间结果对象基类
 * hc 2024.12.06
 */
abstract class BaseTemplateResult {
    // å®šä¹‰æ³¨è§£
    annotation class ExcelHead(val index: Int, val des: String)
    /**
     * è½¬æ¢ä¸ºæ•°æ®åº“表对应的实体类对象
     */
    abstract fun convertToDBEntity(): Any
    fun setProperties(values: MutableList<Any>) {
        // éåŽ†æ‰€æœ‰å±žæ€§å¹¶èµ‹å€¼
        var index = 0
        this::class.declaredMemberProperties.sortedBy { it.findAnnotation<ExcelHead>()?.index }.forEach { property ->
            // æ£€æŸ¥å±žæ€§æ˜¯å¦å¯ä»¥è®¾ç½®å€¼
            if (property is KMutableProperty<*>) {
                try {
                    // æš‚存最后的属性值的变量 é»˜è®¤å°±æ˜¯values[index]
                    var c: Any = values[index]
                    // ä»…仅为了简写values[index]
                    val v = values[index++]
                    // ä»ŽMyCell对象中拿出百分比类型
                    if (v is ExcelUtil.MyCell) {
                        if (v.isPercent) {
                            val percent = v.text.toBigDecimalOrNull()
                            if (percent != null) {
                                percent.setScale(2)
                                c = percent
                            }else {
                                c = ""
                            }
                        }
                    }
                    // å‘属性中赋值
                    property.setter.call(this, c)
                } catch (e: Exception) {
                }
            }
        }
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProAnalysisSummaryResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,79 @@
package cn.flightfeather.supervision.business.report.bean
import cn.flightfeather.supervision.domain.ds1.entity.DataProductTownProAnalysis
import java.math.BigDecimal
/**
 * åˆ†è¡—镇问题整改分析汇总表中间结果对象
 * hc 2024.12.06
 */
class ProAnalysisSummaryResult : BaseTemplateResult()  {
    @ExcelHead(1, "街镇序号")
    var formIndex: Int? = null
    @ExcelHead(2, "街镇/工业区")
    var sceneTownname: String? = null
    @ExcelHead(3, "场景类别")
    var sceneType: String? = null
    @ExcelHead(4, "场景数")
    var sceneCount: Int? = null
    @ExcelHead(5, "完工、未施工、停工或停业、关闭等")
    var inactiveScenes: Int? = null
    @ExcelHead(6, "施工中、运营中总数")
    var activeScenes: Int? = null
    @ExcelHead(7, "整改单位数")
    var changeScenes: Int? = null
    @ExcelHead(8, "整改单位占比")
    var changeScenePer: BigDecimal? = null
    @ExcelHead(9, "问题数")
    var proNum: Int? = null
    @ExcelHead(10, "问题占比")
    var proPer: BigDecimal? = null
    @ExcelHead(11, "整改数")
    var changeNum: Int? = null
    @ExcelHead(12, "整改率")
    var changePer: BigDecimal? = null
    @ExcelHead(13, "整改单位比排名")
    var changeSceneRank: Int? = null
    @ExcelHead(14, "问题整改率排名")
    var proChangeRank: Int? = null
    @ExcelHead(15, "拟列入重点监管数")
    var focusSceneNum: Int? = null
    @ExcelHead(16, "拟列入重点监管占比")
    var focusScenePer: BigDecimal? = null
    override fun convertToDBEntity(): DataProductTownProAnalysis {
        val entity = DataProductTownProAnalysis()
        entity.formIndex = this.formIndex
        entity.townName = this.sceneTownname
        entity.sceneType = this.sceneType
        entity.sceneCount = this.sceneCount
        entity.inactiveSceneCount = this.inactiveScenes
        entity.activeSceneCount = this.activeScenes
        entity.changeSceneCount = this.changeScenes
        entity.changeScenePer = this.changeScenePer
        entity.proCount = this.proNum
        entity.proPer = this.proPer
        entity.changeCount = this.changeNum
        entity.changePer = this.changePer
        entity.changeSceneRank = this.changeSceneRank
        entity.proChangeRank = this.proChangeRank
        entity.focusSceneCount = this.focusSceneNum
        entity.focusScenePer = this.focusScenePer
        return entity
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProDetailSummaryResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,132 @@
package cn.flightfeather.supervision.business.report.bean
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.domain.ds1.entity.DataProductProDetail
import java.math.BigDecimal
/**
 * é—®é¢˜ä¸Žæ•´æ”¹è·Ÿè¸ªæ±‡æ€»è¡¨ä¸­é—´ç»“果对象
 * hc 2024.12.06
 */
class ProDetailSummaryResult : BaseTemplateResult() {
    @ExcelHead(1, "表单编号")
    var formIndex: Int? = null
    @ExcelHead(2, "唯一序号")
    var sceneIndex: Int? = null
    @ExcelHead(3, "场景类型")
    var sceneType: String? = null
    @ExcelHead(4, "场景名称")
    var sceneName: String? = null
    @ExcelHead(5, "监管时间")
    var subTaskPlanstarttime: String? = null
    @ExcelHead(6, "巡查人员")
    var subTaskExecutorrealtimes: String? = null
    @ExcelHead(7, "问题类型")
    var problemTypename: String? = null
    @ExcelHead(8, "问题描述")
    var problemDescription: String? = null
    @ExcelHead(9, "问题位置")
    var problemLocation: String? = null
    @ExcelHead(10, "问题数")
    var problemNum: Int? = null
    @ExcelHead(11, "整改时间")
    var changeTime: String? = null
    @ExcelHead(12, "整改情况")
    var problemChanged: String? = null
    @ExcelHead(13, "整改问题")
    var changedProblem: String? = null
    @ExcelHead(14, "整改数")
    var changedNum: Int? = null
    @ExcelHead(15, "未整改问题")
    var unchangedProblems: String? = null
    @ExcelHead(16, "未整改数")
    var unChangedProblem: Int? = null
    @ExcelHead(17, "问题整改率")
    var changePercent: BigDecimal? = null
    @ExcelHead(18, "审核情况")
    var checkStatus: String? = null
    @ExcelHead(19, "问题审核时间")
    var pCheckTime: String? = null
    @ExcelHead(20, "整改审核时间")
    var cCheckTime: String? = null
    @ExcelHead(21, "问题审核数")
    var pCheckNum: Int? = null
    @ExcelHead(22, "问题审核占比")
    var pCheckPer: BigDecimal? = null
    @ExcelHead(23, "整改审核数")
    var cCheckNum: Int? = null
    @ExcelHead(24, "整改审核占比")
    var cCheckPer: BigDecimal? = null
    @ExcelHead(25, "台账提交百分比")
    var ledgerPercent: BigDecimal? = null
    @ExcelHead(26, "台账提交时间")
    var ledgerSubmitdate: String? = null
    @ExcelHead(27, "台账审核时间")
    var ledgerCheckTime: String? = null
    @ExcelHead(28, "整改跟踪提醒")
    var changeTrackingReminder: String? = null
    override fun convertToDBEntity(): DataProductProDetail {
        val entity = DataProductProDetail()
        entity.formIndex = this.formIndex
        entity.sceneIndex = this.sceneIndex
        entity.sceneType = this.sceneType
        entity.sceneName = this.sceneName
        // å°†String类型的监管时间转换为Date类型
        entity.inspectionTime = DateUtil.StringToDate(this.subTaskPlanstarttime, "yyyy-mm-dd")
        entity.executors = this.subTaskExecutorrealtimes
        entity.problemType = this.problemTypename
        entity.problemDescription = this.problemDescription
        entity.problemLocation = this.problemLocation
        entity.problemNum = this.problemNum
        entity.changeTime = this.changeTime
        entity.problemChanged = this.problemChanged
        entity.changedProblem = this.changedProblem
        entity.changedNum = this.changedNum
        entity.unchangedProblems = this.unchangedProblems
        entity.unchangedNum = this.unChangedProblem
        entity.changePercent = this.changePercent
        entity.checkStatus = this.checkStatus
        entity.proCheckTime = this.pCheckTime
        entity.changeCheckTime = this.cCheckTime
        entity.proCheckNum = this.pCheckNum
        entity.proCheckPer = this.pCheckPer
        entity.changeCheckNum = this.cCheckNum
        entity.changeCheckPer = this.cCheckPer
        entity.ledgerPercent = this.ledgerPercent
        // å°†String类型的台账提交时间转换为Date类型
        entity.ledgerSubmitDate = DateUtil.StringToDate(this.ledgerSubmitdate, "yyyy-mm-dd hh:mm:ss")
        // å°†String类型的台账审核时间转换为Date类型,这里假设ledgerCheckTime是符合Date格式的字符串
        entity.ledgerCheckTime = DateUtil.StringToDate(this.ledgerCheckTime, "yyyy-mm-dd hh:mm:ss")
        entity.changeTrackingReminder = this.changeTrackingReminder
        return entity
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProTypeDetailSummaryResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.business.report.bean
class ProTypeDetailSummaryResult() : BaseTemplateResult() {
    override fun convertToDBEntity(): Any {
        TODO("Not yet implemented")
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProTypeRankMainSummaryResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package cn.flightfeather.supervision.business.report.bean
class ProTypeRankMainSummaryResult : BaseTemplateResult()  {
    override fun convertToDBEntity(): Any {
        TODO("Not yet implemented")
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProTypeRankSummaryResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package cn.flightfeather.supervision.business.report.bean
class ProTypeRankSummaryResult : BaseTemplateResult()  {
    override fun convertToDBEntity(): Any {
        TODO("Not yet implemented")
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ProTypeStatusSummaryResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package cn.flightfeather.supervision.business.report.bean
class ProTypeStatusSummaryResult : BaseTemplateResult()  {
    override fun convertToDBEntity(): Any {
        TODO("Not yet implemented")
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ScoreAnalysisSummaryResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package cn.flightfeather.supervision.business.report.bean
class ScoreAnalysisSummaryResult : BaseTemplateResult()  {
    override fun convertToDBEntity(): Any {
        TODO("Not yet implemented")
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/bean/ScoreDetailSummaryResult.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package cn.flightfeather.supervision.business.report.bean
class ScoreDetailSummaryResult : BaseTemplateResult() {
    override fun convertToDBEntity(): Any {
        TODO("Not yet implemented")
    }
}
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColInspectionInfo.kt
@@ -43,7 +43,7 @@
            row.apply {
                // è¡¨å¤´ï¼šå·¡æŸ¥æƒ…况及问题、整改统计
                //监管时间
                add(DateUtil.DateToString(rowData.subTask?.planstarttime, DateUtil.DateStyle.MM_DD) ?: "")
                add(DateUtil.DateToString(rowData.subTask?.planstarttime, DateUtil.DateStyle.YYYY_MM_DD) ?: "")
                //巡查人员
                add(rowData.subTask?.executorrealtimes?.replace("#", "、") ?: "")
                //查询子任务对应的问题,并且根据条件进行筛选
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProAnalysisSummary.kt
@@ -12,16 +12,19 @@
import cn.flightfeather.supervision.domain.ds1.entity.SceneMixingPlant
import cn.flightfeather.supervision.domain.ds1.entity.SceneStorageYard
import cn.flightfeather.supervision.domain.ds1.entity.SceneWharf
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.business.report.bean.ProAnalysisSummaryResult
/**
 * åˆ†è¡—镇问题整改分析汇总表
 */
class ProAnalysisSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
    override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProAnalysisSummaryResult())
    override val cols: List<BaseCols> = listOf(ColInspectionInfo(), ColTotalGrade(), ColStrategy())
    override val templateName: String = "分街镇问题整改分析汇总表"
    override fun execute() {
    override fun genData() {
        //数据源重置
        dataSource.reset()
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProDetailSummary.kt
@@ -7,9 +7,11 @@
import cn.flightfeather.supervision.business.report.cols.ColLedger
import cn.flightfeather.supervision.business.report.cols.ColSceneName
import cn.flightfeather.supervision.business.report.cols.ColStrategy
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.business.report.bean.ProDetailSummaryResult
class ProDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
    override val cols: List<BaseCols> = listOf(ColSceneName(), ColInspectionInfo(), ColLedger(), ColStrategy())
    override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProDetailSummaryResult())
    override val templateName: String = "问题与整改跟踪汇总表"
}
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeDetailSummary.kt
@@ -3,10 +3,12 @@
import cn.flightfeather.supervision.business.report.BaseCols
import cn.flightfeather.supervision.business.report.BaseTemplate
import cn.flightfeather.supervision.business.report.DataSource
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.business.report.bean.ProTypeDetailSummaryResult
import cn.flightfeather.supervision.business.report.cols.*
class ProTypeDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
    override val cols: List<BaseCols> = listOf(ColSceneName(), ColTown(), ColStatus(), ColProChange(), ColProblemDistribution())
    override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProTypeDetailSummaryResult())
    override val templateName: String = "问题与整改分类统计表"
}
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankMainSummary.kt
@@ -1,12 +1,14 @@
package cn.flightfeather.supervision.business.report.template
import cn.flightfeather.supervision.business.report.DataSource
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.business.report.bean.ProTypeRankMainSummaryResult
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.common.utils.ExcelUtil
class ProTypeRankMainSummary(dataSource: DataSource) : ProTypeRankSummary(dataSource) {
    override val templateName: String = "月度主要或典型问题分析表"
    override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProTypeRankMainSummaryResult())
    override fun formatTable(summarys: MutableList<Summary>) {
        //排名靠前的max个问题被认定为主要或典型问题
        val max = when (dataSource.config.sceneType.toString()) {
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeRankSummary.kt
@@ -3,15 +3,16 @@
import cn.flightfeather.supervision.business.report.BaseCols
import cn.flightfeather.supervision.business.report.BaseTemplate
import cn.flightfeather.supervision.business.report.DataSource
import cn.flightfeather.supervision.business.report.cols.*
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.business.report.bean.ProTypeRankSummaryResult
import cn.flightfeather.supervision.common.utils.ExcelUtil
import kotlin.math.round
open class ProTypeRankSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
    override val cols: List<BaseCols> = listOf()
    override val templateName: String = "问题与整改分类排名"
    override fun execute() {
    override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProTypeRankSummaryResult())
    override fun genData() {
        dataSource.reset()
        val proMap = mutableMapOf<String?, Summary>()
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ProTypeStatusSummary.kt
@@ -3,16 +3,19 @@
import cn.flightfeather.supervision.business.report.BaseCols
import cn.flightfeather.supervision.business.report.BaseTemplate
import cn.flightfeather.supervision.business.report.DataSource
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.business.report.bean.ProTypeStatusSummaryResult
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.common.utils.ExcelUtil
import cn.flightfeather.supervision.domain.ds1.entity.SceneConstructionSite
class ProTypeStatusSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
    override val cols: List<BaseCols> = listOf()
    override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ProTypeStatusSummaryResult())
    override val templateName: String = "工地施工阶段问题分类分析表"
    @Throws(Exception::class)
    override fun execute() {
    override fun genData() {
        if (dataSource.config.sceneType.toString() != Constant.SceneType.TYPE1.value) {
//            throw IllegalStateException("${templateName}只能针对工地进行分析,当前传入场景类型编号为${dataSource.config.sceneType}")
            println("sadas")
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreAnalysisSummary.kt
@@ -3,16 +3,18 @@
import cn.flightfeather.supervision.business.report.BaseCols
import cn.flightfeather.supervision.business.report.BaseTemplate
import cn.flightfeather.supervision.business.report.DataSource
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.business.report.bean.ScoreAnalysisSummaryResult
import cn.flightfeather.supervision.business.report.cols.ColTotalGrade
import cn.flightfeather.supervision.common.utils.ExcelUtil
import kotlin.math.round
class ScoreAnalysisSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
    override val cols: List<BaseCols> = listOf(ColTotalGrade())
    override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ScoreAnalysisSummaryResult())
    override val templateName: String = "分街镇规范性分析表"
    override fun execute() {
    override fun genData() {
        dataSource.reset()
        cols.forEach { it.combineHead(head,dataSource) }
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt
@@ -3,6 +3,8 @@
import cn.flightfeather.supervision.business.report.BaseCols
import cn.flightfeather.supervision.business.report.BaseTemplate
import cn.flightfeather.supervision.business.report.DataSource
import cn.flightfeather.supervision.business.report.bean.BaseTemplateResult
import cn.flightfeather.supervision.business.report.bean.ScoreDetailSummaryResult
import cn.flightfeather.supervision.business.report.cols.*
class ScoreDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
@@ -11,5 +13,6 @@
        ColTotalGrade(),
        ColItemGrade()
    )
    override var resultObjects: MutableList<BaseTemplateResult> = mutableListOf(ScoreDetailSummaryResult())
    override val templateName: String = "规范性评估详情表"
}
src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt
@@ -211,6 +211,11 @@
        MULTI_MODE("multi_mode", "多选模式"),
    }
    // æ•°æ®äº§å“ç±»åž‹
    enum class DataProductType(val value: Byte, val des: String){
        PRO_DETAIL_SUMMARY(1, "问题与整改跟踪汇总表"),
        PRO_ANALYSIS_SUMMARY(2, "分街镇问题整改分析汇总表")
    }
    companion object {
        //问题审核
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProduct.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,411 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.util.Date;
import javax.persistence.*;
@Table(name = "sm_t_data_product")
public class DataProduct {
    @Id
    @Column(name = "GUID")
    private String guid;
    /**
     * æŠ¥è¡¨ç±»åž‹(1:问题与整改跟踪汇总表 2:分街镇问题整改分析汇总表)
     */
    @Column(name = "Type_ID")
    private Byte typeId;
    /**
     * æ€»ä»»åŠ¡id
     */
    @Column(name = "Task_GUID")
    private String taskGuid;
    @Column(name = "Scene_Type_ID")
    private Byte sceneTypeId;
    @Column(name = "Province_Code")
    private String provinceCode;
    @Column(name = "Province_Name")
    private String provinceName;
    @Column(name = "City_Code")
    private String cityCode;
    @Column(name = "City_Name")
    private String cityName;
    @Column(name = "District_Code")
    private String districtCode;
    @Column(name = "District_Name")
    private String districtName;
    @Column(name = "Town_Code")
    private String townCode;
    @Column(name = "Town_Name")
    private String townName;
    /**
     * å¼€å§‹æ—¶é—´
     */
    @Column(name = "Start_Time")
    private Date startTime;
    /**
     * ç»“束时间
     */
    @Column(name = "End_Time")
    private Date endTime;
    /**
     * åˆ›å»ºæ—¶é—´
     */
    @Column(name = "Create_Time")
    private Date createTime;
    @Column(name = "Update_Time")
    private Date updateTime;
    /**
     * æ‰©å±•字段1
     */
    @Column(name = "Extension1")
    private String extension1;
    /**
     * æ‰©å±•字段2
     */
    @Column(name = "Extension2")
    private String extension2;
    /**
     * æ‰©å±•字段3
     */
    @Column(name = "Extension3")
    private String extension3;
    /**
     * å¤‡æ³¨
     */
    @Column(name = "Remark")
    private String remark;
    /**
     * @return GUID
     */
    public String getGuid() {
        return guid;
    }
    /**
     * @param guid
     */
    public void setGuid(String guid) {
        this.guid = guid == null ? null : guid.trim();
    }
    /**
     * èŽ·å–æŠ¥è¡¨ç±»åž‹(1:问题与整改跟踪汇总表 2:分街镇问题整改分析汇总表)
     *
     * @return Type_ID - æŠ¥è¡¨ç±»åž‹(1:问题与整改跟踪汇总表 2:分街镇问题整改分析汇总表)
     */
    public Byte getTypeId() {
        return typeId;
    }
    /**
     * è®¾ç½®æŠ¥è¡¨ç±»åž‹(1:问题与整改跟踪汇总表 2:分街镇问题整改分析汇总表)
     *
     * @param typeId æŠ¥è¡¨ç±»åž‹(1:问题与整改跟踪汇总表 2:分街镇问题整改分析汇总表)
     */
    public void setTypeId(Byte typeId) {
        this.typeId = typeId;
    }
    /**
     * èŽ·å–æ€»ä»»åŠ¡id
     *
     * @return Task_GUID - æ€»ä»»åŠ¡id
     */
    public String getTaskGuid() {
        return taskGuid;
    }
    /**
     * è®¾ç½®æ€»ä»»åŠ¡id
     *
     * @param taskGuid æ€»ä»»åŠ¡id
     */
    public void setTaskGuid(String taskGuid) {
        this.taskGuid = taskGuid == null ? null : taskGuid.trim();
    }
    /**
     * @return Scene_Type_ID
     */
    public Byte getSceneTypeId() {
        return sceneTypeId;
    }
    /**
     * @param sceneTypeId
     */
    public void setSceneTypeId(Byte sceneTypeId) {
        this.sceneTypeId = sceneTypeId;
    }
    /**
     * @return Province_Code
     */
    public String getProvinceCode() {
        return provinceCode;
    }
    /**
     * @param provinceCode
     */
    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode == null ? null : provinceCode.trim();
    }
    /**
     * @return Province_Name
     */
    public String getProvinceName() {
        return provinceName;
    }
    /**
     * @param provinceName
     */
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName == null ? null : provinceName.trim();
    }
    /**
     * @return City_Code
     */
    public String getCityCode() {
        return cityCode;
    }
    /**
     * @param cityCode
     */
    public void setCityCode(String cityCode) {
        this.cityCode = cityCode == null ? null : cityCode.trim();
    }
    /**
     * @return City_Name
     */
    public String getCityName() {
        return cityName;
    }
    /**
     * @param cityName
     */
    public void setCityName(String cityName) {
        this.cityName = cityName == null ? null : cityName.trim();
    }
    /**
     * @return District_Code
     */
    public String getDistrictCode() {
        return districtCode;
    }
    /**
     * @param districtCode
     */
    public void setDistrictCode(String districtCode) {
        this.districtCode = districtCode == null ? null : districtCode.trim();
    }
    /**
     * @return District_Name
     */
    public String getDistrictName() {
        return districtName;
    }
    /**
     * @param districtName
     */
    public void setDistrictName(String districtName) {
        this.districtName = districtName == null ? null : districtName.trim();
    }
    /**
     * @return Town_Code
     */
    public String getTownCode() {
        return townCode;
    }
    /**
     * @param townCode
     */
    public void setTownCode(String townCode) {
        this.townCode = townCode == null ? null : townCode.trim();
    }
    /**
     * @return Town_Name
     */
    public String getTownName() {
        return townName;
    }
    /**
     * @param townName
     */
    public void setTownName(String townName) {
        this.townName = townName == null ? null : townName.trim();
    }
    /**
     * èŽ·å–å¼€å§‹æ—¶é—´
     *
     * @return Start_Time - å¼€å§‹æ—¶é—´
     */
    public Date getStartTime() {
        return startTime;
    }
    /**
     * è®¾ç½®å¼€å§‹æ—¶é—´
     *
     * @param startTime å¼€å§‹æ—¶é—´
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    /**
     * èŽ·å–ç»“æŸæ—¶é—´
     *
     * @return End_Time - ç»“束时间
     */
    public Date getEndTime() {
        return endTime;
    }
    /**
     * è®¾ç½®ç»“束时间
     *
     * @param endTime ç»“束时间
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    /**
     * èŽ·å–åˆ›å»ºæ—¶é—´
     *
     * @return Create_Time - åˆ›å»ºæ—¶é—´
     */
    public Date getCreateTime() {
        return createTime;
    }
    /**
     * è®¾ç½®åˆ›å»ºæ—¶é—´
     *
     * @param createTime åˆ›å»ºæ—¶é—´
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    /**
     * @return Update_Time
     */
    public Date getUpdateTime() {
        return updateTime;
    }
    /**
     * @param updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    /**
     * èŽ·å–æ‰©å±•å­—æ®µ1
     *
     * @return Extension1 - æ‰©å±•字段1
     */
    public String getExtension1() {
        return extension1;
    }
    /**
     * è®¾ç½®æ‰©å±•字段1
     *
     * @param extension1 æ‰©å±•字段1
     */
    public void setExtension1(String extension1) {
        this.extension1 = extension1 == null ? null : extension1.trim();
    }
    /**
     * èŽ·å–æ‰©å±•å­—æ®µ2
     *
     * @return Extension2 - æ‰©å±•字段2
     */
    public String getExtension2() {
        return extension2;
    }
    /**
     * è®¾ç½®æ‰©å±•字段2
     *
     * @param extension2 æ‰©å±•字段2
     */
    public void setExtension2(String extension2) {
        this.extension2 = extension2 == null ? null : extension2.trim();
    }
    /**
     * èŽ·å–æ‰©å±•å­—æ®µ3
     *
     * @return Extension3 - æ‰©å±•字段3
     */
    public String getExtension3() {
        return extension3;
    }
    /**
     * è®¾ç½®æ‰©å±•字段3
     *
     * @param extension3 æ‰©å±•字段3
     */
    public void setExtension3(String extension3) {
        this.extension3 = extension3 == null ? null : extension3.trim();
    }
    /**
     * èŽ·å–å¤‡æ³¨
     *
     * @return Remark - å¤‡æ³¨
     */
    public String getRemark() {
        return remark;
    }
    /**
     * è®¾ç½®å¤‡æ³¨
     *
     * @param remark å¤‡æ³¨
     */
    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DataProductProDetail.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,753 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
@Table(name = "sm_t_data_product_prodetail")
public class DataProductProDetail {
    /**
     * ä¸»é”®ID
     */
    @Id
    @Column(name = "ID")
    private Integer id;
    /**
     * ä¸­é—´ç»“果基本信息ID,基本信息表外键ID
     */
    @Column(name = "DP_GUID")
    private String dpGuid;
    /**
     * è¡¨å•编号
     */
    @Column(name = "Form_Index")
    private Integer formIndex;
    /**
     * å”¯ä¸€åºå·
     */
    @Column(name = "Scene_Index")
    private Integer sceneIndex;
    /**
     * åœºæ™¯ç±»åž‹
     */
    @Column(name = "Scene_Type")
    private String sceneType;
    /**
     * åœºæ™¯åç§°
     */
    @Column(name = "Scene_Name")
    private String sceneName;
    /**
     * ç›‘管时间
     */
    @Column(name = "Inspection_Time")
    private Date inspectionTime;
    /**
     * å·¡æŸ¥äººå‘˜
     */
    @Column(name = "Executors")
    private String executors;
    /**
     * é—®é¢˜ç±»åž‹
     */
    @Column(name = "Problem_Type")
    private String problemType;
    /**
     * é—®é¢˜æè¿°
     */
    @Column(name = "Problem_Description")
    private String problemDescription;
    /**
     * é—®é¢˜ä½ç½®
     */
    @Column(name = "Problem_Location")
    private String problemLocation;
    /**
     * é—®é¢˜æ•°
     */
    @Column(name = "Problem_Num")
    private Integer problemNum;
    /**
     * æ•´æ”¹æ—¶é—´
     */
    @Column(name = "Change_Time")
    private String changeTime;
    /**
     * æ•´æ”¹æƒ…况
     */
    @Column(name = "Problem_Changed")
    private String problemChanged;
    /**
     * æ•´æ”¹é—®é¢˜
     */
    @Column(name = "Changed_Problem")
    private String changedProblem;
    /**
     * æ•´æ”¹æ•°
     */
    @Column(name = "Changed_Num")
    private Integer changedNum;
    /**
     * æœªæ•´æ”¹é—®é¢˜
     */
    @Column(name = "Unchanged_Problems")
    private String unchangedProblems;
    /**
     * æœªæ•´æ”¹æ•°
     */
    @Column(name = "UnChanged_Num")
    private Integer unchangedNum;
    /**
     * é—®é¢˜æ•´æ”¹çއ
     */
    @Column(name = "Change_Percent")
    private BigDecimal changePercent;
    /**
     * å®¡æ ¸æƒ…况
     */
    @Column(name = "Check_Status")
    private String checkStatus;
    /**
     * é—®é¢˜å®¡æ ¸æ—¶é—´
     */
    @Column(name = "Pro_Check_Time")
    private String proCheckTime;
    /**
     * æ•´æ”¹å®¡æ ¸æ—¶é—´
     */
    @Column(name = "Change_Check_Time")
    private String changeCheckTime;
    /**
     * é—®é¢˜å®¡æ ¸æ•°
     */
    @Column(name = "Pro_Check_Num")
    private Integer proCheckNum;
    /**
     * é—®é¢˜å®¡æ ¸å æ¯”
     */
    @Column(name = "Pro_Check_Per")
    private BigDecimal proCheckPer;
    /**
     * æ•´æ”¹å®¡æ ¸æ•°
     */
    @Column(name = "Change_Check_Num")
    private Integer changeCheckNum;
    /**
     * æ•´æ”¹å®¡æ ¸å æ¯”
     */
    @Column(name = "Change_Check_Per")
    private BigDecimal changeCheckPer;
    /**
     * å°è´¦æäº¤ç™¾åˆ†æ¯”
     */
    @Column(name = "Ledger_Percent")
    private BigDecimal ledgerPercent;
    /**
     * å°è´¦æäº¤æ—¶é—´
     */
    @Column(name = "Ledger_Submit_Date")
    private Date ledgerSubmitDate;
    /**
     * å°è´¦å®¡æ ¸æ—¶é—´
     */
    @Column(name = "Ledger_Check_Time")
    private Date ledgerCheckTime;
    /**
     * æ•´æ”¹è·Ÿè¸ªæé†’
     */
    @Column(name = "Change_Tracking_Reminder")
    private String changeTrackingReminder;
    /**
     * åˆ›å»ºæ—¶é—´
     */
    @Column(name = "Create_Time")
    private Date createTime;
    /**
     * èŽ·å–ä¸»é”®ID
     *
     * @return ID - ä¸»é”®ID
     */
    public Integer getId() {
        return id;
    }
    /**
     * è®¾ç½®ä¸»é”®ID
     *
     * @param id ä¸»é”®ID
     */
    public void setId(Integer id) {
        this.id = id;
    }
    /**
     * èŽ·å–ä¸­é—´ç»“æžœåŸºæœ¬ä¿¡æ¯ID,基本信息表外键ID
     *
     * @return DP_GUID - ä¸­é—´ç»“果基本信息ID,基本信息表外键ID
     */
    public String getDpGuid() {
        return dpGuid;
    }
    /**
     * è®¾ç½®ä¸­é—´ç»“果基本信息ID,基本信息表外键ID
     *
     * @param dpGuid ä¸­é—´ç»“果基本信息ID,基本信息表外键ID
     */
    public void setDpGuid(String dpGuid) {
        this.dpGuid = dpGuid == null ? null : dpGuid.trim();
    }
    /**
     * èŽ·å–è¡¨å•ç¼–å·
     *
     * @return Form_Index - è¡¨å•编号
     */
    public Integer getFormIndex() {
        return formIndex;
    }
    /**
     * è®¾ç½®è¡¨å•编号
     *
     * @param formIndex è¡¨å•编号
     */
    public void setFormIndex(Integer formIndex) {
        this.formIndex = formIndex;
    }
    /**
     * èŽ·å–å”¯ä¸€åºå·
     *
     * @return Scene_Index - å”¯ä¸€åºå·
     */
    public Integer getSceneIndex() {
        return sceneIndex;
    }
    /**
     * è®¾ç½®å”¯ä¸€åºå·
     *
     * @param sceneIndex å”¯ä¸€åºå·
     */
    public void setSceneIndex(Integer sceneIndex) {
        this.sceneIndex = sceneIndex;
    }
    /**
     * èŽ·å–åœºæ™¯ç±»åž‹
     *
     * @return Scene_Type - åœºæ™¯ç±»åž‹
     */
    public String getSceneType() {
        return sceneType;
    }
    /**
     * è®¾ç½®åœºæ™¯ç±»åž‹
     *
     * @param sceneType åœºæ™¯ç±»åž‹
     */
    public void setSceneType(String sceneType) {
        this.sceneType = sceneType == null ? null : sceneType.trim();
    }
    /**
     * èŽ·å–åœºæ™¯åç§°
     *
     * @return Scene_Name - åœºæ™¯åç§°
     */
    public String getSceneName() {
        return sceneName;
    }
    /**
     * è®¾ç½®åœºæ™¯åç§°
     *
     * @param sceneName åœºæ™¯åç§°
     */
    public void setSceneName(String sceneName) {
        this.sceneName = sceneName == null ? null : sceneName.trim();
    }
    /**
     * èŽ·å–ç›‘ç®¡æ—¶é—´
     *
     * @return Inspection_Time - ç›‘管时间
     */
    public Date getInspectionTime() {
        return inspectionTime;
    }
    /**
     * è®¾ç½®ç›‘管时间
     *
     * @param inspectionTime ç›‘管时间
     */
    public void setInspectionTime(Date inspectionTime) {
        this.inspectionTime = inspectionTime;
    }
    /**
     * èŽ·å–å·¡æŸ¥äººå‘˜
     *
     * @return Executors - å·¡æŸ¥äººå‘˜
     */
    public String getExecutors() {
        return executors;
    }
    /**
     * è®¾ç½®å·¡æŸ¥äººå‘˜
     *
     * @param executors å·¡æŸ¥äººå‘˜
     */
    public void setExecutors(String executors) {
        this.executors = executors == null ? null : executors.trim();
    }
    /**
     * èŽ·å–é—®é¢˜ç±»åž‹
     *
     * @return Problem_Type - é—®é¢˜ç±»åž‹
     */
    public String getProblemType() {
        return problemType;
    }
    /**
     * è®¾ç½®é—®é¢˜ç±»åž‹
     *
     * @param problemType é—®é¢˜ç±»åž‹
     */
    public void setProblemType(String problemType) {
        this.problemType = problemType == null ? null : problemType.trim();
    }
    /**
     * èŽ·å–é—®é¢˜æè¿°
     *
     * @return Problem_Description - é—®é¢˜æè¿°
     */
    public String getProblemDescription() {
        return problemDescription;
    }
    /**
     * è®¾ç½®é—®é¢˜æè¿°
     *
     * @param problemDescription é—®é¢˜æè¿°
     */
    public void setProblemDescription(String problemDescription) {
        this.problemDescription = problemDescription == null ? null : problemDescription.trim();
    }
    /**
     * èŽ·å–é—®é¢˜ä½ç½®
     *
     * @return Problem_Location - é—®é¢˜ä½ç½®
     */
    public String getProblemLocation() {
        return problemLocation;
    }
    /**
     * è®¾ç½®é—®é¢˜ä½ç½®
     *
     * @param problemLocation é—®é¢˜ä½ç½®
     */
    public void setProblemLocation(String problemLocation) {
        this.problemLocation = problemLocation == null ? null : problemLocation.trim();
    }
    /**
     * èŽ·å–é—®é¢˜æ•°
     *
     * @return Problem_Num - é—®é¢˜æ•°
     */
    public Integer getProblemNum() {
        return problemNum;
    }
    /**
     * è®¾ç½®é—®é¢˜æ•°
     *
     * @param problemNum é—®é¢˜æ•°
     */
    public void setProblemNum(Integer problemNum) {
        this.problemNum = problemNum;
    }
    /**
     * èŽ·å–æ•´æ”¹æ—¶é—´
     *
     * @return Change_Time - æ•´æ”¹æ—¶é—´
     */
    public String getChangeTime() {
        return changeTime;
    }
    /**
     * è®¾ç½®æ•´æ”¹æ—¶é—´
     *
     * @param changeTime æ•´æ”¹æ—¶é—´
     */
    public void setChangeTime(String changeTime) {
        this.changeTime = changeTime == null ? null : changeTime.trim();
    }
    /**
     * èŽ·å–æ•´æ”¹æƒ…å†µ
     *
     * @return Problem_Changed - æ•´æ”¹æƒ…况
     */
    public String getProblemChanged() {
        return problemChanged;
    }
    /**
     * è®¾ç½®æ•´æ”¹æƒ…况
     *
     * @param problemChanged æ•´æ”¹æƒ…况
     */
    public void setProblemChanged(String problemChanged) {
        this.problemChanged = problemChanged == null ? null : problemChanged.trim();
    }
    /**
     * èŽ·å–æ•´æ”¹é—®é¢˜
     *
     * @return Changed_Problem - æ•´æ”¹é—®é¢˜
     */
    public String getChangedProblem() {
        return changedProblem;
    }
    /**
     * è®¾ç½®æ•´æ”¹é—®é¢˜
     *
     * @param changedProblem æ•´æ”¹é—®é¢˜
     */
    public void setChangedProblem(String changedProblem) {
        this.changedProblem = changedProblem == null ? null : changedProblem.trim();
    }
    /**
     * èŽ·å–æ•´æ”¹æ•°
     *
     * @return Changed_Num - æ•´æ”¹æ•°
     */
    public Integer getChangedNum() {
        return changedNum;
    }
    /**
     * è®¾ç½®æ•´æ”¹æ•°
     *
     * @param changedNum æ•´æ”¹æ•°
     */
    public void setChangedNum(Integer changedNum) {
        this.changedNum = changedNum;
    }
    /**
     * èŽ·å–æœªæ•´æ”¹é—®é¢˜
     *
     * @return Unchanged_Problems - æœªæ•´æ”¹é—®é¢˜
     */
    public String getUnchangedProblems() {
        return unchangedProblems;
    }
    /**
     * è®¾ç½®æœªæ•´æ”¹é—®é¢˜
     *
     * @param unchangedProblems æœªæ•´æ”¹é—®é¢˜
     */
    public void setUnchangedProblems(String unchangedProblems) {
        this.unchangedProblems = unchangedProblems == null ? null : unchangedProblems.trim();
    }
    /**
     * èŽ·å–æœªæ•´æ”¹æ•°
     *
     * @return UnChanged_Num - æœªæ•´æ”¹æ•°
     */
    public Integer getUnchangedNum() {
        return unchangedNum;
    }
    /**
     * è®¾ç½®æœªæ•´æ”¹æ•°
     *
     * @param unchangedNum æœªæ•´æ”¹æ•°
     */
    public void setUnchangedNum(Integer unchangedNum) {
        this.unchangedNum = unchangedNum;
    }
    /**
     * èŽ·å–é—®é¢˜æ•´æ”¹çŽ‡
     *
     * @return Change_Percent - é—®é¢˜æ•´æ”¹çއ
     */
    public BigDecimal getChangePercent() {
        return changePercent;
    }
    /**
     * è®¾ç½®é—®é¢˜æ•´æ”¹çއ
     *
     * @param changePercent é—®é¢˜æ•´æ”¹çއ
     */
    public void setChangePercent(BigDecimal changePercent) {
        this.changePercent = changePercent;
    }
    /**
     * èŽ·å–å®¡æ ¸æƒ…å†µ
     *
     * @return Check_Status - å®¡æ ¸æƒ…况
     */
    public String getCheckStatus() {
        return checkStatus;
    }
    /**
     * è®¾ç½®å®¡æ ¸æƒ…况
     *
     * @param checkStatus å®¡æ ¸æƒ…况
     */
    public void setCheckStatus(String checkStatus) {
        this.checkStatus = checkStatus == null ? null : checkStatus.trim();
    }
    /**
     * èŽ·å–é—®é¢˜å®¡æ ¸æ—¶é—´
     *
     * @return Pro_Check_Time - é—®é¢˜å®¡æ ¸æ—¶é—´
     */
    public String getProCheckTime() {
        return proCheckTime;
    }
    /**
     * è®¾ç½®é—®é¢˜å®¡æ ¸æ—¶é—´
     *
     * @param proCheckTime é—®é¢˜å®¡æ ¸æ—¶é—´
     */
    public void setProCheckTime(String proCheckTime) {
        this.proCheckTime = proCheckTime == null ? null : proCheckTime.trim();
    }
    /**
     * èŽ·å–æ•´æ”¹å®¡æ ¸æ—¶é—´
     *
     * @return Change_Check_Time - æ•´æ”¹å®¡æ ¸æ—¶é—´
     */
    public String getChangeCheckTime() {
        return changeCheckTime;
    }
    /**
     * è®¾ç½®æ•´æ”¹å®¡æ ¸æ—¶é—´
     *
     * @param changeCheckTime æ•´æ”¹å®¡æ ¸æ—¶é—´
     */
    public void setChangeCheckTime(String changeCheckTime) {
        this.changeCheckTime = changeCheckTime == null ? null : changeCheckTime.trim();
    }
    /**
     * èŽ·å–é—®é¢˜å®¡æ ¸æ•°
     *
     * @return Pro_Check_Num - é—®é¢˜å®¡æ ¸æ•°
     */
    public Integer getProCheckNum() {
        return proCheckNum;
    }
    /**
     * è®¾ç½®é—®é¢˜å®¡æ ¸æ•°
     *
     * @param proCheckNum é—®é¢˜å®¡æ ¸æ•°
     */
    public void setProCheckNum(Integer proCheckNum) {
        this.proCheckNum = proCheckNum;
    }
    /**
     * èŽ·å–é—®é¢˜å®¡æ ¸å æ¯”
     *
     * @return Pro_Check_Per - é—®é¢˜å®¡æ ¸å æ¯”
     */
    public BigDecimal getProCheckPer() {
        return proCheckPer;
    }
    /**
     * è®¾ç½®é—®é¢˜å®¡æ ¸å æ¯”
     *
     * @param proCheckPer é—®é¢˜å®¡æ ¸å æ¯”
     */
    public void setProCheckPer(BigDecimal proCheckPer) {
        this.proCheckPer = proCheckPer;
    }
    /**
     * èŽ·å–æ•´æ”¹å®¡æ ¸æ•°
     *
     * @return Change_Check_Num - æ•´æ”¹å®¡æ ¸æ•°
     */
    public Integer getChangeCheckNum() {
        return changeCheckNum;
    }
    /**
     * è®¾ç½®æ•´æ”¹å®¡æ ¸æ•°
     *
     * @param changeCheckNum æ•´æ”¹å®¡æ ¸æ•°
     */
    public void setChangeCheckNum(Integer changeCheckNum) {
        this.changeCheckNum = changeCheckNum;
    }
    /**
     * èŽ·å–æ•´æ”¹å®¡æ ¸å æ¯”
     *
     * @return Change_Check_Per - æ•´æ”¹å®¡æ ¸å æ¯”
     */
    public BigDecimal getChangeCheckPer() {
        return changeCheckPer;
    }
    /**
     * è®¾ç½®æ•´æ”¹å®¡æ ¸å æ¯”
     *
     * @param changeCheckPer æ•´æ”¹å®¡æ ¸å æ¯”
     */
    public void setChangeCheckPer(BigDecimal changeCheckPer) {
        this.changeCheckPer = changeCheckPer;
    }
    /**
     * èŽ·å–å°è´¦æäº¤ç™¾åˆ†æ¯”
     *
     * @return Ledger_Percent - å°è´¦æäº¤ç™¾åˆ†æ¯”
     */
    public BigDecimal getLedgerPercent() {
        return ledgerPercent;
    }
    /**
     * è®¾ç½®å°è´¦æäº¤ç™¾åˆ†æ¯”
     *
     * @param ledgerPercent å°è´¦æäº¤ç™¾åˆ†æ¯”
     */
    public void setLedgerPercent(BigDecimal ledgerPercent) {
        this.ledgerPercent = ledgerPercent;
    }
    /**
     * èŽ·å–å°è´¦æäº¤æ—¶é—´
     *
     * @return Ledger_Submit_Date - å°è´¦æäº¤æ—¶é—´
     */
    public Date getLedgerSubmitDate() {
        return ledgerSubmitDate;
    }
    /**
     * è®¾ç½®å°è´¦æäº¤æ—¶é—´
     *
     * @param ledgerSubmitDate å°è´¦æäº¤æ—¶é—´
     */
    public void setLedgerSubmitDate(Date ledgerSubmitDate) {
        this.ledgerSubmitDate = ledgerSubmitDate;
    }
    /**
     * èŽ·å–å°è´¦å®¡æ ¸æ—¶é—´
     *
     * @return Ledger_Check_Time - å°è´¦å®¡æ ¸æ—¶é—´
     */
    public Date getLedgerCheckTime() {
        return ledgerCheckTime;
    }
    /**
     * è®¾ç½®å°è´¦å®¡æ ¸æ—¶é—´
     *
     * @param ledgerCheckTime å°è´¦å®¡æ ¸æ—¶é—´
     */
    public void setLedgerCheckTime(Date ledgerCheckTime) {
        this.ledgerCheckTime = ledgerCheckTime;
    }
    /**
     * èŽ·å–æ•´æ”¹è·Ÿè¸ªæé†’
     *
     * @return Change_Tracking_Reminder - æ•´æ”¹è·Ÿè¸ªæé†’
     */
    public String getChangeTrackingReminder() {
        return changeTrackingReminder;
    }
    /**
     * è®¾ç½®æ•´æ”¹è·Ÿè¸ªæé†’
     *
     * @param changeTrackingReminder æ•´æ”¹è·Ÿè¸ªæé†’
     */
    public void setChangeTrackingReminder(String changeTrackingReminder) {
        this.changeTrackingReminder = changeTrackingReminder == null ? null : changeTrackingReminder.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/ds1/entity/DataProductTownProAnalysis.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,465 @@
package cn.flightfeather.supervision.domain.ds1.entity;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
@Table(name = "sm_t_data_product_townproanalysis")
public class DataProductTownProAnalysis {
    /**
     * ä¸»é”®ID
     */
    @Id
    @Column(name = "ID")
    private Integer id;
    /**
     * ä¸­é—´ç»“果基本信息ID
     */
    @Column(name = "DP_GUID")
    private String dpGuid;
    /**
     * è¡—镇序号
     */
    @Column(name = "Form_Index")
    private Integer formIndex;
    /**
     * è¡—镇/工业区名称
     */
    @Column(name = "Town_Name")
    private String townName;
    /**
     * åœºæ™¯ç±»åˆ«
     */
    @Column(name = "Scene_Type")
    private String sceneType;
    /**
     * åœºæ™¯æ•°
     */
    @Column(name = "Scene_Count")
    private Integer sceneCount;
    /**
     * å®Œå·¥ã€æœªæ–½å·¥ã€åœå·¥æˆ–停业、关闭等场景数
     */
    @Column(name = "Inactive_Scene_Count")
    private Integer inactiveSceneCount;
    /**
     * æ–½å·¥ä¸­ã€è¿è¥ä¸­æ€»æ•°
     */
    @Column(name = "Active_Scene_Count")
    private Integer activeSceneCount;
    /**
     * æ•´æ”¹å•位数
     */
    @Column(name = "Change_Scene_Count")
    private Integer changeSceneCount;
    /**
     * æ•´æ”¹å•位占比
     */
    @Column(name = "Change_Scene_Per")
    private BigDecimal changeScenePer;
    /**
     * é—®é¢˜æ•°
     */
    @Column(name = "Pro_Count")
    private Integer proCount;
    /**
     * é—®é¢˜å æ¯”
     */
    @Column(name = "Pro_Per")
    private BigDecimal proPer;
    /**
     * æ•´æ”¹æ•°
     */
    @Column(name = "Change_Count")
    private Integer changeCount;
    /**
     * æ•´æ”¹çއ
     */
    @Column(name = "Change_Per")
    private BigDecimal changePer;
    /**
     * æ•´æ”¹å•位比排名
     */
    @Column(name = "Change_Scene_Rank")
    private Integer changeSceneRank;
    /**
     * é—®é¢˜æ•´æ”¹çŽ‡æŽ’å
     */
    @Column(name = "Pro_Change_Rank")
    private Integer proChangeRank;
    /**
     * æ‹Ÿåˆ—入重点监管数
     */
    @Column(name = "Focus_Scene_Count")
    private Integer focusSceneCount;
    /**
     * æ‹Ÿåˆ—入重点监管占比
     */
    @Column(name = "Focus_Scene_Per")
    private BigDecimal focusScenePer;
    /**
     * åˆ›å»ºæ—¶é—´
     */
    @Column(name = "Create_Time")
    private Date createTime;
    /**
     * èŽ·å–ä¸»é”®ID
     *
     * @return ID - ä¸»é”®ID
     */
    public Integer getId() {
        return id;
    }
    /**
     * è®¾ç½®ä¸»é”®ID
     *
     * @param id ä¸»é”®ID
     */
    public void setId(Integer id) {
        this.id = id;
    }
    /**
     * èŽ·å–ä¸­é—´ç»“æžœåŸºæœ¬ä¿¡æ¯ID
     *
     * @return DP_GUID - ä¸­é—´ç»“果基本信息ID
     */
    public String getDpGuid() {
        return dpGuid;
    }
    /**
     * è®¾ç½®ä¸­é—´ç»“果基本信息ID
     *
     * @param dpGuid ä¸­é—´ç»“果基本信息ID
     */
    public void setDpGuid(String dpGuid) {
        this.dpGuid = dpGuid == null ? null : dpGuid.trim();
    }
    /**
     * èŽ·å–è¡—é•‡åºå·
     *
     * @return Form_Index - è¡—镇序号
     */
    public Integer getFormIndex() {
        return formIndex;
    }
    /**
     * è®¾ç½®è¡—镇序号
     *
     * @param formIndex è¡—镇序号
     */
    public void setFormIndex(Integer formIndex) {
        this.formIndex = formIndex;
    }
    /**
     * èŽ·å–è¡—é•‡/工业区名称
     *
     * @return Town_Name - è¡—镇/工业区名称
     */
    public String getTownName() {
        return townName;
    }
    /**
     * è®¾ç½®è¡—镇/工业区名称
     *
     * @param townName è¡—镇/工业区名称
     */
    public void setTownName(String townName) {
        this.townName = townName == null ? null : townName.trim();
    }
    /**
     * èŽ·å–åœºæ™¯ç±»åˆ«
     *
     * @return Scene_Type - åœºæ™¯ç±»åˆ«
     */
    public String getSceneType() {
        return sceneType;
    }
    /**
     * è®¾ç½®åœºæ™¯ç±»åˆ«
     *
     * @param sceneType åœºæ™¯ç±»åˆ«
     */
    public void setSceneType(String sceneType) {
        this.sceneType = sceneType == null ? null : sceneType.trim();
    }
    /**
     * èŽ·å–åœºæ™¯æ•°
     *
     * @return Scene_Count - åœºæ™¯æ•°
     */
    public Integer getSceneCount() {
        return sceneCount;
    }
    /**
     * è®¾ç½®åœºæ™¯æ•°
     *
     * @param sceneCount åœºæ™¯æ•°
     */
    public void setSceneCount(Integer sceneCount) {
        this.sceneCount = sceneCount;
    }
    /**
     * èŽ·å–å®Œå·¥ã€æœªæ–½å·¥ã€åœå·¥æˆ–åœä¸šã€å…³é—­ç­‰åœºæ™¯æ•°
     *
     * @return Inactive_Scene_Count - å®Œå·¥ã€æœªæ–½å·¥ã€åœå·¥æˆ–停业、关闭等场景数
     */
    public Integer getInactiveSceneCount() {
        return inactiveSceneCount;
    }
    /**
     * è®¾ç½®å®Œå·¥ã€æœªæ–½å·¥ã€åœå·¥æˆ–停业、关闭等场景数
     *
     * @param inactiveSceneCount å®Œå·¥ã€æœªæ–½å·¥ã€åœå·¥æˆ–停业、关闭等场景数
     */
    public void setInactiveSceneCount(Integer inactiveSceneCount) {
        this.inactiveSceneCount = inactiveSceneCount;
    }
    /**
     * èŽ·å–æ–½å·¥ä¸­ã€è¿è¥ä¸­æ€»æ•°
     *
     * @return Active_Scene_Count - æ–½å·¥ä¸­ã€è¿è¥ä¸­æ€»æ•°
     */
    public Integer getActiveSceneCount() {
        return activeSceneCount;
    }
    /**
     * è®¾ç½®æ–½å·¥ä¸­ã€è¿è¥ä¸­æ€»æ•°
     *
     * @param activeSceneCount æ–½å·¥ä¸­ã€è¿è¥ä¸­æ€»æ•°
     */
    public void setActiveSceneCount(Integer activeSceneCount) {
        this.activeSceneCount = activeSceneCount;
    }
    /**
     * èŽ·å–æ•´æ”¹å•ä½æ•°
     *
     * @return Change_Scene_Count - æ•´æ”¹å•位数
     */
    public Integer getChangeSceneCount() {
        return changeSceneCount;
    }
    /**
     * è®¾ç½®æ•´æ”¹å•位数
     *
     * @param changeSceneCount æ•´æ”¹å•位数
     */
    public void setChangeSceneCount(Integer changeSceneCount) {
        this.changeSceneCount = changeSceneCount;
    }
    /**
     * èŽ·å–æ•´æ”¹å•ä½å æ¯”
     *
     * @return Change_Scene_Per - æ•´æ”¹å•位占比
     */
    public BigDecimal getChangeScenePer() {
        return changeScenePer;
    }
    /**
     * è®¾ç½®æ•´æ”¹å•位占比
     *
     * @param changeScenePer æ•´æ”¹å•位占比
     */
    public void setChangeScenePer(BigDecimal changeScenePer) {
        this.changeScenePer = changeScenePer;
    }
    /**
     * èŽ·å–é—®é¢˜æ•°
     *
     * @return Pro_Count - é—®é¢˜æ•°
     */
    public Integer getProCount() {
        return proCount;
    }
    /**
     * è®¾ç½®é—®é¢˜æ•°
     *
     * @param proCount é—®é¢˜æ•°
     */
    public void setProCount(Integer proCount) {
        this.proCount = proCount;
    }
    /**
     * èŽ·å–é—®é¢˜å æ¯”
     *
     * @return Pro_Per - é—®é¢˜å æ¯”
     */
    public BigDecimal getProPer() {
        return proPer;
    }
    /**
     * è®¾ç½®é—®é¢˜å æ¯”
     *
     * @param proPer é—®é¢˜å æ¯”
     */
    public void setProPer(BigDecimal proPer) {
        this.proPer = proPer;
    }
    /**
     * èŽ·å–æ•´æ”¹æ•°
     *
     * @return Change_Count - æ•´æ”¹æ•°
     */
    public Integer getChangeCount() {
        return changeCount;
    }
    /**
     * è®¾ç½®æ•´æ”¹æ•°
     *
     * @param changeCount æ•´æ”¹æ•°
     */
    public void setChangeCount(Integer changeCount) {
        this.changeCount = changeCount;
    }
    /**
     * èŽ·å–æ•´æ”¹çŽ‡
     *
     * @return Change_Per - æ•´æ”¹çއ
     */
    public BigDecimal getChangePer() {
        return changePer;
    }
    /**
     * è®¾ç½®æ•´æ”¹çއ
     *
     * @param changePer æ•´æ”¹çއ
     */
    public void setChangePer(BigDecimal changePer) {
        this.changePer = changePer;
    }
    /**
     * èŽ·å–æ•´æ”¹å•ä½æ¯”æŽ’å
     *
     * @return Change_Scene_Rank - æ•´æ”¹å•位比排名
     */
    public Integer getChangeSceneRank() {
        return changeSceneRank;
    }
    /**
     * è®¾ç½®æ•´æ”¹å•位比排名
     *
     * @param changeSceneRank æ•´æ”¹å•位比排名
     */
    public void setChangeSceneRank(Integer changeSceneRank) {
        this.changeSceneRank = changeSceneRank;
    }
    /**
     * èŽ·å–é—®é¢˜æ•´æ”¹çŽ‡æŽ’å
     *
     * @return Pro_Change_Rank - é—®é¢˜æ•´æ”¹çŽ‡æŽ’å
     */
    public Integer getProChangeRank() {
        return proChangeRank;
    }
    /**
     * è®¾ç½®é—®é¢˜æ•´æ”¹çŽ‡æŽ’å
     *
     * @param proChangeRank é—®é¢˜æ•´æ”¹çŽ‡æŽ’å
     */
    public void setProChangeRank(Integer proChangeRank) {
        this.proChangeRank = proChangeRank;
    }
    /**
     * èŽ·å–æ‹Ÿåˆ—å…¥é‡ç‚¹ç›‘ç®¡æ•°
     *
     * @return Focus_Scene_Count - æ‹Ÿåˆ—入重点监管数
     */
    public Integer getFocusSceneCount() {
        return focusSceneCount;
    }
    /**
     * è®¾ç½®æ‹Ÿåˆ—入重点监管数
     *
     * @param focusSceneCount æ‹Ÿåˆ—入重点监管数
     */
    public void setFocusSceneCount(Integer focusSceneCount) {
        this.focusSceneCount = focusSceneCount;
    }
    /**
     * èŽ·å–æ‹Ÿåˆ—å…¥é‡ç‚¹ç›‘ç®¡å æ¯”
     *
     * @return Focus_Scene_Per - æ‹Ÿåˆ—入重点监管占比
     */
    public BigDecimal getFocusScenePer() {
        return focusScenePer;
    }
    /**
     * è®¾ç½®æ‹Ÿåˆ—入重点监管占比
     *
     * @param focusScenePer æ‹Ÿåˆ—入重点监管占比
     */
    public void setFocusScenePer(BigDecimal focusScenePer) {
        this.focusScenePer = focusScenePer;
    }
    /**
     * èŽ·å–åˆ›å»ºæ—¶é—´
     *
     * @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/ds1/mapper/DataProductMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package cn.flightfeather.supervision.domain.ds1.mapper;
import cn.flightfeather.supervision.domain.ds1.entity.DataProduct;
import cn.flightfeather.supervision.domain.util.MyMapper;
public interface DataProductMapper extends MyMapper<DataProduct> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DataProductProDetailMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
package cn.flightfeather.supervision.domain.ds1.mapper
import cn.flightfeather.supervision.domain.ds1.entity.DataProductProDetail
import cn.flightfeather.supervision.domain.util.MyMapper
interface DataProductProDetailMapper : MyMapper<DataProductProDetail> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DataProductTownProAnalysisMapper.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package cn.flightfeather.supervision.domain.ds1.mapper
import cn.flightfeather.supervision.domain.ds1.entity.DataProductTownProAnalysis
import cn.flightfeather.supervision.domain.util.MyMapper
import tk.mybatis.mapper.common.Mapper
interface DataProductTownProAnalysisMapper : MyMapper<DataProductTownProAnalysis> {
}
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/DataProductRep.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,86 @@
package cn.flightfeather.supervision.domain.ds1.repository
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.*
import cn.flightfeather.supervision.domain.ds1.mapper.*
import org.apache.commons.lang3.ObjectUtils
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
import java.util.*
@Repository
class DataProductRep(
    private val dataProductMapper: DataProductMapper,
    private val dataProductProDetailMapper: DataProductProDetailMapper,
    private val dataProductTownProAnalysisMapper: DataProductTownProAnalysisMapper,
    private val provinceMapper: ProvinceMapper,
    private val townMapper: TownMapper,
    private val cityMapper: CityMapper,
    private val districtMapper: DistrictMapper
) {
    /**
     * æ’入数据产品中间结果基本信息和具体信息
     */
    fun insertDataProduct(dataProduct: DataProduct, specificEntities: List<Any>) {
        // æ ¹æ®ç±»åž‹æ’入指定数据库表
        if (specificEntities.isNotEmpty()) {
            when (specificEntities.first()::class) {
                DataProductProDetail::class -> {
                    (specificEntities as? List<DataProductProDetail>)?.let { let_it ->
                        specificEntities.forEach { for_it ->
                            for_it.dpGuid = dataProduct.guid
                        }
                        dataProduct.typeId = Constant.DataProductType.PRO_DETAIL_SUMMARY.value
                        insertProDetailSpecificInfo(let_it)
                    }
                }
                DataProductTownProAnalysis::class -> {
                    (specificEntities as? List<DataProductTownProAnalysis>)?.let { let_it ->
                        specificEntities.forEach { for_it ->
                            for_it.dpGuid = dataProduct.guid
                        }
                        dataProduct.typeId = Constant.DataProductType.PRO_ANALYSIS_SUMMARY.value
                        insertTownProAnalysisSpecificInfo(let_it)
                    }
                }
            }
        }
        insertDataProductBaseInfo(dataProduct)
    }
    private fun insertProDetailSpecificInfo(specificEntities: List<DataProductProDetail>) {
        dataProductProDetailMapper.insertList(specificEntities)
    }
    private fun insertTownProAnalysisSpecificInfo(specificEntities: List<DataProductTownProAnalysis>) {
        dataProductTownProAnalysisMapper.insertList(specificEntities)
    }
     private fun insertDataProductBaseInfo(dataProduct: DataProduct) {
         // è¡Œæ”¿åŒºåŸŸname填充
         if (dataProduct.townCode != null) {
             townMapper.selectByExample(Example(Town::class.java).apply {
                 createCriteria().andEqualTo("towncode", dataProduct.townCode)
             })?.takeIf { it.isNotEmpty() }?.get(0)?.let { dataProduct.townName = it.townname ?: "" }
         }
         if (dataProduct.provinceCode != null) {
             provinceMapper.selectByExample(Example(Province::class.java).apply {
                 createCriteria().andEqualTo("provincecode", dataProduct.provinceCode)
             })?.takeIf { it.isNotEmpty() }?.get(0)?.let { dataProduct.provinceName = it.provincename ?: "" }
         }
         if (dataProduct.cityCode != null) {
             cityMapper.selectByExample(Example(City::class.java).apply {
                 createCriteria().andEqualTo("citycode", dataProduct.cityCode)
             })?.takeIf { it.isNotEmpty() }?.get(0)?.let { dataProduct.cityName = it.cityname ?: "" }
         }
         if (dataProduct.districtCode != null) {
             districtMapper.selectByExample(Example(District::class.java).apply {
                 createCriteria().andEqualTo("districtcode", dataProduct.districtCode)
             })?.takeIf { it.isNotEmpty() }?.get(0)?.let { dataProduct.districtName = it.districtname ?: "" }
         }
         dataProduct.createTime = Date()
         dataProductMapper.insert(dataProduct)
    }
}
src/main/resources/mapper/ds1/DataProductMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
<?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.DataProductMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DataProduct" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="GUID" property="guid" jdbcType="VARCHAR" />
    <result column="Type_ID" property="typeId" jdbcType="TINYINT" />
    <result column="Task_GUID" property="taskGuid" jdbcType="VARCHAR" />
    <result column="Scene_Type_ID" property="sceneTypeId" jdbcType="TINYINT" />
    <result column="Province_Code" property="provinceCode" jdbcType="VARCHAR" />
    <result column="Province_Name" property="provinceName" jdbcType="VARCHAR" />
    <result column="City_Code" property="cityCode" jdbcType="VARCHAR" />
    <result column="City_Name" property="cityName" jdbcType="VARCHAR" />
    <result column="District_Code" property="districtCode" jdbcType="VARCHAR" />
    <result column="District_Name" property="districtName" jdbcType="VARCHAR" />
    <result column="Town_Code" property="townCode" jdbcType="VARCHAR" />
    <result column="Town_Name" property="townName" jdbcType="VARCHAR" />
    <result column="Start_Time" property="startTime" jdbcType="TIMESTAMP" />
    <result column="End_Time" property="endTime" jdbcType="TIMESTAMP" />
    <result column="Create_Time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="Update_Time" property="updateTime" jdbcType="TIMESTAMP" />
    <result column="Extension1" property="extension1" jdbcType="VARCHAR" />
    <result column="Extension2" property="extension2" jdbcType="VARCHAR" />
    <result column="Extension3" property="extension3" jdbcType="VARCHAR" />
    <result column="Remark" property="remark" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    GUID, Type_ID, Task_GUID, Scene_Type_ID, Province_Code, Province_Name, City_Code,
    City_Name, District_Code, District_Name, Town_Code, Town_Name, Start_Time, End_Time,
    Create_Time, Update_Time, Extension1, Extension2, Extension3, Remark
  </sql>
</mapper>
src/main/resources/mapper/ds1/DataProductProDetailMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
<?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.DataProductProDetailMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DataProductProDetail" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="ID" property="id" jdbcType="INTEGER" />
    <result column="DP_GUID" property="dpGuid" jdbcType="VARCHAR" />
    <result column="Form_Index" property="formIndex" jdbcType="INTEGER" />
    <result column="Scene_Index" property="sceneIndex" jdbcType="INTEGER" />
    <result column="Scene_Type" property="sceneType" jdbcType="VARCHAR" />
    <result column="Scene_Name" property="sceneName" jdbcType="VARCHAR" />
    <result column="Inspection_Time" property="inspectionTime" jdbcType="TIMESTAMP" />
    <result column="Executors" property="executors" jdbcType="VARCHAR" />
    <result column="Problem_Type" property="problemType" jdbcType="VARCHAR" />
    <result column="Problem_Description" property="problemDescription" jdbcType="VARCHAR" />
    <result column="Problem_Location" property="problemLocation" jdbcType="VARCHAR" />
    <result column="Problem_Num" property="problemNum" jdbcType="INTEGER" />
    <result column="Change_Time" property="changeTime" jdbcType="VARCHAR" />
    <result column="Problem_Changed" property="problemChanged" jdbcType="VARCHAR" />
    <result column="Changed_Problem" property="changedProblem" jdbcType="VARCHAR" />
    <result column="Changed_Num" property="changedNum" jdbcType="INTEGER" />
    <result column="Unchanged_Problems" property="unchangedProblems" jdbcType="VARCHAR" />
    <result column="UnChanged_Num" property="unchangedNum" jdbcType="INTEGER" />
    <result column="Change_Percent" property="changePercent" jdbcType="DECIMAL" />
    <result column="Check_Status" property="checkStatus" jdbcType="VARCHAR" />
    <result column="Pro_Check_Time" property="proCheckTime" jdbcType="VARCHAR" />
    <result column="Change_Check_Time" property="changeCheckTime" jdbcType="VARCHAR" />
    <result column="Pro_Check_Num" property="proCheckNum" jdbcType="INTEGER" />
    <result column="Pro_Check_Per" property="proCheckPer" jdbcType="DECIMAL" />
    <result column="Change_Check_Num" property="changeCheckNum" jdbcType="INTEGER" />
    <result column="Change_Check_Per" property="changeCheckPer" jdbcType="DECIMAL" />
    <result column="Ledger_Percent" property="ledgerPercent" jdbcType="DECIMAL" />
    <result column="Ledger_Submit_Date" property="ledgerSubmitDate" jdbcType="TIMESTAMP" />
    <result column="Ledger_Check_Time" property="ledgerCheckTime" jdbcType="TIMESTAMP" />
    <result column="Change_Tracking_Reminder" property="changeTrackingReminder" jdbcType="VARCHAR" />
    <result column="Create_Time" property="createTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    ID, DP_GUID, Form_Index, Scene_Index, Scene_Type, Scene_Name, Inspection_Time, Executors,
    Problem_Type, Problem_Description, Problem_Location, Problem_Num, Change_Time, Problem_Changed,
    Changed_Problem, Changed_Num, Unchanged_Problems, UnChanged_Num, Change_Percent,
    Check_Status, Pro_Check_Time, Change_Check_Time, Pro_Check_Num, Pro_Check_Per, Change_Check_Num,
    Change_Check_Per, Ledger_Percent, Ledger_Submit_Date, Ledger_Check_Time, Change_Tracking_Reminder,
    Create_Time
  </sql>
</mapper>
src/main/resources/mapper/ds1/DataProductTownProAnalysisMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
<?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.DataProductTownProAnalysisMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DataProductTownProAnalysis" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="ID" property="id" jdbcType="INTEGER" />
    <result column="DP_GUID" property="dpGuid" jdbcType="VARCHAR" />
    <result column="Form_Index" property="formIndex" jdbcType="INTEGER" />
    <result column="Town_Name" property="townName" jdbcType="VARCHAR" />
    <result column="Scene_Type" property="sceneType" jdbcType="VARCHAR" />
    <result column="Scene_Count" property="sceneCount" jdbcType="INTEGER" />
    <result column="Inactive_Scene_Count" property="inactiveSceneCount" jdbcType="INTEGER" />
    <result column="Active_Scene_Count" property="activeSceneCount" jdbcType="INTEGER" />
    <result column="Change_Scene_Count" property="changeSceneCount" jdbcType="INTEGER" />
    <result column="Change_Scene_Per" property="changeScenePer" jdbcType="DECIMAL" />
    <result column="Pro_Count" property="proCount" jdbcType="INTEGER" />
    <result column="Pro_Per" property="proPer" jdbcType="DECIMAL" />
    <result column="Change_Count" property="changeCount" jdbcType="INTEGER" />
    <result column="Change_Per" property="changePer" jdbcType="DECIMAL" />
    <result column="Change_Scene_Rank" property="changeSceneRank" jdbcType="INTEGER" />
    <result column="Pro_Change_Rank" property="proChangeRank" jdbcType="INTEGER" />
    <result column="Focus_Scene_Count" property="focusSceneCount" jdbcType="INTEGER" />
    <result column="Focus_Scene_Per" property="focusScenePer" jdbcType="DECIMAL" />
    <result column="Create_Time" property="createTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    ID, DP_GUID, Form_Index, Town_Name, Scene_Type, Scene_Count, Inactive_Scene_Count,
    Active_Scene_Count, Change_Scene_Count, Change_Scene_Per, Pro_Count, Pro_Per, Change_Count,
    Change_Per, Change_Scene_Rank, Pro_Change_Rank, Focus_Scene_Count, Focus_Scene_Per,
    Create_Time
  </sql>
</mapper>