src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDbMapper.kt
@@ -28,5 +28,6 @@ val userMapMapper: UserMapMapper, val townMapper: TownMapper, val restaurantBaseInfoMapper: RestaurantBaseInfoMapper, val vehicleBaseInfoMapper: VehicleBaseInfoMapper val vehicleBaseInfoMapper: VehicleBaseInfoMapper, val dustDataResultMapper: DustDataResultMapper ) src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt
@@ -24,6 +24,10 @@ enum class RuleType(val value: Byte, val text: String){ STANDARD(1,"è§èæ§"), SCORE(2,"è¯å") } //è§èæ§ç级 enum class EvaluationLevel(val value: Byte, val text: String){ A(1,"è§è"), B(2,"åºæ¬è§è"), C(3,"ä¸è§è"), D(4,"严éä¸è§è") } //ä»»å¡ç¶æ enum class TaskProgress(val value: String, val text: String){ RUNINGSTATUS1("1","æªæ§è¡"), src/main/kotlin/cn/flightfeather/supervision/common/utils/QueryByCache.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,26 @@ package cn.flightfeather.supervision.common.utils /** * ç¼åæ¥è¯¢å·¥å ·ç±» * @date 2025/9/15 * @author feiyu02 */ object QueryByCache { /** * ç¼åæ¥è¯¢ * @param cache ç¼åè·åæ¹æ³ * @param calculate è®¡ç®æ¹æ³ * @param save ç¼åä¿åæ¹æ³ * @return */ fun <T> queryCache(cache: () -> T?, calculate: () -> T, save: (t: T) -> Unit): T { val cacheData = cache.invoke() if (cacheData != null) { return cacheData } val calculateData = calculate.invoke() save.invoke(calculateData) return calculateData } } src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProdBaseService.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,31 @@ package cn.flightfeather.supervision.lightshare.service import cn.flightfeather.supervision.lightshare.vo.dataprod.* /** * åºç¡æ°æ®äº§åæå¡æ¥å£ * @date 2025/9/15 * @author feiyu02 */ interface DataProdBaseService { /** * è·åæ°æ®äº§ååºæ¯ä¿¡æ¯ */ fun getSceneInfo(queryOpt: QueryOpt): List<DPSceneInfo> /** * è·åæ°æ®äº§åè§èè¯ä¼°ä¿¡æ¯ */ fun getEvaluateInfo(queryOpt: QueryOpt): List<DPEvaluateInfo> /** * è·åæ°æ®äº§åå·¡æ¥ä¿¡æ¯ */ fun getInspectionInfo(queryOpt: QueryOpt): List<DPInspectionInfo> /** * è·åæ°æ®äº§åçæµæ°æ®ä¿¡æ¯ */ fun getMonitorDataInfo(queryOpt: QueryOpt): List<DPMonitorDataInfo> } src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProdFinalService.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,9 @@ package cn.flightfeather.supervision.lightshare.service /** * æç»æ°æ®äº§åæå¡æ¥å£ * @date 2025/9/15 * @author feiyu02 */ interface DataProdFinalService { } src/main/kotlin/cn/flightfeather/supervision/lightshare/service/DataProdMiddleService.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,35 @@ package cn.flightfeather.supervision.lightshare.service import cn.flightfeather.supervision.lightshare.vo.dataprod.middle.DPInspectionSummary import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt import cn.flightfeather.supervision.lightshare.vo.dataprod.middle.DPEvaluationByArea import cn.flightfeather.supervision.lightshare.vo.dataprod.middle.DPProblemCountByArea import cn.flightfeather.supervision.lightshare.vo.dataprod.middle.DPProblemTypeCount /** * ä¸é´æ°æ®äº§åæå¡æ¥å£ * @date 2025/9/15 * @author feiyu02 */ interface DataProdMiddleService { /** * å·¡æ¥å®ææ 嵿±æ» */ fun getInspectionSummary(queryOpt: QueryOpt): DPInspectionSummary /** * é®é¢åç±»æ±æ» */ fun getProblemTypeSummary(queryOpt: QueryOpt): List<DPProblemTypeCount> /** * ååºåååºæ¯é®é¢æ°é */ fun getProblemCountByArea(queryOpt: QueryOpt): List<DPProblemCountByArea> /** * ååºåè§èæ§æ åµ */ fun getEvaluationByArea(queryOpt: QueryOpt): List<DPEvaluationByArea> } src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,209 @@ package cn.flightfeather.supervision.lightshare.service.impl import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper import cn.flightfeather.supervision.common.utils.Constant import cn.flightfeather.supervision.common.utils.QueryByCache import cn.flightfeather.supervision.domain.ds1.entity.* import cn.flightfeather.supervision.lightshare.service.DataProdBaseService import cn.flightfeather.supervision.lightshare.vo.ProblemListVo import cn.flightfeather.supervision.lightshare.vo.dataprod.* import org.springframework.beans.BeanUtils import org.springframework.stereotype.Service import tk.mybatis.mapper.entity.Example /** * * @date 2025/9/15 * @author feiyu02 */ @Service class DataProdBaseServiceImpl(private val aopDbMapper: AopDbMapper) : DataProdBaseService { override fun getSceneInfo(queryOpt: QueryOpt): List<DPSceneInfo> { return QueryByCache.queryCache( cache = { return@queryCache null }, calculate = { val res = mutableListOf<DPSceneInfo>() val objList = aopDbMapper.monitorobjectversionMapper.selectByExample(Example(Monitorobjectversion::class.java).apply { createCriteria().andEqualTo("tid", queryOpt.topTaskId) }) if (objList.isEmpty()) return@queryCache emptyList<DPSceneInfo>() val guidList = objList.map { it.sguid } val baseScene = aopDbMapper.scenseMapper.selectByExample(Example(Scense::class.java).apply { createCriteria().andIn("guid", guidList) .andEqualTo("typeid", queryOpt.sceneTypeId) orderBy("typeid").orderBy("index") }) baseScene.groupBy { it.typeid }.forEach { (typeid, sceneList) -> when (typeid.toString()) { Constant.SceneType.TYPE1.value -> { val subScene = aopDbMapper.sceneConstructionSiteMapper.selectByExample(Example(SceneConstructionSite::class.java).apply { createCriteria().andIn("sGuid", sceneList.map { it.guid }) }) sceneList.forEach { val sub = subScene.find { sub-> sub.getsGuid() == it.guid } res.add(DPSceneInfo().apply { this.scene = it this.subScene = sub this.status = sub?.csStatus this.statusBool = sub?.csStatus == "建设ä¸" this.stage = sub?.siExtension1 }) } } Constant.SceneType.TYPE2.value -> { val subScene = aopDbMapper.sceneWharfMapper.selectByExample(Example(SceneWharf::class.java).apply { createCriteria().andIn("sGuid", sceneList.map { it.guid }) }) sceneList.forEach { val sub = subScene.find { sub-> sub.getsGuid() == it.guid } res.add(DPSceneInfo().apply { this.scene = it this.subScene = sub this.status = sub?.getwStatus() this.statusBool = sub?.getwStatus() == "è¥è¿ä¸" }) } } Constant.SceneType.TYPE3.value -> { val subScene = aopDbMapper.sceneMixingPlantMapper.selectByExample(Example(SceneMixingPlant::class.java).apply { createCriteria().andIn("sGuid", sceneList.map { it.guid }) }) sceneList.forEach { val sub = subScene.find { sub-> sub.getsGuid() == it.guid } res.add(DPSceneInfo().apply { this.scene = it this.subScene = sub this.status = sub?.mpStatus this.statusBool = sub?.mpStatus == "è¥è¿ä¸" }) } } Constant.SceneType.TYPE14.value -> { val subScene = aopDbMapper.sceneStorageYardMapper.selectByExample(Example (SceneStorageYard::class.java).apply { createCriteria().andIn("sGuid", sceneList.map { it.guid }) }) sceneList.forEach { val sub = subScene.find { sub-> sub.getsGuid() == it.guid } res.add(DPSceneInfo().apply { this.scene = it this.subScene = sub this.status = sub?.syStatus this.statusBool = sub?.syStatus == "è¥è¿ä¸" }) } } else -> { sceneList.forEach { res.add(DPSceneInfo().apply { this.scene = it }) } } } } return@queryCache res }, save = { } ) } override fun getEvaluateInfo(queryOpt: QueryOpt): List<DPEvaluateInfo> { return QueryByCache.queryCache( cache = { return@queryCache null }, calculate = { val res = mutableListOf<DPEvaluateInfo>() val subtaskList = aopDbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply { createCriteria().andEqualTo("tguid", queryOpt.topTaskId) }) if (subtaskList.isEmpty()) return@queryCache emptyList<DPEvaluateInfo>() aopDbMapper.evaluationMapper.selectByExample(Example(Evaluation::class.java).apply { createCriteria().andIn("stguid", subtaskList.map { it.stguid }) }).forEach { res.add(DPEvaluateInfo().apply { subTask = subtaskList.find { sub-> sub.stguid == it.stguid } evaluate = it val score = it.resultscorebef?.toIntOrNull() ?: -1 scoreLevel = when { score in 0..39 -> Constant.EvaluationLevel.D.text score in 40..89 -> Constant.EvaluationLevel.C.text score in 90..99 -> Constant.EvaluationLevel.B.text score >= 100 -> Constant.EvaluationLevel.A.text else -> "" } }) } return@queryCache res }, save = { } ) } override fun getInspectionInfo(queryOpt: QueryOpt): List<DPInspectionInfo> { return QueryByCache.queryCache( cache = { return@queryCache null }, calculate = { val res = mutableListOf<DPInspectionInfo>() val subtaskList = aopDbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply { createCriteria().andEqualTo("tguid", queryOpt.topTaskId) }) if (subtaskList.isEmpty()) return@queryCache emptyList<DPInspectionInfo>() val problemList = aopDbMapper.problemlistMapper.selectByExample(Example(Problemlist::class.java).apply { createCriteria().andIn("stguid", subtaskList.map { it.stguid }) }) val problemTypeList = aopDbMapper.problemtypeMapper.selectByExample(Example(Problemtype::class.java) .apply { createCriteria().andIn("guid", problemList.map { it.ptguid }) }) subtaskList.forEach { res.add(DPInspectionInfo().apply { subTask = it problems = problemList.filter { problem-> problem.stguid == it.stguid }.map { problem-> val problemListVo = ProblemListVo() BeanUtils.copyProperties(problem, problemListVo) problemListVo.apply { problemTypeList.find { type-> type.guid == problem.ptguid }?.let { typeid = it.typeid typename = it.typename } } // TODO åªä½æä»¶ } }) } return@queryCache res }, save = { } ) } override fun getMonitorDataInfo(queryOpt: QueryOpt): List<DPMonitorDataInfo> { return QueryByCache.queryCache( cache = { return@queryCache null }, calculate = { val res = mutableListOf<DPMonitorDataInfo>() val objList = aopDbMapper.monitorobjectversionMapper.selectByExample(Example(Monitorobjectversion::class.java).apply { createCriteria().andEqualTo("tid", queryOpt.topTaskId) }) if (objList.isEmpty()) return@queryCache res aopDbMapper.dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply { createCriteria().andBetween("drTime", queryOpt.startTime, queryOpt.endTime) .andIn("objectId", objList.map { it.sguid }) }).forEach { res.add(DPMonitorDataInfo().apply { data = it }) } return@queryCache res }, save = { } ) } } src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdMiddleServiceImpl.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,153 @@ package cn.flightfeather.supervision.lightshare.service.impl import cn.flightfeather.supervision.common.utils.Constant import cn.flightfeather.supervision.common.utils.QueryByCache import cn.flightfeather.supervision.domain.ds1.entity.SceneConstructionSite import cn.flightfeather.supervision.lightshare.service.DataProdBaseService import cn.flightfeather.supervision.lightshare.service.DataProdMiddleService import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt import cn.flightfeather.supervision.lightshare.vo.dataprod.middle.DPEvaluationByArea import cn.flightfeather.supervision.lightshare.vo.dataprod.middle.DPInspectionSummary import cn.flightfeather.supervision.lightshare.vo.dataprod.middle.DPProblemCountByArea import cn.flightfeather.supervision.lightshare.vo.dataprod.middle.DPProblemTypeCount import org.springframework.stereotype.Service /** * * @date 2025/9/15 * @author feiyu02 */ @Service class DataProdMiddleServiceImpl(private val dataProdBaseService: DataProdBaseService) : DataProdMiddleService { override fun getInspectionSummary(queryOpt: QueryOpt): DPInspectionSummary { return QueryByCache.queryCache( cache = { return@queryCache null }, calculate = { val res = DPInspectionSummary() val inspectionInfo = dataProdBaseService.getInspectionInfo(queryOpt) val sceneInfo = dataProdBaseService.getSceneInfo(queryOpt) res.sceneCount = sceneInfo.size res.pointCount = inspectionInfo.size res.reviewPointCount = inspectionInfo.size - inspectionInfo.distinctBy { it.subTask?.scenseid }.size sceneInfo.forEach { when (it.scene?.typeid.toString()) { // 对äºå»ºçå·¥å°ç±»åï¼æ ¹æ®å ¶csStatus夿æ¯å¦åå·¥æå®å·¥ Constant.SceneType.TYPE1.value -> { when ((it.subScene as SceneConstructionSite).csStatus) { "åå·¥" -> { res.stopSceneCount++ } "å®å·¥" -> { res.completeSceneCount++ } } } // 对äºå ¶ä»ç±»åï¼æ ¹æ®å ¶extension1ï¼ä»£è¡¨æ¯å¦ä¸çº¿ï¼å¤ææ¯å¦å®å·¥ else -> { if (it.scene?.extension1 != "1") { res.completeSceneCount++ } } } } return@queryCache res }, save = {} ) } override fun getProblemTypeSummary(queryOpt: QueryOpt): List<DPProblemTypeCount> { return QueryByCache.queryCache( cache = { return@queryCache null }, calculate = { val res = mutableListOf<DPProblemTypeCount>() val inspectionInfo = dataProdBaseService.getInspectionInfo(queryOpt) val allProblemList = inspectionInfo.flatMap { it.problems ?: emptyList() } allProblemList.groupBy { it.typeid }.forEach { (typeid, problemList) -> res.add(DPProblemTypeCount().apply { this.typeId = typeid this.typeName = problemList.firstOrNull()?.typename this.count = problemList.size this.ratio = problemList.size.toDouble() / allProblemList.size }) } return@queryCache res }, save = {} ) } override fun getProblemCountByArea(queryOpt: QueryOpt): List<DPProblemCountByArea> { return QueryByCache.queryCache( cache = { return@queryCache null }, calculate = { val res = mutableListOf<DPProblemCountByArea>() val inspectionInfo = dataProdBaseService.getInspectionInfo(queryOpt) inspectionInfo .groupBy { it.subTask?.provincecode + it.subTask?.citycode + it.subTask?.districtcode + it.subTask?.towncode } .forEach { (areaName, ins) -> val firstSubtask = ins.first().subTask val allProblemList = ins.flatMap { it.problems ?: emptyList() } res.add(DPProblemCountByArea().apply { this.provinceCode = firstSubtask?.provincecode this.provinceName = firstSubtask?.provincename this.cityCode = firstSubtask?.citycode this.cityName = firstSubtask?.cityname this.districtCode = firstSubtask?.districtcode this.districtName = firstSubtask?.districtname this.townCode = firstSubtask?.towncode this.townName = firstSubtask?.townname this.sceneCount = ins.distinctBy { it.subTask?.scenseid }.size this.problemCount = allProblemList.size this.ratio = problemCount.toDouble() / sceneCount }) } return@queryCache res }, save = {} ) } override fun getEvaluationByArea(queryOpt: QueryOpt): List<DPEvaluationByArea> { return QueryByCache.queryCache( cache = { return@queryCache null }, calculate = { val res = mutableListOf<DPEvaluationByArea>() val sceneInfo = dataProdBaseService.getSceneInfo(queryOpt) val evaluation = dataProdBaseService.getEvaluateInfo(queryOpt) evaluation .groupBy { it.subTask?.provincecode + it.subTask?.citycode + it.subTask?.districtcode + it.subTask?.towncode } .forEach { (areaName, evals) -> val firstSubtask = evals.first().subTask res.add(DPEvaluationByArea().apply { this.provinceCode = firstSubtask?.provincecode this.provinceName = firstSubtask?.provincename this.cityCode = firstSubtask?.citycode this.cityName = firstSubtask?.cityname this.districtCode = firstSubtask?.districtcode this.districtName = firstSubtask?.districtname this.townCode = firstSubtask?.towncode this.townName = firstSubtask?.townname this.validSceneCount = sceneInfo .filter { it.scene?.provincecode + it.scene?.citycode + it.scene?.districtcode + it.scene?.towncode == areaName && it.statusBool }.size this.evaluationCount = evals.size this.evalLevelACount = evals.count { it.scoreLevel == Constant.EvaluationLevel.A.text } this.evalLevelBCount = evals.count { it.scoreLevel == Constant.EvaluationLevel.B.text } this.evalLevelCCount = evals.count { it.scoreLevel == Constant.EvaluationLevel.C.text } this.evalLevelDCount = evals.count { it.scoreLevel == Constant.EvaluationLevel.D.text } this.evalLevelRatioAB = (this.evalLevelACount + this.evalLevelBCount).toDouble() / this.evaluationCount }) } return@queryCache res }, save = {} ) } } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ScenseVo.kt
@@ -74,16 +74,4 @@ var monitorNum: Int = 0 var inspectedNum: Int = 0 } /** * æ ¹æ®åºæ¯idæ¾å°åºæ¯ */ fun List<Scense?>.findByGuid(guid: String?): Scense? { this.forEach { if (it?.guid == guid) { return it } } return null } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPEvaluateInfo.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod import cn.flightfeather.supervision.domain.ds1.entity.Evaluation import cn.flightfeather.supervision.domain.ds1.entity.Subtask /** * æ°æ®äº§åè§èè¯ä¼°ä¿¡æ¯ç±» * ç¨äºå°è£ åºæ¯çè§èè¯ä¼°æ°æ®ï¼å æ¬åºæ¯åºæ¬ä¿¡æ¯åè¯ä¼°ç»æ * @date 2025/9/15 * @author feiyu02 */ class DPEvaluateInfo { var subTask:Subtask? = null var evaluate: Evaluation? = null var scoreLevel: String? = null } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPInspectionInfo.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod import cn.flightfeather.supervision.domain.ds1.entity.Problemlist import cn.flightfeather.supervision.domain.ds1.entity.Subtask import cn.flightfeather.supervision.lightshare.vo.ProblemListVo /** * æ°æ®äº§åç°åºå·¡æ¥ä¿¡æ¯ * @date 2025/9/15 * @author feiyu02 */ class DPInspectionInfo { var subTask: Subtask? = null var problems: List<ProblemListVo>? = null } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPMonitorDataInfo.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,12 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult /** * æ°æ®äº§åçæµæ°æ®ä¿¡æ¯ * @date 2025/9/15 * @author feiyu02 */ class DPMonitorDataInfo { var data: DustDataResult? = null } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/DPSceneInfo.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,26 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod import cn.flightfeather.supervision.domain.ds1.entity.BaseScene import cn.flightfeather.supervision.domain.ds1.entity.Scense /** * æ°æ®äº§ååºæ¯ä¿¡æ¯ * @date 2025/9/15 * @author feiyu02 */ class DPSceneInfo { // åºæ¯åºæ¬ä¿¡æ¯ var scene: Scense? = null // åºæ¯ç¹æä¿¡æ¯ var subScene: BaseScene? = null // ç¶æï¼æ ¹æ®åºæ¯ç±»åä¸åï¼æè¿°ä¸åï¼ä¾å¦å·¥å°ï¼å»ºè®¾ä¸ãå®å·¥ãåå·¥ï¼ç 头ï¼åè¿ãè¥è¿ä¸ï¼ var status: String? = null var statusBool: Boolean = false // é¶æ®µï¼æ ¹æ®åºæ¯ç±»åä¸åï¼æè¿°ä¸åï¼ä¾å¦å·¥å°ï¼åºç¡ãç»æã室夿»ä½çï¼ var stage: String? = null } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/QueryOpt.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,41 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod import com.fasterxml.jackson.annotation.JsonFormat import io.swagger.annotations.ApiModelProperty import java.time.LocalDateTime /** * æ¥è¯¢åæ° * @date 2025/9/15 * @author feiyu02 */ class QueryOpt { @ApiModelProperty("æ»ä»»å¡id") var topTaskId: String? = null @ApiModelProperty("ç份ç¼ç ") var provinceCode: String? = null @ApiModelProperty("åå¸ç¼ç ") var cityCode: String? = null @ApiModelProperty("åºå¿ç¼ç ") var districtCode: String? = null @ApiModelProperty("è¡éç¼ç ") var townCode: 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 @ApiModelProperty("åºæ¯ç±»åid") var sceneTypeId: String? = null @ApiModelProperty("æ¯å¦éè¦ç¼å") var needCache: Boolean = true } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPEvaluationByArea.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,59 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod.middle /** * ååºåè§èæ§æ åµ * @date 2025/9/15 * @author feiyu02 */ class DPEvaluationByArea { var provinceCode: String? = null var provinceName: String? = null var cityCode: String? = null var cityName: String? = null var districtCode: String? = null var districtName: String? = null var townCode: String? = null var townName: String? = null /** * ææåºæ¯æ°éï¼å»ºè®¾ä¸çå·¥å°ï¼è¥è¿ä¸çç 头çï¼ */ var validSceneCount: Int = 0 /** * è¯ä¼°ç¹æ¬¡ */ var evaluationCount: Int = 0 /** * è§èç级Aï¼è§èï¼æ°é */ var evalLevelACount: Int = 0 /** * è§èç级Bï¼åºæ¬è§èï¼æ°é */ var evalLevelBCount: Int = 0 /** * è§èç级Cï¼ä¸è§èï¼æ°é */ var evalLevelCCount: Int = 0 /** * è§èç级Dï¼ä¸¥éä¸è§èï¼æ°é */ var evalLevelDCount: Int = 0 /** * è§èç级Aï¼è§èï¼ä¸Bï¼åºæ¬è§èï¼å æ¯ */ var evalLevelRatioAB: Double = 0.0 } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPInspectionSummary.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,34 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod.middle /** * æ°æ®äº§åå·¡æ¥æ±æ»ä¿¡æ¯ * @date 2025/9/15 * @author feiyu02 */ class DPInspectionSummary { /** * å·¡æ¥åºæ¯æ»æ° */ var sceneCount: Int = 0 /** * å·¡æ¥ç¹æ¬¡æ»æ° */ var pointCount: Int = 0 /** * å·¡æ¥å¤æ ¸ç¹æ¬¡æ»æ° */ var reviewPointCount: Int = 0 /** * åå·¥åºæ¯æ° */ var stopSceneCount: Int = 0 /** * å®å·¥åºæ¯æ° */ var completeSceneCount: Int = 0 } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPProblemCountByArea.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,38 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod.middle import io.swagger.annotations.ApiModelProperty /** * * @date 2025/9/15 * @author feiyu02 */ class DPProblemCountByArea { var provinceCode: String? = null var provinceName: String? = null var cityCode: String? = null var cityName: String? = null var districtCode: String? = null var districtName: String? = null var townCode: String? = null var townName: String? = null /** * åºæ¯æ°é */ var sceneCount: Int = 0 /** * é®é¢æ°é */ var problemCount: Int = 0 /** * é®é¢æ°éå æ¯ */ var ratio: Double = 0.0 } src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPProblemTypeCount.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ package cn.flightfeather.supervision.lightshare.vo.dataprod.middle /** * æ°æ®äº§åé®é¢åç±»æ±æ»ä¿¡æ¯ * @date 2025/9/15 * @author feiyu02 */ class DPProblemTypeCount { /** * é®é¢åç±»ID */ var typeId: Byte? = null /** * é®é¢åç±»åç§° */ var typeName: String? = null /** * é®é¢æ°é */ var count: Int = 0 /** * é®é¢æ°éå æ¯ */ var ratio: Double = 0.0 } src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProdBaseController.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,42 @@ package cn.flightfeather.supervision.lightshare.web import cn.flightfeather.supervision.lightshare.service.DataProdBaseService import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt import io.swagger.annotations.Api import org.springframework.web.bind.annotation.* /** * åºç¡æ°æ®äº§åæ§å¶å¨ * @date 2025/9/15 * @author feiyu02 */ @Api(tags = ["DataProdBaseController"], description = "åºç¡æ°æ®äº§åç¸å ³APIæ¥å£") @RestController @RequestMapping("/dataProd/base") class DataProdBaseController(private val dataProdBaseService: DataProdBaseService) { /** * åºæ¯å表 */ @PostMapping("/scene/get") fun getSceneInfo(@RequestBody queryOpt: QueryOpt) = resPack { dataProdBaseService.getSceneInfo(queryOpt) } /** * è§èè¯ä¼°å表 */ @PostMapping("/evaluate/get") fun getEvaluateInfo(@RequestBody queryOpt: QueryOpt) = resPack { dataProdBaseService.getEvaluateInfo(queryOpt) } /** * å·¡æ¥å表 */ @PostMapping("/inspection/get") fun getInspectionInfo(@RequestBody queryOpt: QueryOpt) = resPack { dataProdBaseService.getInspectionInfo(queryOpt) } /** * çæµæ°æ®å表 */ @PostMapping("/monitorData/get") fun getMonitorDataInfo(@RequestBody queryOpt: QueryOpt) = resPack { dataProdBaseService.getMonitorDataInfo(queryOpt) } } src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProdFinalController.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,16 @@ package cn.flightfeather.supervision.lightshare.web import io.swagger.annotations.Api import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController /** * æç»æ°æ®äº§åæ§å¶å¨ * @date 2025/9/15 * @author feiyu02 */ @Api(tags = ["DataProdFinalController"], description = "æç»æ°æ®äº§åç¸å ³APIæ¥å£") @RestController @RequestMapping("/dataProd/final") class DataProdFinalController { } src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DataProdMiddleController.kt
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,48 @@ package cn.flightfeather.supervision.lightshare.web import cn.flightfeather.supervision.lightshare.service.DataProdMiddleService import cn.flightfeather.supervision.lightshare.vo.dataprod.QueryOpt import io.swagger.annotations.Api 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/9/15 * @author feiyu02 */ @Api(tags = ["DataProdMiddleController"], description = "ä¸é´æ°æ®äº§åç¸å ³APIæ¥å£") @RestController @RequestMapping("/dataProd/middle") class DataProdMiddleController(private val dataProdMiddleService: DataProdMiddleService) { /** * å·¡æ¥å®ææ 嵿±æ» */ @PostMapping("/inspection/summary/get") fun getInspectionSummary(@RequestBody queryOpt: QueryOpt) = resPack { dataProdMiddleService.getInspectionSummary(queryOpt) } /** * é®é¢åç±»æ±æ» */ @PostMapping("/problemType/summary/get") fun getProblemTypeSummary(@RequestBody queryOpt: QueryOpt) = resPack { dataProdMiddleService.getProblemTypeSummary(queryOpt) } /** * ååºåååºæ¯é®é¢æ°é */ @PostMapping("/problemCount/area/get") fun getProblemCountByArea(@RequestBody queryOpt: QueryOpt) = resPack { dataProdMiddleService.getProblemCountByArea(queryOpt) } /** * ååºåè§èæ§æ åµ */ @PostMapping("/evaluation/area/get") fun getEvaluationByArea(@RequestBody queryOpt: QueryOpt) = resPack { dataProdMiddleService.getEvaluationByArea(queryOpt) } }