From 2ae8bf126599f68ba1ca721ff2acc1dd4461e9a5 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 12 九月 2023 11:05:47 +0800
Subject: [PATCH] 1. 整合了飞羽环境、徐汇油烟及金山扬尘两个数据库; 2. 优化重构自动评估模块逻辑; 3. 新增监测数据自动化统; 4. 将自动统计应用于自动评估中;
---
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopSceneTypeCheck.kt | 30
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt | 2
src/main/resources/mapper/ds1/DustDataResultMapper.xml | 32
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/RestaurantBaseInfo.java | 600 +++++
src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt | 1
src/main/resources/mapper/ds2/HourDustDataMapper.xml | 30
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampDeviceData.java | 290 ++
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt | 12
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/VehicleBaseInfo.java | 172 +
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt | 8
src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt | 50
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt | 205 +
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataConfig.kt | 37
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/HourDustData.java | 326 ++
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteMap.java | 146 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt | 2
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopDataAnalysis.kt | 145 +
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampEnterBaseInfo.java | 377 +++
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem1.kt | 57
src/main/resources/mapper/ds2/LampEnterBaseInfoMapper.xml | 32
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseCols.kt | 2
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampDeviceDataMapper.kt | 8
src/main/resources/mapper/ds2/DustSiteInfoMapper.xml | 64
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/CsScoreItem_2.kt | 1
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/mapper/FumeDailyAnalysisMapper.kt | 8
src/main/resources/generator/generatorConfig4ds3.xml | 50
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt | 404 +++
src/main/kotlin/cn/flightfeather/supervision/business/location/CoordinateUtil.kt | 35
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JAScore.kt | 62
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem5.kt | 98
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem9.kt | 91
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt | 4
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/storage/StScoreItem1.kt | 57
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JADataAnalysis.kt | 153 +
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/RestaurantBaseInfoMapper.kt | 8
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/HourDustDataMapper.kt | 8
src/main/kotlin/cn/flightfeather/supervision/datasource/config/MybatisConfig4ds3.kt | 47
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt | 91
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt | 205 +
src/main/kotlin/cn/flightfeather/supervision/datasource/config/DataSourceConfig.kt | 13
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AreaVo.kt | 5
src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt | 69
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt | 3
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem2.kt | 67
src/main/resources/generator/generatorConfig4ds1.xml | 3
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt | 66
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem11.kt | 54
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteInfo.java | 1038 ++++++++
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt | 56
src/main/kotlin/cn/flightfeather/supervision/business/Info.kt | 3
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem8.kt | 56
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem1.kt | 57
pom.xml | 7
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/UserinfoTZ.kt | 18
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDbMapper.kt | 32
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt | 58
src/main/kotlin/cn/flightfeather/supervision/business/storage/JinAnScore.kt | 62
src/main/resources/mapper/ds3/FumeDailyAnalysisMapper.xml | 31
src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt | 23
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem1.kt | 57
src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt | 8
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteInfoMapper.kt | 8
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem10.kt | 100
src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt | 88
src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcelMulti.kt | 2
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/entity/FumeDailyAnalysis.java | 403 +++
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem2.kt | 67
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/MpScoreItem_2.kt | 3
src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt | 22
src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt | 6
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem7.kt | 95
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt | 2
src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt | 35
src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt | 98
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/VehicleBaseInfoMapper.kt | 8
src/main/resources/mapper/ds1/SubtaskMapper.xml | 4
src/main/resources/mapper/ds2/LampDeviceDataMapper.xml | 28
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem2.kt | 67
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt | 126
src/main/kotlin/cn/flightfeather/supervision/business/storage/item/WhScoreItem_2.kt | 3
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt | 4
src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt | 34
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteMapMapper.kt | 8
src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampEnterBaseInfoMapper.kt | 8
src/main/resources/application.yml | 36
src/main/resources/mapper/ds2/DustSiteMapMapper.xml | 24
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt | 19
90 files changed, 6,776 insertions(+), 264 deletions(-)
diff --git a/pom.xml b/pom.xml
index 83c8788..2d674a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -419,17 +419,12 @@
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
- <configurationFile>src/main/resources/generator/generatorConfig4ds1.xml</configurationFile>
+ <configurationFile>src/main/resources/generator/generatorConfig4ds3.xml</configurationFile>
<overwrite>true</overwrite>
<verbose>true</verbose>
</configuration>
<dependencies>
- <!--<dependency>-->
- <!--<groupId>org.mybatis.generator</groupId>-->
- <!--<artifactId>mybatis-generator-core</artifactId>-->
- <!--<version>1.3.6</version>-->
- <!--</dependency>-->
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
diff --git a/src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt b/src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
index 821485c..9099122 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
@@ -18,7 +18,7 @@
@Bean
fun runner() = ApplicationRunner {
- fetchController.run()
+ fetchController. run()
}
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/Info.kt b/src/main/kotlin/cn/flightfeather/supervision/business/Info.kt
index 325392b..4403c16 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/Info.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/Info.kt
@@ -21,5 +21,6 @@
val sTime: LocalDateTime? = null,
val eTime: LocalDateTime? = null,
val subTask: Subtask? = null,
- val sceneIndex: Int? = null
+ val sceneIndex: Int? = null,
+ val online:Boolean = true
)
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt
new file mode 100644
index 0000000..c9928e3
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt
@@ -0,0 +1,56 @@
+package cn.flightfeather.supervision.business.autooutput
+
+import cn.flightfeather.supervision.business.Info
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
+import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
+import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
+import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
+import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationMapper
+import cn.flightfeather.supervision.domain.ds1.mapper.ItemevaluationMapper
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+
+/**
+ * 鑷姩璇勪及缁撴灉杈撳嚭
+ */
+@Component
+class AopOutput(
+ private val evaluationMapper: EvaluationMapper,
+ private val itemevaluationMapper: ItemevaluationMapper,
+ private val dustDataResultMapper: DustDataResultMapper
+) {
+
+ /**
+ * 灏嗚瘎鍒嗚褰曡緭鍑鸿嚦鏁版嵁搴�
+ */
+ fun toDbEvaluation(evaluationScene: AopDataSource.EvaluationScene, p: Pair<Evaluation, List<Itemevaluation>>) {
+ //鍘婚櫎宸叉湁璁板綍
+ evaluationMapper.deleteByExample(Example(Evaluation::class.java).apply {
+ createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
+ })
+ itemevaluationMapper.deleteByExample(Example(Itemevaluation::class.java).apply {
+ createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
+ })
+
+ //鍐欏叆鏁版嵁搴�
+ evaluationMapper.insert(p.first)
+ p.second.forEach { il -> itemevaluationMapper.insert(il) }
+ }
+
+ /**
+ * 灏嗙洃娴嬫暟鎹粺璁$粨鏋滃叆搴�
+ */
+ fun toDbDataResult(dustDataResult: DustDataResult) {
+ val d = dustDataResultMapper.selectOne(DustDataResult().apply {
+ drSceneId = dustDataResult.drSceneId
+ drTime = dustDataResult.drTime
+ })
+ if (d == null) {
+ dustDataResultMapper.insert(dustDataResult)
+ } else {
+ dustDataResult.drId = d.drId
+ dustDataResultMapper.updateByPrimaryKey(dustDataResult)
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataConfig.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataConfig.kt
new file mode 100644
index 0000000..2be7918
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataConfig.kt
@@ -0,0 +1,37 @@
+package cn.flightfeather.supervision.business.autooutput.datasource
+
+import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.domain.ds1.entity.Scense
+import cn.flightfeather.supervision.domain.ds2.entity.UserinfoTZ
+import java.util.*
+
+/**
+ * 鏁版嵁鏉ユ簮鍙傛暟
+ */
+data class AopDataConfig(
+ val startTime: Date? = null,
+ val endTime: Date? = null,
+
+ val year: Int? = null,
+ val month: Int? = null,
+ val period: Int = 1,
+
+ val provinceCode: String? = null,
+ val cityCode: String? = null,
+ val districtCode: String? = null,
+ val districtName: String? = null,
+ val townCode: String? = null,
+
+ val topTaskGuid: String? = null,
+
+ /**
+ * 鍦烘櫙绫诲瀷鏍规嵁涓嶅悓绯荤粺閲囩敤涓嶅悓鐨勫�硷紝鍙傝�僛Constant.ScenseType]
+ */
+ var sceneType: Int? = null,
+
+ /**
+ * 瀵逛簬鐩戠绯荤粺锛屼负鍦烘櫙[Scense.guid]锛�
+ * 瀵逛簬鐜绯荤粺锛屼负鐢ㄦ埛[UserinfoTZ.guid]
+ */
+ val objIdList: List<String>? = null,
+)
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt
new file mode 100644
index 0000000..80d462f
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt
@@ -0,0 +1,404 @@
+package cn.flightfeather.supervision.business.autooutput.datasource
+
+import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.domain.ds1.entity.*
+import cn.flightfeather.supervision.domain.ds2.entity.LedgerRecord
+import cn.flightfeather.supervision.domain.ds2.entity.LedgerSubType
+import cn.flightfeather.supervision.domain.ds2.entity.UserMap
+import cn.flightfeather.supervision.domain.ds2.entity.UserinfoTZ
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
+
+/**
+ * 鑷姩杈撳嚭鏁版嵁婧�
+ */
+class AopDataSource(private val aopDbMapper: AopDbMapper, private val aopSceneTypeCheck: AopSceneTypeCheck) {
+
+ private val sceneSourceList = mutableListOf<Scense?>()
+ private val userSourceList = mutableListOf<UserinfoTZ?>()
+ var config: AopDataConfig? = null
+ private var mode = 0
+ private val evaluationScene = EvaluationScene()
+
+ /**
+ * 璁剧疆鏁版嵁婧�
+ */
+ fun setResource(topTaskGuid: String?, sceneType: Int, districtName: String?, townCode: String?) {
+ val config = AopDataConfig(topTaskGuid = topTaskGuid, sceneType = sceneType, districtName = districtName,
+ townCode = townCode)
+ evaluationScene.config = config
+ val check = aopSceneTypeCheck.checkSceneType(sceneType)
+ if (check.first) {
+ initSceneSource(config)
+ } else {
+ initUserSource(config)
+ }
+ }
+
+ fun setResource(config: AopDataConfig) {
+ config.sceneType ?: return
+ evaluationScene.config = config
+ val check = aopSceneTypeCheck.checkSceneType(config.sceneType!!)
+ if (check.first) {
+ initSceneSource(config)
+ } else {
+ initUserSource(config)
+ }
+ }
+
+ /**
+ * 杞鏁版嵁婧�
+ */
+ fun loop(callback: (index:Int, evaluationScene: EvaluationScene) -> Unit) {
+ when (mode) {
+ 0 -> {
+ sceneSourceList.forEachIndexed { i, scene ->
+ evaluationScene.clear()
+ evaluationScene.index = i
+ evaluationScene.setDefaultScene(scene)
+ callback(i, evaluationScene)
+ }
+ }
+ 1 -> {
+ userSourceList.forEachIndexed { i, user ->
+ evaluationScene.clear()
+ evaluationScene.index = i
+ evaluationScene.setDefaultUserTZ(user)
+ callback(i, evaluationScene)
+ }
+ }
+ }
+ }
+
+ // 浠庣洃绠$郴缁熻幏鍙栧満鏅�
+ private fun initSceneSource(config: AopDataConfig) {
+ config.topTaskGuid ?: throw IllegalStateException("椤跺眰浠诲姟id涓嶈兘涓簄ull")
+ this.config = config
+ this.mode = 0
+ sceneSourceList.clear()
+ val taskSceneIdList =
+ aopDbMapper.monitorobjectversionMapper.getSceneByType(config.topTaskGuid, config.sceneType, config.townCode)
+
+ aopDbMapper.scenseMapper.selectByExample(Example(Scense::class.java).apply {
+ createCriteria()
+ .andIn("guid", taskSceneIdList)
+// .andEqualTo("provincecode", config.provinceCode)
+// .andEqualTo("citycode", config.cityCode)
+// .andEqualTo("districtcode", config.districtCode)
+// .andEqualTo("towncode", config.townCode)
+// .andEqualTo("typeid", config.sceneType)
+// .andNotEqualTo("extension1", '0')
+ })?.let { sceneSourceList.addAll(it) }
+ }
+
+ // 浠庡彴璐︾郴缁熻幏鍙栧満鏅�
+ private fun initUserSource(config: AopDataConfig) {
+ this.config = config
+ this.mode = 1
+ userSourceList.clear()
+ aopDbMapper.userinfoTZMapper.selectByExample(Example(UserinfoTZ::class.java).apply {
+ createCriteria().andEqualTo("extension1", config.districtName)
+ .andEqualTo("extension2", config.sceneType)
+ .andEqualTo("isenable", true)
+ .andEqualTo("usertypeid", "3")
+ and(createCriteria().orNotEqualTo("workno", "test").orIsNull("workno"))
+ }).let { userSourceList.addAll(it) }
+ }
+
+ // 鍗曚釜璇勪及瀵硅薄
+ inner class EvaluationScene(){
+ var index = 0
+
+ var config: AopDataConfig? = null
+
+ val scene = InfoProxy<Scense>()
+
+ val userInfoTZ = InfoProxy<UserinfoTZ>()
+
+ fun setDefaultScene(s: Scense?) {
+ scene.value = s
+ userInfoTZ.fetch = {_,_ ->
+ val svUserId = aopDbMapper.userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
+ createCriteria().andEqualTo("dGuid", scene.value?.guid)
+ })?.takeIf { m -> m.isNotEmpty() }?.get(0)?.guid
+ val tzUserId = aopDbMapper.userMapMapper.selectByExample(Example(UserMap::class.java).apply {
+ createCriteria().andEqualTo("svUserId", svUserId)
+ })?.takeIf { m -> m.isNotEmpty() }?.get(0)?.tzUserId
+ aopDbMapper.userinfoTZMapper.selectByPrimaryKey(tzUserId)
+ }
+ }
+
+ fun setDefaultUserTZ(u: UserinfoTZ?) {
+ userInfoTZ.value = u
+ scene.fetch = {_,_ ->
+ val svUserId = aopDbMapper.userMapMapper.selectByExample(Example(UserMap::class.java).apply {
+ createCriteria().andEqualTo("tzUserId", userInfoTZ.value?.guid)
+ })?.takeIf { m -> m.isNotEmpty() }?.get(0)?.svUserId
+ val sId = aopDbMapper.userinfoMapper.selectByPrimaryKey(svUserId)?.dGuid
+ aopDbMapper.scenseMapper.selectByPrimaryKey(sId)
+ }
+ }
+
+ val userInfo = InfoProxy<Userinfo>{_,_ ->
+ scene.value?.guid ?: return@InfoProxy null
+ return@InfoProxy aopDbMapper.userinfoMapper.selectOne(Userinfo().apply {
+ dGuid = scene.value?.guid
+ })
+ }
+ //宸℃煡浠诲姟淇℃伅
+ val subTask = InfoProxy<Subtask> {_,_ ->
+ return@InfoProxy aopDbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
+ createCriteria().andEqualTo("scenseid", scene.value?.guid)
+// .andBetween("planstarttime", config?.startTime, config?.endTime)
+ .andEqualTo("tguid", config?.topTaskGuid)
+ })?.takeIf { it.isNotEmpty() }?.get(0)
+ }
+
+ //鐜板満宸℃煡淇℃伅
+ val inspection = InfoProxy<Inspection>{_,_ ->
+ val inspection = Inspection()
+ inspection.stguid = subTask.value?.stguid
+ return@InfoProxy aopDbMapper.inspectionMapper.selectOne(inspection)
+ }
+
+ //鍚勫満鏅壒鏈夌殑鍩烘湰淇℃伅
+ val baseScene = InfoProxy<BaseScene> {_,_ ->
+ return@InfoProxy when (config?.sceneType.toString()) {
+ // 鐩戠绯荤粺
+ Constant.ScenseType.TYPE1.value -> {
+ aopDbMapper.sceneConstructionSiteMapper.selectByPrimaryKey(scene.value?.guid)
+ }
+ Constant.ScenseType.TYPE2.value -> {
+ aopDbMapper.sceneWharfMapper.selectByPrimaryKey(scene.value?.guid)
+ }
+ Constant.ScenseType.TYPE3.value -> {
+ aopDbMapper.sceneMixingPlantMapper.selectByPrimaryKey(scene.value?.guid)
+ }
+ Constant.ScenseType.TYPE14.value -> {
+ aopDbMapper.sceneStorageYardMapper.selectByPrimaryKey(scene.value?.guid)
+ }
+ // 鍙拌处绯荤粺
+ Constant.ScenseType.TYPE5.value -> {
+ aopDbMapper.restaurantBaseInfoMapper.selectByPrimaryKey(userInfoTZ.value?.guid)
+ }
+ Constant.ScenseType.TYPE6.value -> {
+ aopDbMapper.vehicleBaseInfoMapper.selectByPrimaryKey(userInfoTZ.value?.guid)
+ }
+ else -> null
+ }
+ }
+
+ //鍏蜂綋鐨勯棶棰�
+ val problems = InfoProxy<MutableList<Problemlist>> {_,_ ->
+ if (noRecord()) return@InfoProxy mutableListOf()
+ return@InfoProxy aopDbMapper.problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+ createCriteria().andEqualTo("stguid", subTask.value?.stguid)
+ })
+ }
+
+ //璇勪及鎬诲垎
+ val evaluation = InfoProxy<Evaluation> {_,_ ->
+ if (noRecord()) return@InfoProxy null
+
+ return@InfoProxy aopDbMapper.evaluationMapper.selectByExample(Example(Evaluation::class.java).apply {
+ createCriteria().andEqualTo("stguid", subTask.value?.stguid)
+ })?.takeIf { it.isNotEmpty() }?.get(0)
+ }
+
+ //璇勪及缁嗗垯寰楀垎
+ val itemevaluationList = InfoProxy<MutableList<Itemevaluation>> {_,_ ->
+ return@InfoProxy aopDbMapper.itemevaluationMapper.selectByExample(Example(Itemevaluation::class.java).apply {
+ createCriteria().andEqualTo("stguid", subTask.value?.stguid)
+ })
+ }
+
+ //闂绫诲瀷
+ val problemTypes = InfoProxy<MutableList<Problemtype>>(config?.sceneType.toString()) { _, cacheMap ->
+ val list = aopDbMapper.problemtypeMapper.selectByExample(Example(Problemtype::class.java).apply {
+ createCriteria().andEqualTo("scensetypeid", scene.value?.typeid)
+ .andEqualTo("districtcode", scene.value?.districtcode)
+ orderBy("extension1")
+ })
+ cacheMap[config?.sceneType.toString()] = list
+ return@InfoProxy list
+ }
+
+ // FIXME: 2023/8/9 鎬昏鍒欑殑鑾峰彇蹇呴』鍦╗topItems]璋冪敤涔嬪悗锛屽惁鍒欎负绌�
+ val baseRule = InfoProxy<Evaluationrule>()
+
+ // FIXME: 2023/8/9 鎬诲垎鐨勮幏鍙栧繀椤诲湪[topItems]璋冪敤涔嬪悗锛屽惁鍒欎负绌�
+ val totalScore = InfoProxy<Int>()
+
+ //鑷姩璇勫垎瑙勫垯涓�绾у垎绫�
+ val topItems = InfoProxy<MutableList<Evaluationsubrule2>>(config?.sceneType.toString()) { _, cacheMap ->
+ val _topItems = mutableListOf<Evaluationsubrule2>()
+ val _rules = mutableListOf<Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>>()
+ val rule = aopDbMapper.evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply {
+ createCriteria()
+ .andEqualTo("tasktypeid", 99)
+ .andEqualTo("scensetypeid", scene.value?.typeid)
+ })
+ if (rule.isNotEmpty()) {
+ this@EvaluationScene.baseRule.value = rule[0]
+ this@EvaluationScene.baseRule.cacheMap[config?.sceneType.toString()] = rule[0]
+
+ val ruleId = rule[0].guid
+ val rules =
+ aopDbMapper.evaluationsubruleMapper.selectByExample(Example(Evaluationsubrule2::class.java).apply {
+ createCriteria().andEqualTo("erguid", ruleId)
+ })
+ rules.forEach {
+ if (it.ertype == 2) {
+ _topItems.add(it)
+ }
+ }
+ _topItems.sortBy { it.displayid }
+
+ var t = 0
+ _topItems.forEach {
+ t += it.maxscore ?: 0
+ val tempRules = mutableListOf<Evaluationsubrule2>()
+ for (i in rules) {
+ if (i.fatherid == it.guid && i.ertype == 3) {
+ tempRules.add(i)
+ }
+ }
+ //璇勫垎澶ч」濡傛灉娌℃湁鎵惧埌璇勫垎灏忛」锛屽垯璇存槑鍏剁洿鎺ュ搴旀渶灏忚瘎鍒嗛」锛屽叾鏈韩鍙樻垚璇勫垎椤�
+ if (tempRules.isEmpty()) {
+ tempRules.add(it)
+ }
+ tempRules.sortBy { t -> t.displayid }
+ tempRules.forEach { temp ->
+ val tempSubRules = mutableListOf<Evaluationsubrule2>()
+ for (i in rules) {
+ if (i.fatherid == temp.guid && i.ertype == 4) {
+ tempSubRules.add(i)
+ }
+ }
+ tempSubRules.sortBy { ts -> ts.displayid }
+ _rules.add(Pair(temp, tempSubRules))
+ }
+ }
+ this@EvaluationScene.totalScore.value = t
+ this@EvaluationScene.totalScore.cacheMap[config?.sceneType.toString()] = t
+ this@EvaluationScene.rules.value = _rules
+ this@EvaluationScene.rules.cacheMap[config?.sceneType.toString()] = _rules
+ }
+ cacheMap[config?.sceneType.toString()] = _topItems
+ return@InfoProxy _topItems
+ }
+
+ // FIXME: 2023/8/9 瀛愯鍒欑殑鑾峰彇蹇呴』鍦╗topItems]璋冪敤涔嬪悗锛屽惁鍒欎负绌�
+ //鑷姩璇勫垎瑙勫垯浜岀骇鍜屼笁绾у垎绫�
+ val rules = InfoProxy<MutableList<Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>>>()
+
+ //蹇呭~鍙拌处鏁伴噺
+ val ledgerCount = InfoProxy<Int>(config?.sceneType.toString()) {_, cacheMap ->
+ val tzSceneType = Constant.ScenseType.typeMap(scene.value?.typeid)
+ val list = aopDbMapper.ledgerSubTypeMapper.selectCountByExample(Example(LedgerSubType::class.java).apply {
+ createCriteria().andEqualTo("lScenetype", tzSceneType).andEqualTo("lNeedupdate", true)
+ })
+ cacheMap[config?.sceneType.toString()] = list
+ return@InfoProxy list
+ }
+
+ //鐢ㄦ埛瀹為檯鎻愪氦鍙拌处鏁伴噺
+ val ledgerRecords = InfoProxy<List<LedgerRecord>> {_,_ ->
+ return@InfoProxy aopDbMapper.ledgerRecordMapper.selectByExample(Example(LedgerRecord::class.java).apply {
+ createCriteria().andEqualTo("lrYear", config?.year)
+ .andEqualTo("lrMonth", config?.month)
+ .andEqualTo("lrSubmitid", userInfoTZ.value?.guid)
+ })
+ }
+
+ /**
+ * 鑾峰彇褰撳墠宸℃煡浠诲姟鐨勪笂鏈熷贰鏌ヨ褰�
+ */
+ fun lastSubTask(): EvaluationScene {
+ val last = EvaluationScene()
+ val r = aopDbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
+ createCriteria().andEqualTo("scenseid", subTask.value?.scenseid)
+ .andLessThan("planstarttime", subTask.value?.planstarttime)
+ orderBy("planstarttime").desc()
+ })
+ if (r.isNotEmpty()) {
+ val thisMonth = LocalDateTime.ofInstant(subTask.value?.planstarttime?.toInstant(), ZoneId.systemDefault())
+ .withDayOfMonth(1).toLocalDate()
+ val lastMonth = LocalDateTime.ofInstant(r[0]?.planstarttime?.toInstant(), ZoneId.systemDefault()).withDayOfMonth(1).toLocalDate()
+ if (lastMonth.plusMonths(1).isEqual(thisMonth)) {
+ last.subTask.value = r[0]
+ }
+ }
+ return last
+ }
+
+ /**
+ * 娓呯┖褰撳墠澶勭悊鐨勫璞$殑鐩稿叧鏁版嵁婧�
+ */
+ fun clear() {
+ scene.clear()
+ userInfo.clear()
+ userInfoTZ.clear()
+ subTask.clear()
+ inspection.clear()
+ baseScene.clear()
+ problems.clear()
+ evaluation.clear()
+ itemevaluationList.clear()
+ problemTypes.clear()
+ baseRule.clear()
+ totalScore.clear()
+ topItems.clear()
+ rules.clear()
+ ledgerCount.clear()
+ ledgerRecords.clear()
+ }
+
+ /**
+ * 鍒ゆ柇鍦烘櫙鏄惁宸℃煡鐩戠锛屾湁鏃犲贰鏌ヨ褰�
+ */
+ fun noRecord() = subTask.value?.stguid == null
+ }
+
+ // 璇勪及瀵硅薄鐩稿叧淇℃伅鑾峰彇浠g悊
+ inner class InfoProxy<T>(
+ val key: String? = null,
+ var fetch: (defaultValue: T?, cacheMap: MutableMap<String, T?>) -> T? =
+ { _, _ ->
+ null
+ },
+ ) {
+
+ private var _value: T? = null
+ private var fetched: Boolean = false
+ private var defaultValue: T? = null
+ private var cacheTimeStamp = LocalDateTime.now()
+ val cacheMap = mutableMapOf<String, T?>()
+
+ var value: T?
+ get() {
+ if (defaultValue != null) {
+ return defaultValue
+ } else if (!fetched && _value == null) {
+ _value = if (cacheMap.containsKey(key) && LocalDateTime.now().minusDays(1).isBefore(cacheTimeStamp)) {
+ cacheMap[key]
+ } else {
+ cacheTimeStamp = LocalDateTime.now()
+ fetch(defaultValue, cacheMap)
+ }
+ fetched = true
+ }
+ return _value
+ }
+ set(value) {
+ defaultValue = value
+ }
+
+ fun clear() {
+ defaultValue = null
+ _value = null
+ fetched = false
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDbMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDbMapper.kt
new file mode 100644
index 0000000..4586daa
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDbMapper.kt
@@ -0,0 +1,32 @@
+package cn.flightfeather.supervision.business.autooutput.datasource
+
+import cn.flightfeather.supervision.domain.ds1.mapper.*
+import cn.flightfeather.supervision.domain.ds2.mapper.*
+import org.springframework.stereotype.Component
+
+@Component
+class AopDbMapper (
+ val scenseMapper: ScenseMapper,
+ val problemlistMapper: ProblemlistMapper,
+ val problemtypeMapper: ProblemtypeMapper,
+ val subtaskMapper: SubtaskMapper,
+ val inspectionMapper: InspectionMapper,
+ val monitorobjectversionMapper: MonitorobjectversionMapper,
+ val sceneConstructionSiteMapper: SceneConstructionSiteMapper,
+ val sceneMixingPlantMapper: SceneMixingPlantMapper,
+ val sceneStorageYardMapper: SceneStorageYardMapper,
+ val sceneWharfMapper: SceneWharfMapper,
+ val taskMapper: TaskMapper,
+ val evaluationruleMapper: EvaluationruleMapper,
+ val evaluationsubruleMapper: EvaluationsubruleMapper2,
+ val evaluationMapper: EvaluationMapper,
+ val itemevaluationMapper: ItemevaluationMapper,
+ val ledgerSubTypeMapper: LedgerSubTypeMapper,
+ val ledgerRecordMapper: LedgerRecordMapper,
+ val userinfoMapper: UserinfoMapper,
+ val userinfoTZMapper: UserinfoTZMapper,
+ val userMapMapper: UserMapMapper,
+ val townMapper: TownMapper,
+ val restaurantBaseInfoMapper: RestaurantBaseInfoMapper,
+ val vehicleBaseInfoMapper: VehicleBaseInfoMapper
+)
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopSceneTypeCheck.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopSceneTypeCheck.kt
new file mode 100644
index 0000000..dd7f6fa
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopSceneTypeCheck.kt
@@ -0,0 +1,30 @@
+package cn.flightfeather.supervision.business.autooutput.datasource
+
+import cn.flightfeather.supervision.common.utils.Constant
+import org.springframework.stereotype.Component
+
+/**
+ * 鍦烘櫙绫诲瀷鍒ゆ柇
+ * 鐜俊鐮佽嚜鍔ㄨ瘎浼颁腑锛屽弬涓庤瘎浼扮殑涓嶅悓鍦烘櫙绫诲瀷锛屽彲鑳介儴鍒嗗浜庣幇鍦虹洃绠★紝閮ㄥ垎娌℃湁锛�
+ * 鐜板満鐩戠鐨勫満鏅紝鍦烘櫙绫诲瀷浣跨敤鏈郴缁燂紙椋炵窘鐩戠锛夌殑瀹氫箟锛�
+ * 鏈幇鍦虹洃绠$殑鍦烘櫙锛屽満鏅被鍨嬩娇鐢紙椋炵窘鐜锛夌郴缁熶腑鐨勫畾涔夛紱
+ * 鍦烘櫙绫诲瀷鐨勫畾涔夐�夋嫨锛屽垯鏈夋暟鎹簱閰嶇疆鍐冲畾锛堝彲鐢辩鐞嗙敤鎴疯嚜琛屼慨鏀归厤缃級锛�
+ */
+@Component
+class AopSceneTypeCheck {
+
+ /**
+ * 鍦烘櫙绫诲瀷鍒ゅ畾
+ * @return 鍒ゆ柇缁撴灉锛岋紙鏄惁浣跨敤鏈郴缁熷畾涔夛紝绫诲瀷鍊硷級
+ */
+ fun checkSceneType(sceneType: Int): Pair<Boolean, Int> {
+ // TODO: 2023/9/7 閫氳繃鏁版嵁搴撻厤缃〃鍐冲畾褰撳墠绫诲瀷鐨勬渶缁堢被鍨嬪畾涔�
+
+ // FIXME: 2023/9/7 鏆傛椂鍐欐鐩稿叧閰嶇疆
+ return if (sceneType.toString() == Constant.ScenseType.TYPE6.value) {
+ Pair(false, Constant.ScenseType.typeMap(sceneType.toByte())!!.toInt())
+ } else {
+ Pair(true, sceneType)
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopDataAnalysis.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopDataAnalysis.kt
new file mode 100644
index 0000000..e0f5e50
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopDataAnalysis.kt
@@ -0,0 +1,145 @@
+package cn.flightfeather.supervision.business.autooutput.score
+
+import cn.flightfeather.supervision.business.autooutput.AopOutput
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDataConfig
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper
+import cn.flightfeather.supervision.business.autooutput.datasource.AopSceneTypeCheck
+import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
+import java.time.LocalDateTime
+import java.time.ZoneId
+import java.util.*
+import kotlin.math.round
+
+/**
+ * 鐩戞祴鏁版嵁鍒嗘瀽鍏ュ簱
+ * 鏍规嵁姣忔湀涓轰竴涓懆鏈燂紝缁熻褰撴湀鐨勮秴鏍囨鏁般�佸潎鍊笺�佹渶澶ф渶灏忓�笺�佽秴鍖哄潎鍊肩櫨鍒嗘瘮銆佹暟鎹釜鏁般�佹湁鏁堢巼绛夋暟鎹�
+ */
+abstract class AopDataAnalysis<T>(
+ private val aopDbMapper: AopDbMapper,
+ private val aopSceneTypeCheck: AopSceneTypeCheck,
+ private val aopOutput: AopOutput,
+) {
+
+ /**
+ * 缁熻涓棿瀛樺偍缁撴瀯
+ */
+ inner class TempResult(
+ var total: Double = .0,
+ var count: Int = 0,
+ ){
+ fun avg(): Double {
+ return if (count == 0) {
+ .0
+ } else {
+ round((total / count) * 1000) / 1000
+ }
+ }
+ }
+
+ //鏁版嵁婧�
+ private var source: AopDataSource? = null
+
+ fun setResource(topTaskGuid: String?, sceneType: Int, year: Int, month: Int) {
+ source = AopDataSource(aopDbMapper, aopSceneTypeCheck)
+ val st = LocalDateTime.of(year, month, 1, 0, 0, 0)
+ val et = st.plusMonths(1).minusSeconds(1)
+ val sTime = Date.from(st.atZone(ZoneId.systemDefault()).toInstant())
+ val eTime = Date.from(et.atZone(ZoneId.systemDefault()).toInstant())
+ val config = AopDataConfig(topTaskGuid = topTaskGuid, sceneType = sceneType, startTime = sTime, endTime = eTime)
+ source?.setResource(config)
+ }
+
+ /**
+ * 鎵ц缁熻閫昏緫
+ */
+ fun execute() {
+ val dAvg = districtAvg(source)
+ //寰幆澶勭悊姣忎釜鍦烘櫙
+ source?.loop { _, evaluationScene ->
+ //鑾峰彇鍘熷鐩戞祴鏁版嵁
+ val dataList = fetchDataResources(evaluationScene)
+ //璁$畻缁熻缁撴灉
+ val tempExceedTimes = TempResult()
+ val tempAvg = TempResult()
+ val tempMax = TempResult()
+ val tempMin = TempResult()
+ dataList.forEach {
+ it.forEach {t ->
+ t?.let {
+ exceedTimes(t, tempExceedTimes)
+ avg(t, tempAvg)
+ max(t, tempMax)
+ min(t, tempMin)
+ }
+ }
+ }
+ val dustDataResult = DustDataResult().apply {
+ drSceneId = evaluationScene.scene.value?.guid
+ drSceneName = evaluationScene.scene.value?.name
+ drTime = source?.config?.startTime
+ drExceedTimes = tempExceedTimes.count
+ drAvg = tempAvg.avg()
+ drMax = tempMax.total
+ drMin = tempMin.total
+ drOverAvgPer = overAvgRate(drAvg, dAvg)
+ drDataNum = count(dataList)
+ drEffectiveRate = effectiveRate(dataList, evaluationScene)
+ }
+ //鏇存柊鍏ュ簱
+ aopOutput.toDbDataResult(dustDataResult)
+ }
+ }
+
+ /**
+ * 璁$畻鍖哄潎鍊�
+ * 褰撳墠涓鸿寖鍥村唴鍏ㄩ儴鐩戞祴鐐圭殑鍧囧��
+ */
+ abstract fun districtAvg(source: AopDataSource?): Double?
+
+ /**
+ * 鑾峰彇鍘熷鐩戞祴鏁版嵁
+ */
+ abstract fun fetchDataResources(evaluationScene: AopDataSource.EvaluationScene): List<List<T?>>
+
+ /**
+ * 瓒呮爣娆℃暟
+ */
+ abstract fun exceedTimes(data: T, t: TempResult)
+
+ /**
+ * 鏈堝潎鍊�
+ */
+ abstract fun avg(data: T, t: TempResult)
+
+ /**
+ * 鏈�澶у��
+ */
+ abstract fun max(data: T, t: TempResult)
+
+ /**
+ * 鏈�灏忓��
+ */
+ abstract fun min(data: T, t: TempResult)
+
+ /**
+ * 瓒呮湀鍧囧�肩櫨鍒嗘瘮
+ */
+ abstract fun overAvgRate(avg: Double, dAvg: Double?): Double
+
+ /**
+ * 鏁版嵁涓暟
+ */
+ open fun count(dataList: List<List<T?>>): Int {
+ var count = 0
+ dataList.forEach {
+ count += it.size
+ }
+ return count
+ }
+
+ /**
+ * 鏈夋晥鐜�
+ */
+ abstract fun effectiveRate(dataList: List<List<T?>>, evaluationScene: AopDataSource.EvaluationScene): Double
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt
new file mode 100644
index 0000000..a2c9c8c
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt
@@ -0,0 +1,205 @@
+package cn.flightfeather.supervision.business.autooutput.score
+
+import cn.flightfeather.supervision.business.autooutput.AopOutput
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper
+import cn.flightfeather.supervision.business.autooutput.datasource.AopSceneTypeCheck
+import cn.flightfeather.supervision.business.autooutput.score.construction.CsScoreItem1
+import cn.flightfeather.supervision.business.autooutput.score.construction.CsScoreItem2
+import cn.flightfeather.supervision.business.autooutput.score.mixingplant.MpScoreItem1
+import cn.flightfeather.supervision.business.autooutput.score.mixingplant.MpScoreItem2
+import cn.flightfeather.supervision.business.autooutput.score.restaurant.*
+import cn.flightfeather.supervision.business.autooutput.score.storage.StScoreItem1
+import cn.flightfeather.supervision.business.autooutput.score.wharf.WhScoreItem1
+import cn.flightfeather.supervision.business.autooutput.score.wharf.WhScoreItem2
+import cn.flightfeather.supervision.common.utils.UUIDGenerator
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
+import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
+import org.springframework.stereotype.Component
+import java.util.*
+import kotlin.math.abs
+
+/**
+ * 鑷姩璇勪及娴佺▼
+ */
+@Component
+class AopEvaluation(
+ private val aopDbMapper: AopDbMapper,
+ private val aopSceneTypeCheck: AopSceneTypeCheck,
+ private val aopOutput: AopOutput,
+ csScoreItem1: CsScoreItem1,
+ csScoreItem2: CsScoreItem2,
+ mpScoreItem1: MpScoreItem1,
+ mpScoreItem2: MpScoreItem2,
+ stScoreItem1: StScoreItem1,
+ whScoreItem1: WhScoreItem1,
+ whScoreItem2: WhScoreItem2,
+ reScoreItem5: ReScoreItem5,
+ reScoreItem7: ReScoreItem7,
+ reScoreItem8: ReScoreItem8,
+ reScoreItem9: ReScoreItem9,
+ reScoreItem10: ReScoreItem10,
+ reScoreItem11: ReScoreItem11,
+) {
+
+ //鏁版嵁婧�
+ private var source: AopDataSource? = null
+ //鐗瑰畾璇勫垎椤癸紙闄や簡缁熶竴鐨勬牴鎹贰鏌ラ棶棰樼洿鎺ユ墸鍒嗗锛屾湁鐗瑰畾鐨勬墸鍒嗛�昏緫鐨勮瘎浼伴」锛�
+ private val itemList = mutableListOf<ScoreItem>()
+
+ init {
+ itemList.apply {
+ add(csScoreItem1)
+ add(csScoreItem2)
+ add(mpScoreItem1)
+ add(mpScoreItem2)
+ add(stScoreItem1)
+ add(whScoreItem1)
+ add(whScoreItem2)
+ add(reScoreItem5)
+ add(reScoreItem7)
+ add(reScoreItem8)
+ add(reScoreItem9)
+ add(reScoreItem10)
+ add(reScoreItem11)
+ }
+ }
+
+ fun setResource(topTaskGuid: String?, sceneType: Int, districtName: String? = null, townCode: String? = null) {
+ source = AopDataSource(aopDbMapper, aopSceneTypeCheck)
+ source?.setResource(topTaskGuid, sceneType, districtName, townCode)
+ }
+
+ /**
+ * 鎵ц璇勫垎閫昏緫
+ */
+ fun execute() {
+ //鑾峰彇鏁版嵁婧愶紙寰呰瘎浼扮殑鍦烘櫙锛�
+ //寰幆澶勭悊姣忎釜鍦烘櫙
+ source?.loop {index, evaluationScene ->
+ if (evaluationScene.noRecord()) return@loop
+
+ itemGrade(index, evaluationScene)
+ totalGrade(index, evaluationScene)?.run {
+ aopOutput.toDbEvaluation(evaluationScene, this)
+ }
+ }
+
+ }
+
+ /**
+ * 鏉$洰鎵撳垎
+ */
+ private fun itemGrade(index: Int, evaluationScene: AopDataSource.EvaluationScene) {
+ // 瑙勫垯鏉$洰寰楀垎鍒濆鍖�
+ evaluationScene.topItems.value?.forEach { s -> s.extension1 = null }
+ evaluationScene.rules.value?.forEach { p ->
+ p.first.extension1 = null
+ p.second.forEach { e -> e.extension1 = null }
+ }
+
+ /** 1. 鏍规嵁璇勫垎瑙勫垯瀵瑰簲鐨勯棶棰樿嚜鍔ㄥ垽鏂槸鍚︽墸鍒�***************************************************************/
+ // 鑾峰彇璇ユ宸℃煡浠诲姟涓嬬殑鎵�鏈夐棶棰�
+ val pList = evaluationScene.problems.value?.map { it.ptguid } ?: emptyList()
+ // 璁$畻姣忔潯璇勫垎瑙勫垯鐨勫緱鍒�
+ evaluationScene.rules.value?.forEach { r ->
+ // 璇勫垎鏉$洰
+ val rule = r.first
+ // 鍏蜂綋璇勫垎閫夐」
+ val subRule = r.second
+ subRule.forEach { sr ->
+ // 瀛樺湪澶氫釜璇勫垎椤瑰拰鍚屼竴涓棶棰樺叧鑱旓紝鍥犳蹇呴』鍏ㄩ儴璇勫垎椤归兘鍒ゅ畾涓�閬�
+ sr.problemlist?.split(",")?.forEach { pId ->
+ if (pList.contains(pId)) {
+ sr.extension1 = (0 - (sr.maxscore ?: 0)).toString()
+ }
+ }
+ }
+
+ ScoreUtil.subRuleCal(r)
+ }
+ /** 2.閮ㄥ垎鏈夌壒娈婅瘎鍒嗛�昏緫鐨勮鍒欒繘琛岃绠�*************************************************************************/
+ itemList.forEach { item -> item.execute(evaluationScene) }
+
+ /** 3. 琛ュ叏鍚勪笂绾ц瘎鍒嗛」鐨勮鍒�*************************************************************************/
+ evaluationScene.rules.value?.forEach { r ->
+ val fatherId = r.first.fatherid
+ for (t in (evaluationScene.topItems.value ?: emptyList())) {
+ if (t.guid == fatherId) {
+ var s = t.extension1?.toIntOrNull() ?: 0
+ s += r.first.extension1?.toIntOrNull() ?: 0
+ // 闄愬埗鏈�楂樻墸鍒�
+ if (abs(s) > (t.maxscore ?: 0)) {
+ s = 0 - (t.maxscore ?: 0)
+ }
+ t.extension1 = s.toString()
+ break
+ }
+ }
+ }
+ }
+
+ /**
+ * 璁$畻鎬诲垎
+ */
+ private fun totalGrade(index: Int, evaluationScene: AopDataSource.EvaluationScene): Pair<Evaluation, List<Itemevaluation>>? {
+ val scene = evaluationScene.scene.value ?: return null
+ val topItems = evaluationScene.topItems.value ?: return null
+ val rules = evaluationScene.rules.value ?: return null
+ val subTask = evaluationScene.subTask.value
+ val inspection = evaluationScene.inspection.value
+ val totalScore = evaluationScene.totalScore.value ?: return null
+
+ var total = 0//鎬绘墸闄ょ殑鍒嗘暟
+ evaluationScene.topItems.value?.forEach top@{ top ->
+ total += top.extension1?.toIntOrNull() ?: 0
+ }
+ val evaluation = Evaluation().apply {
+ evaluationScene.baseRule.value?.let {
+ guid = UUIDGenerator.generate16ShortUUID()
+ iguid = inspection?.guid
+ stguid = subTask?.stguid
+ sguid = subTask?.scenseid
+ scensetypeid = scene.typeid
+ scensetype = scene.type
+ subscensetypeid = scene.scensesubtypeid
+ subscensetype = scene.scensesubtype
+ ertype = it.ruletype?.toByte()
+ provincecode = scene.provincecode
+ provincename = scene.provincename
+ citycode = scene.citycode
+ cityname = scene.cityname
+ districtcode = scene.districtcode
+ districtname = scene.districtname
+ towncode = scene.towncode
+ townname = scene.townname
+ scensename = scene.name
+ scenseaddress = scene.location
+ evaluatetime = subTask?.planstarttime
+ evaluatorguid = "admin"
+ evaluatorusername = "admin"
+ evaluatorrealname = "admin"
+ resultscorebef = (totalScore - abs(total)).toString()
+ createdate = subTask?.planstarttime
+ updatedate = Date()
+ }
+ }
+ //瀛愰」鍏蜂綋寰楀垎
+ val itemevaluationList = mutableListOf<Itemevaluation>()
+ topItems.forEach { subRule ->
+ val item = ScoreUtil.newItemEvaluation(evaluationScene, subRule)
+ itemevaluationList.add(item)
+ }
+ rules.forEach { p ->
+ if (p.first.ertype != 2) {
+ val item = ScoreUtil.newItemEvaluation(evaluationScene, p.first)
+ itemevaluationList.add(item)
+ }
+ p.second.forEach { r ->
+ val item1 = ScoreUtil.newItemEvaluation(evaluationScene, r)
+ itemevaluationList.add(item1)
+ }
+ }
+ return Pair(evaluation, itemevaluationList)
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt
new file mode 100644
index 0000000..4a50913
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreItem.kt
@@ -0,0 +1,91 @@
+package cn.flightfeather.supervision.business.autooutput.score
+
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
+import cn.flightfeather.supervision.common.utils.DateUtil
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
+import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
+import cn.flightfeather.supervision.domain.ds1.mapper.ProblemlistMapper
+import org.springframework.beans.factory.annotation.Autowired
+import tk.mybatis.mapper.entity.Example
+import kotlin.math.abs
+
+/**
+ * 鑷姩璇勫垎鏉$洰
+ */
+abstract class ScoreItem() {
+
+ //鑷姩璇勫垎鏉$洰id
+ abstract var id: String
+ //鑷姩璇勫垎鏉$洰鍚嶇О
+ abstract var name:String
+ //鏈�澶у垎鍊�
+ var maxScore: Int = 0
+ //鏈�灏忓垎鍊硷紙榛樿0鍒嗭級
+ var minScore: Int = 0
+
+ val dateUtil = DateUtil()
+ // 璇勫垎椤规槸鍚﹁眮鍏嶄笉鎵e垎
+ var exemption = false
+
+ lateinit var evaluationScene: AopDataSource.EvaluationScene
+
+ private var rulePair: Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>? = null
+
+ @Autowired
+ lateinit var problemlistMapper: ProblemlistMapper
+
+ /**
+ * 鍙墽琛岀壒娈婃墸鍒嗛�昏緫
+ */
+ fun execute(evaluationScene: AopDataSource.EvaluationScene) {
+ this.evaluationScene = evaluationScene
+ if (!exemption && !evaluationScene.noRecord()) {
+ getRule(evaluationScene.rules.value)
+ calScore()
+ }
+ }
+
+ /**
+ * 鑾峰彇璇勫垎瑙勫垯
+ */
+ private fun getRule(eList: MutableList<Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>>?) {
+ if (eList == null) return
+ for (e in eList) {
+ if (e.first.guid == id) {
+ rulePair = e
+ e.first.maxscore?.let { maxScore = it }
+ e.first.minscore?.let { minScore = it }
+ e.second.sortBy { it.displayid }
+ break
+ }
+ }
+ }
+
+ /**
+ * 鏍规嵁绯荤粺澶栬幏鍙栫殑淇℃伅锛岃繘琛屾墸鍒嗗垽瀹氥�傝繑鍥為渶瑕佹墸鍒嗙殑鏉$洰搴忓彿
+ * @param size 浼犲叆璇勫垎鏉$洰鐨勬暟閲忥紝璇勫垎鏉$洰鎸夌収涓�瀹氳鍒欒繘琛屾帓搴�
+ * @return 杩斿洖闇�瑕佹墸鍒嗙殑璇勫垎鏉$洰鐨勫簭鍙�
+ */
+ abstract fun otherProblem(size: Int): Int?
+
+ /**
+ * 鑷姩璇勫垎璁$畻閫昏緫
+ */
+ fun calScore() {
+ if (rulePair?.second == null || rulePair?.second?.isEmpty() == true) {
+ println("${name}: 璇勫垎鏉$洰涓虹┖锛屼笉鍋氳瘎鍒�")
+ return
+ }
+
+ otherProblem(rulePair?.second!!.size)?.let {i-> rulePair?.second!![i].getScore() }
+
+ ScoreUtil.subRuleCal(rulePair)
+ }
+
+ /**
+ * 鍑忓垎妯″紡涓嬶紝璁$畻鍏蜂綋閫夐」鐨勫緱鍒�
+ */
+ fun Evaluationsubrule2.getScore() {
+ extension1 = (0 - (maxscore ?: 0)).toString()
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt
new file mode 100644
index 0000000..b1385d3
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/ScoreUtil.kt
@@ -0,0 +1,66 @@
+package cn.flightfeather.supervision.business.autooutput.score
+
+import cn.flightfeather.supervision.business.Info
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
+import cn.flightfeather.supervision.common.utils.UUIDGenerator
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
+import cn.flightfeather.supervision.domain.ds1.entity.Inspection
+import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
+import kotlin.math.abs
+
+/**
+ * 寰楀垎璁$畻宸ュ叿
+ * 璇勫垎琛ㄦ牸鍒嗕负涓変釜灞傜骇
+ * 绗竴灞備负澶у垎绫伙紝绗簩灞備负璇勪及鏍囧噯锛岀涓夊眰涓烘爣鍑嗗搴旂殑涓嶅悓绋嬪害鐨勮瘎浼扮粨鏋�
+ */
+object ScoreUtil {
+
+ /**
+ * 璁$畻鏌愪竴鍏蜂綋璇勫垎鏍囧噯鐨勫緱鍒�
+ * 閽堝鍑忓垎妯″紡
+ */
+ fun subRuleCal(rulePair: Pair<Evaluationsubrule2, MutableList<Evaluationsubrule2>>?) {
+ val rule = rulePair?.first
+ val itemList = rulePair?.second
+ var total: Int? = null
+ itemList?.forEach {
+ if (!it.extension1.isNullOrBlank()) {
+ total = (total ?: 0) + it.extension1!!.toInt()
+ }
+ }
+ if (total == null) {
+ rule?.extension1 = "0"
+ } else {
+ val s = if (abs(total!!) > rule?.maxscore!!) {
+ 0 - rule.maxscore!!
+ } else {
+ total
+ }
+ rule.extension1 = s.toString()
+ }
+ }
+
+ /**
+ * 鐢熸垚鏂扮殑涓�鏉¤瘎鍒嗚褰�
+ */
+ fun newItemEvaluation(evaluationScene: AopDataSource.EvaluationScene, itemRule: Evaluationsubrule2) =
+ Itemevaluation().apply {
+ val rule = evaluationScene.baseRule.value
+ val subTask = evaluationScene.subTask.value
+ val inspection = evaluationScene.inspection.value
+ ieguid = UUIDGenerator.generate16ShortUUID()
+ iguid = inspection?.guid
+ stguid = subTask?.stguid
+ sguid = subTask?.scenseid
+ sensename = subTask?.scensename
+ erguid = rule?.guid
+ rulename = rule?.rulename
+ ruletype = rule?.ruletype?.toInt()
+ ertype = itemRule.ertype
+ esrguid = itemRule.guid
+ name = itemRule.itemname
+ value = itemRule.extension1 ?: "0"
+ extension1 = (itemRule.extension1 != null).toString()
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem1.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem1.kt
new file mode 100644
index 0000000..80df22a
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem1.kt
@@ -0,0 +1,57 @@
+package cn.flightfeather.supervision.business.autooutput.score.construction
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import javax.annotation.PostConstruct
+
+/**
+ * Date 2022/1/20 16:14
+ * Created by feiyu
+ * 宸ュ湴
+ */
+@Component
+class CsScoreItem1: ScoreItem() {
+
+ companion object {
+ private lateinit var instance: CsScoreItem1
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "amSNTZfXs2XXR1td"
+
+ override var name: String = "鏁存敼鎺柦鍙婃晥鏋�"
+
+ /**
+ * 鎵ф硶妫�鏌ユ眹鎬绘儏鍐�
+ * 閫夐」濡備笅锛�
+ * 1.闂閮ㄥ垎鏁存敼鎴栦笉鍙婃椂鎻愪緵鏉愭枡
+ * 2.闂鏃犳暣鏀�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+ createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
+// .andGreaterThanOrEqualTo("time", info.sTime)
+// .andLessThan("time", info.eTime)
+ })
+ var i = 0
+
+ val total = p.size
+ var changed = 0
+ p.forEach {
+ if (it.ischanged == true) {
+ changed++
+ }
+ }
+ return when {
+ changed == 0 && total > 0 -> 1
+ changed < total -> 0
+ else -> null
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem2.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem2.kt
new file mode 100644
index 0000000..40a8ae9
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/CsScoreItem2.kt
@@ -0,0 +1,67 @@
+package cn.flightfeather.supervision.business.autooutput.score.construction
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
+import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
+import javax.annotation.PostConstruct
+
+/**
+ * Date 2022/1/20 16:14
+ * Created by feiyu
+ * 宸ュ湴
+ */
+@Component
+class CsScoreItem2: ScoreItem() {
+
+ companion object {
+ private lateinit var instance: CsScoreItem2
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "dCQbQ8ibc6nexiJo"
+
+ override var name: String = "鎵皹鍦ㄧ嚎鐩戞祴鏁版嵁閲忕骇"
+
+ @Autowired
+ lateinit var dustDataResultMapper: DustDataResultMapper
+
+ /**
+ * 鎵皹鍦ㄧ嚎鐩戞祴鏁版嵁閲忕骇
+ * 閫夐」濡備笅锛�
+ * 1.鐩戞祴鏁版嵁鍑虹幇鍗曟棩鍙婁互涓婃湁鏁堣秴鏍�
+ * 2.鐩戞祴鏁版嵁鏈堝潎鍊艰秴鍖哄煙鏈堝潎鍊�20%浠ヤ笂鎴栨暟鎹槑鏄惧紓甯�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val time = evaluationScene.subTask.value?.planstarttime
+ val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
+ val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
+ val et = st.plusMonths(1)
+ val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply {
+ createCriteria().andGreaterThanOrEqualTo("drTime", st)
+ .andLessThan("drTime", et)
+ .andEqualTo("drSceneId", evaluationScene.scene.value?.guid)
+ })
+
+ var result: Int? = null
+ r.forEach {
+ if (it == null) return@forEach
+ if (it.drExceedTimes > 0) {
+ result = 0
+ }
+ if (it.drOverAvgPer > 0.2) {
+ result = 1
+ }
+ }
+
+ return result
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JADataAnalysis.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JADataAnalysis.kt
new file mode 100644
index 0000000..d38fe60
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JADataAnalysis.kt
@@ -0,0 +1,153 @@
+package cn.flightfeather.supervision.business.autooutput.score.construction
+
+import cn.flightfeather.supervision.business.autooutput.AopOutput
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
+import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper
+import cn.flightfeather.supervision.business.autooutput.datasource.AopSceneTypeCheck
+import cn.flightfeather.supervision.business.autooutput.score.AopDataAnalysis
+import cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap
+import cn.flightfeather.supervision.domain.ds2.entity.HourDustData
+import cn.flightfeather.supervision.domain.ds2.mapper.DustSiteMapMapper
+import cn.flightfeather.supervision.domain.ds2.mapper.HourDustDataMapper
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.Duration
+import java.time.LocalDateTime
+import java.time.ZoneId
+import kotlin.math.round
+
+/**
+ * 闈欏畨宸ュ湴鎵皹鐩戞祴鏁版嵁缁熻
+ */
+@Component
+class JADataAnalysis(
+ aopDbMapper: AopDbMapper,
+ aopSceneTypeCheck: AopSceneTypeCheck,
+ aopOutput: AopOutput,
+ private val dustSiteMapMapper: DustSiteMapMapper,
+ private val hourDustDataMapper: HourDustDataMapper,
+) : AopDataAnalysis<HourDustData>(aopDbMapper, aopSceneTypeCheck, aopOutput) {
+
+ companion object {
+ private const val FLAG_NA = "NA"
+ private const val FLAG_N = "N"
+ private const val FLAG_I = "I"
+ }
+
+ override fun districtAvg(source: AopDataSource?): Double? {
+ var total = .0
+ var count = 0
+ hourDustDataMapper.selectByExample(Example(HourDustData::class.java).apply {
+ createCriteria().andBetween("lst", source?.config?.startTime, source?.config?.endTime)
+ }).forEach {
+ it?.dustvalue?.let { v ->
+ total += v
+ count++
+ }
+ }
+ return if (count == 0) {
+ .0
+ } else {
+ round((total / count) * 1000) / 1000
+ }
+ }
+
+ override fun fetchDataResources(evaluationScene: AopDataSource.EvaluationScene): List<List<HourDustData?>> {
+ val dustSiteMaps = dustSiteMapMapper.selectByExample(Example(DustSiteMap::class.java).apply {
+ createCriteria().andEqualTo("svUserId", evaluationScene.userInfo.value?.guid)
+ .andIsNotNull("jaMnCode")
+ })
+ if (dustSiteMaps.isEmpty()) return emptyList()
+
+ val mnCodeList = dustSiteMaps.map { it?.jaMnCode }
+ val map = mutableMapOf<String?, MutableList<HourDustData?>>()
+ hourDustDataMapper.selectByExample(Example(HourDustData::class.java).apply {
+ createCriteria().andBetween("lst", evaluationScene.config?.startTime, evaluationScene.config?.endTime)
+ .andIn("mncode", mnCodeList)
+ }).forEach {
+ if (!map.containsKey(it?.mncode)) {
+ map[it?.mncode] = mutableListOf()
+ }
+ map[it?.mncode]?.add(it)
+ }
+ val res = mutableListOf<List<HourDustData?>>()
+ map.forEach { (_, u) ->
+ res.add(u)
+ }
+ return res
+ }
+
+ override fun exceedTimes(data: HourDustData, t: TempResult) {
+ data.dustvalue?.let {
+ if (it >= 1) {
+ t.count++
+ }
+ }
+ }
+
+ override fun avg(data: HourDustData, t: TempResult) {
+ // 琛ヤ紶鐨勪笉璁$畻
+ if (data.flag == FLAG_NA) return
+
+ data.dustvalue?.let {
+ t.total += it
+ t.count++
+ }
+ }
+
+ override fun max(data: HourDustData, t: TempResult) {
+ data.dustvalue?.let {
+ if (it > t.total) {
+ t.total = it
+ }
+ }
+ }
+
+ override fun min(data: HourDustData, t: TempResult) {
+ // 琛ヤ紶鐨勪笉璁$畻
+ if (data.flag == FLAG_NA) return
+
+ data.dustvalue?.let {
+ if (t.count == 0 || it < t.total) {
+ t.total = it
+ }
+ // 閫氳繃t.count 鏉ュ垽瀹氭槸鍚︽槸鍒濆鍖栫姸鎬�
+ if (t.count == 0) t.count = 1
+ }
+ }
+
+ override fun overAvgRate(avg: Double, dAvg: Double?): Double {
+ return if (dAvg != null) {
+ round(((avg - dAvg) / dAvg) * 1000) / 1000
+ } else {
+ .0
+ }
+ }
+
+ override fun count(dataList: List<List<HourDustData?>>): Int {
+ var count = 0
+ dataList.forEach {
+ it.forEach {h ->
+ if (h?.flag != FLAG_NA) {
+ count ++
+ }
+ }
+ }
+ return count
+ }
+
+ override fun effectiveRate(dataList: List<List<HourDustData?>>, evaluationScene: AopDataSource.EvaluationScene):
+ Double {
+ if (dataList.isEmpty()) return .0
+
+ val st = LocalDateTime.ofInstant(evaluationScene.config?.startTime?.toInstant(), ZoneId.systemDefault())
+ val et = LocalDateTime.ofInstant(evaluationScene.config?.endTime?.toInstant(), ZoneId.systemDefault())
+ val days = Duration.between(st, et).toDays() + 1
+
+ return if (days == 0L) {
+ .0
+ } else {
+ round((count(dataList) / (dataList.size * days * 24).toDouble()) * 1000) / 1000
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JAScore.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JAScore.kt
new file mode 100644
index 0000000..dda636a
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JAScore.kt
@@ -0,0 +1,62 @@
+package cn.flightfeather.supervision.business.autooutput.score.construction
+
+import cn.flightfeather.supervision.business.Info
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
+import cn.flightfeather.supervision.domain.ds1.entity.Score
+import cn.flightfeather.supervision.domain.ds1.mapper.ScoreMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
+
+/**
+ * 涓婃捣甯傞潤瀹夊尯鍗曠嫭鐨�50鍒嗗埗璇勫垎缁撴灉锛�
+ * 鏍规嵁鑷姩璇勫垎缁撴灉杩涜杞崲寰楀嚭
+ */
+@Component
+class JAScore {
+
+ @Autowired
+ lateinit var scoreMapper: ScoreMapper
+
+ fun toDb(e: Evaluation, info: Info) {
+ val time = LocalDateTime.ofInstant(e.evaluatetime?.toInstant(), ZoneId.systemDefault())
+ val scoreVo = Score().apply {
+ sceneId = e.sguid
+ sceneName = e.scensename
+ year = time.year
+ month = time.monthValue
+ districtCode = e.districtcode
+ districtName = e.districtname
+ score = transform(e.resultscorebef?.toIntOrNull() ?: 0)
+ completion = !info.online
+ }
+
+ val res = scoreMapper.selectByExample(Example(Score::class.java).apply {
+ createCriteria().andEqualTo("sceneId", e.sguid)
+ .andEqualTo("year", time.year)
+ .andEqualTo("month", time.monthValue)
+ })
+ if (res.isNotEmpty()) {
+ scoreVo.id = res[0].id
+ scoreMapper.updateByPrimaryKeySelective(scoreVo)
+ } else {
+ scoreMapper.insert(scoreVo)
+ }
+ }
+
+ /**
+ * 鍒嗘暟杞崲
+ */
+ private fun transform(oldS: Int): Int {
+ return when {
+ // 鍩烘湰瑙勮寖
+ oldS >= 90 -> 50
+ // 涓嶈鑼�
+ oldS >= 50 -> 30
+ // 涓ラ噸涓嶈鑼�
+ else -> 10
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem1.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem1.kt
new file mode 100644
index 0000000..41ef7b6
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem1.kt
@@ -0,0 +1,57 @@
+package cn.flightfeather.supervision.business.autooutput.score.mixingplant
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import javax.annotation.PostConstruct
+
+/**
+ * Date 2022/1/20 16:14
+ * Created by feiyu
+ * 鎼呮媽绔�
+ */
+@Component
+class MpScoreItem1: ScoreItem() {
+
+ companion object {
+ private lateinit var instance: MpScoreItem1
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "KxWcuelbrnCtzw6n"
+
+ override var name: String = "鏁存敼鎺柦鍙婃晥鏋�"
+
+ /**
+ * 鎵ф硶妫�鏌ユ眹鎬绘儏鍐�
+ * 閫夐」濡備笅锛�
+ * 1.闂閮ㄥ垎鏁存敼鎴栦笉鍙婃椂鎻愪緵鏉愭枡
+ * 2.闂鏃犳暣鏀�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+ createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
+// .andGreaterThanOrEqualTo("time", info.sTime)
+// .andLessThan("time", info.eTime)
+ })
+ var i = 0
+
+ val total = p.size
+ var changed = 0
+ p.forEach {
+ if (it.ischanged == true) {
+ changed++
+ }
+ }
+ return when {
+ changed == 0 && total > 0 -> 1
+ changed < total -> 0
+ else -> null
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem2.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem2.kt
new file mode 100644
index 0000000..1e99a24
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/mixingplant/MpScoreItem2.kt
@@ -0,0 +1,67 @@
+package cn.flightfeather.supervision.business.autooutput.score.mixingplant
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
+import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
+import javax.annotation.PostConstruct
+
+/**
+ * Date 2022/1/20 16:14
+ * Created by feiyu
+ * 鎼呮媽绔�
+ */
+@Component
+class MpScoreItem2: ScoreItem() {
+
+ companion object {
+ private lateinit var instance: MpScoreItem2
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "BoVfRjr5r7RtsqGC"
+
+ override var name: String = "鎵皹鍦ㄧ嚎鐩戞祴鏁版嵁閲忕骇"
+
+ @Autowired
+ lateinit var dustDataResultMapper: DustDataResultMapper
+
+ /**
+ * 鎵皹鍦ㄧ嚎鐩戞祴鏁版嵁閲忕骇
+ * 閫夐」濡備笅锛�
+ * 1.鐩戞祴鏁版嵁鍑虹幇鍗曟棩鍙婁互涓婃湁鏁堣秴鏍�
+ * 2.鐩戞祴鏁版嵁鏈堝潎鍊艰秴鍖哄煙鏈堝潎鍊�20%浠ヤ笂鎴栨暟鎹槑鏄惧紓甯�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val time = evaluationScene.subTask.value?.planstarttime
+ val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
+ val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
+ val et = st.plusMonths(1)
+ val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply {
+ createCriteria().andGreaterThanOrEqualTo("drTime", st)
+ .andLessThan("drTime", et)
+ .andEqualTo("drSceneId", evaluationScene.scene.value?.guid)
+ })
+
+ var result: Int? = null
+ r.forEach {
+ if (it == null) return@forEach
+ if (it.drExceedTimes > 0) {
+ result = 0
+ }
+ if (it.drOverAvgPer > 0.2) {
+ result = 1
+ }
+ }
+
+ return result
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem10.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem10.kt
new file mode 100644
index 0000000..10faf8d
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem10.kt
@@ -0,0 +1,100 @@
+package cn.flightfeather.supervision.business.autooutput.score.restaurant
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds2.entity.Punishment
+import cn.flightfeather.supervision.domain.ds2.mapper.PunishmentMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDate
+import java.time.LocalDateTime
+import java.time.ZoneId
+import java.util.*
+import javax.annotation.PostConstruct
+
+@Component
+class ReScoreItem10: ScoreItem() {
+ companion object {
+ private lateinit var instance: ReScoreItem10
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ @Autowired
+ lateinit var punishmentMapper: PunishmentMapper
+
+ override var id: String = "dlALSsoF63Z2FOz0"
+
+ override var name: String = "琛屾斂澶勭綒"
+
+ /**
+ * 瀛e害鍐呰鏀垮缃氳褰曡鏍煎寲瀵煎叆
+ * 閫夐」濡備笅锛�
+ * 1.鏃犺矗浠ゆ暣鏀广�佹墽娉曟剰瑙佸拰琛屾斂澶勭綒
+ * 2.鏀跺埌璐d护鏀规鍐冲畾涔�
+ * 3.鏀跺埌鎵ф硶鎰忚涔�
+ * 4.鏈夌幆澧冭繚娉曡涓轰笖鍙楀埌琛屾斂澶勭綒
+ */
+ override fun otherProblem(size: Int): Int? {
+ val time = evaluationScene.subTask.value?.planstarttime
+ val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
+ val s = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
+ val e = s.plusMonths(1)
+
+ var i = 1
+ when {
+ condition3(s, e) -> {
+ i = 3
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ condition2(s, e) -> {
+ i = 2
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ condition1(s, e) -> {
+ i = 1
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ else -> return null
+ }
+ }
+
+ /**
+ * @return true 鏀跺埌璐d护鏀规鍐冲畾涔�
+ */
+ private fun condition1(s: LocalDateTime, e: LocalDateTime): Boolean {
+ val p = punishmentMapper.selectByExample(Example(Punishment::class.java).apply {
+ createCriteria().andEqualTo("pmSceneId", evaluationScene.userInfoTZ.value?.guid)
+ .andEqualTo("pmExtension1", "1")
+ .andGreaterThanOrEqualTo("pmTime", s)
+ .andLessThan("pmTime", e)
+ })
+ return p.isNotEmpty()
+ }
+
+ /**
+ * @return true 鏀跺埌鎵ф硶鎰忚涔�
+ */
+ private fun condition2(s: LocalDateTime, e: LocalDateTime): Boolean {
+ return false
+ }
+
+ /**
+ * @return true 鏈夌幆澧冭繚娉曡涓轰笖鍙楀埌琛屾斂澶勭綒
+ */
+ private fun condition3(s: LocalDateTime, e: LocalDateTime): Boolean {
+ val p = punishmentMapper.selectByExample(Example(Punishment::class.java).apply {
+ createCriteria().andEqualTo("pmSceneId", evaluationScene.userInfoTZ.value?.guid)
+ .andEqualTo("pmExtension1", "0")
+ .andGreaterThanOrEqualTo("pmTime", s)
+ .andLessThan("pmTime", e)
+ })
+ return p.isNotEmpty()
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem11.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem11.kt
new file mode 100644
index 0000000..746cb89
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem11.kt
@@ -0,0 +1,54 @@
+package cn.flightfeather.supervision.business.autooutput.score.restaurant
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import org.springframework.stereotype.Component
+import javax.annotation.PostConstruct
+
+@Component
+class ReScoreItem11: ScoreItem() {
+ companion object {
+ private lateinit var instance: ReScoreItem11
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "QFzQPYgUXaHU4tTD"
+
+ override var name: String="淇$敤鎵胯鑷瘎"
+
+ /**
+ * 椋炵窘鐜APP骞村害鎵胯鍜屾湀搴﹁嚜璇勮褰�
+ * 閫夐」濡備笅锛�
+ * 1.鐜淇$敤涓嶈鑼冩垨鎵胯鏈寜鏃舵彁浜ゆ垨瓒呮湁鏁堟湡锛屼互鍙婃秹鍙婃硶浜哄彉鏇寸殑鎴栬惀涓氭墽鐓у彉鏇存湭閲嶆柊鎵胯鐨�
+ * 2.鐜淇$敤鑷瘎鏈寜鏃惰嚜璇勬垨鏈寜鏃舵彁
+ */
+ override fun otherProblem(size: Int): Int? {
+ var i = 1
+ if (condition1()) {
+ if (i > size - 1) i = size - 1
+ return i
+ } else if (condition2()) {
+ i = 2
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ return null
+ }
+
+ /**
+ * @return true 鐜淇$敤涓嶈鑼冩垨鎵胯鏈寜鏃舵彁浜ゆ垨瓒呮湁鏁堟湡锛屼互鍙婃秹鍙婃硶浜哄彉鏇寸殑鎴栬惀涓氭墽鐓у彉鏇存湭閲嶆柊鎵胯鐨�
+ */
+ private fun condition1(): Boolean {
+ return false
+ }
+
+ /**
+ * @return true 鐜淇$敤鑷瘎鏈寜鏃惰嚜璇勬垨鏈寜鏃舵彁
+ */
+ private fun condition2(): Boolean {
+ return false
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem5.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem5.kt
new file mode 100644
index 0000000..688df3e
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem5.kt
@@ -0,0 +1,98 @@
+package cn.flightfeather.supervision.business.autooutput.score.restaurant
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
+import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
+import javax.annotation.PostConstruct
+
+@Component
+class ReScoreItem5: ScoreItem() {
+ companion object {
+ private lateinit var instance: ReScoreItem5
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "PSQUi9f0f7JK6w9d"
+
+ override var name: String="娌圭儫鍦ㄧ嚎鐩戞祴鏁版嵁閲忕骇"
+
+ @Autowired
+ lateinit var dustDataResultMapper: DustDataResultMapper
+
+ /**
+ * 寰愭眹鍖洪楗洃绠″钩鍙拌仈缃戣褰曘�佸湪绾跨巼鍒嗘瀽鏁版嵁鍜岄珮宄扮粡钀ユ椂娈靛皬鏃惰秴鏍囨儏鍐�
+ * 閫夐」濡備笅锛�
+ * 1.鏁版嵁鏃犲紓甯镐笖鏃犺秴鏍囨垨鏄剧ず鍑�鍖栬缃竻娲�
+ * 2.楂樺嘲缁忚惀鏃舵鏁版嵁鍦ㄧ嚎鐜囦綆浜�90%鎴栨樉绀哄噣鍖栬缃晠闅�
+ * 3.褰撴湀楂樺嘲缁忚惀鏃舵鍑虹幇涓夋鍙婁互涓�10鍒嗛挓鍧囧�艰秴鏍囨垨鏄剧ず鍑�鍖栬缃緝鑴�
+ * 4.褰撴湀楂樺嘲缁忚惀鏃舵鏁版嵁鎸佺画寮傚父鎴栧嚭鐜颁笁娆″強浠ヤ笂灏忔椂鏁版嵁瓒呮爣鎴栨棤娌圭儫鍑�鍖栬缃垨鍑�鍖栬缃湭姝e父寮�鍚�
+ */
+ override fun otherProblem(size: Int): Int? {
+ var i = 1
+ when {
+ condition1() -> {
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ condition2() -> {
+ i = 2
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ condition3() -> {
+ i = 3
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ else -> return null
+ }
+ }
+
+ /**
+ * @return true 楂樺嘲缁忚惀鏃舵鏁版嵁鍦ㄧ嚎鐜囦綆浜�90%鎴栨樉绀哄噣鍖栬缃晠闅�
+ */
+ private fun condition1(): Boolean {
+ return false
+ }
+
+ /**
+ * @return true 褰撴湀楂樺嘲缁忚惀鏃舵鍑虹幇涓夋鍙婁互涓�10鍒嗛挓鍧囧�艰秴鏍囨垨鏄剧ず鍑�鍖栬缃緝鑴�
+ */
+ private fun condition2(): Boolean {
+ val time = evaluationScene.subTask.value?.planstarttime
+ val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
+ val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
+ val et = st.plusMonths(1)
+ val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply {
+ createCriteria().andGreaterThanOrEqualTo("drTime", st)
+ .andLessThan("drTime", et)
+ .andEqualTo("drSceneId", evaluationScene.scene.value?.guid)
+ })
+
+ var result = false
+ r.forEach {
+ if (it == null) return@forEach
+ if (it.drExceedTimes >= 3) {
+ result = true
+ }
+ }
+ return result
+ }
+
+ /**
+ * @return true 褰撴湀楂樺嘲缁忚惀鏃舵鏁版嵁鎸佺画寮傚父鎴栧嚭鐜颁笁娆″強浠ヤ笂灏忔椂鏁版嵁瓒呮爣鎴栨棤娌圭儫鍑�鍖栬缃垨鍑�鍖栬缃湭姝e父寮�鍚�
+ */
+ private fun condition3(): Boolean {
+ return false
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem7.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem7.kt
new file mode 100644
index 0000000..24b01a8
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem7.kt
@@ -0,0 +1,95 @@
+package cn.flightfeather.supervision.business.autooutput.score.restaurant
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
+import cn.flightfeather.supervision.domain.ds2.entity.LedgerRecord
+import cn.flightfeather.supervision.domain.ds2.entity.LedgerSubType
+import cn.flightfeather.supervision.domain.ds2.mapper.LedgerRecordMapper
+import cn.flightfeather.supervision.domain.ds2.mapper.LedgerSubTypeMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
+import javax.annotation.PostConstruct
+
+@Component
+class ReScoreItem7: ScoreItem() {
+ companion object {
+ private lateinit var instance: ReScoreItem7
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ init {
+ exemption = true
+ }
+
+ @Autowired
+ lateinit var ledgerRecordMapper: LedgerRecordMapper
+
+ @Autowired
+ lateinit var ledgerSubTypeMapper: LedgerSubTypeMapper
+
+ override var id: String = "wfzFTlcZ3xMdj5M2"
+
+ override var name: String = "鍙拌处绠$悊"
+
+ /**
+ * 鍦ㄧ嚎鍙拌处璁板綍鐨勬彁浜ょ被鍒畬鏁存�у拰鍙婃椂鎬�
+ * 閫夐」r濡備笅锛�
+ * 1.鍙拌处绫诲埆榻愬叏銆佸畬鏁淬�佸強鏃惰褰曟洿鏂�
+ * 2.鍙拌处灏戦噺缂哄け鎴栨湭鍙婃椂璁板綍鏇存柊
+ * 3.鍙拌处涓ラ噸缂哄け鎴栧叧閿彴璐︽棤鏁�
+ */
+ override fun otherProblem(size: Int): Int? {
+ // TODO: 2021/3/9 鎵惧嚭鐢ㄦ埛绫诲瀷瀵瑰簲鐨勫繀濉彴璐�
+ val time = evaluationScene.subTask.value?.planstarttime
+ val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
+ val year = lt.year
+ val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
+ val et = st.plusMonths(1)
+
+ val ledgerTypeCount = ledgerSubTypeMapper.selectCountByExample(Example(LedgerSubType::class.java).apply {
+ createCriteria().andEqualTo("lScenetype", "1").andEqualTo("lNeedupdate", true)
+ })
+ val rCount = ledgerRecordMapper.selectCountByExample(Example(LedgerRecord::class.java).apply {
+ createCriteria().andEqualTo("lrYear", year)
+ .andGreaterThanOrEqualTo("lrSubmitdate", st)
+ .andLessThanOrEqualTo("lrSubmitdate", et)
+ .andEqualTo("lrSubmitid", evaluationScene.userInfoTZ.value?.guid)
+ })
+ var i = 1
+ if (condition1(ledgerTypeCount, rCount)) {
+ if (i > size - 1) i = size - 1
+ return i
+ } else if (condition2(ledgerTypeCount, rCount)) {
+ i = 2
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ return null
+ }
+
+ /**
+ * @param c1 蹇呭~椤瑰彴璐︾被鍒暟
+ * @param c2 瀹為檯涓婁紶鏁�
+ * @return true 鍙拌处灏戦噺缂哄け鎴栨湭鍙婃椂璁板綍鏇存柊
+ */
+ private fun condition1(c1: Int, c2: Int): Boolean {
+ return (c2.toDouble() / c1.toDouble()) >= 0.8
+ }
+
+ /**
+ * @param c1 蹇呭~椤瑰彴璐︾被鍒暟
+ * @param c2 瀹為檯涓婁紶鏁�
+ * @return true 鍙拌处涓ラ噸缂哄け鎴栧叧閿彴璐︽棤鏁�
+ */
+ private fun condition2(c1: Int, c2: Int): Boolean {
+ return (c2.toDouble() / c1.toDouble()) <= 0.3
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem8.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem8.kt
new file mode 100644
index 0000000..b66e538
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem8.kt
@@ -0,0 +1,56 @@
+package cn.flightfeather.supervision.business.autooutput.score.restaurant
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import javax.annotation.PostConstruct
+
+/**
+ * Date 2022/1/20 16:14
+ * Created by feiyu
+ */
+@Component
+class ReScoreItem8: ScoreItem() {
+
+ companion object {
+ private lateinit var instance: ReScoreItem8
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "yAAn3zm6e2PenHeJ"
+
+ override var name: String = "鏁存敼鎺柦鍙婃晥鏋�"
+
+ /**
+ * 鎵ф硶妫�鏌ユ眹鎬绘儏鍐�
+ * 閫夐」濡備笅锛�
+ * 1.闂閮ㄥ垎鏁存敼鎴栦笉鍙婃椂鎻愪緵鏉愭枡
+ * 2.闂鏃犳暣鏀�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+ createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
+// .andGreaterThanOrEqualTo("time", info.sTime)
+// .andLessThan("time", info.eTime)
+ })
+ var i = 0
+
+ val total = p.size
+ var changed = 0
+ p.forEach {
+ if (it.ischanged == true) {
+ changed++
+ }
+ }
+ return when {
+ changed == 0 && total > 0 -> 1
+ changed < total -> 0
+ else -> null
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem9.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem9.kt
new file mode 100644
index 0000000..431585c
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/restaurant/ReScoreItem9.kt
@@ -0,0 +1,91 @@
+package cn.flightfeather.supervision.business.autooutput.score.restaurant
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds2.entity.Complaint
+import cn.flightfeather.supervision.domain.ds2.mapper.ComplaintMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDate
+import java.time.LocalDateTime
+import java.time.ZoneId
+import java.time.format.DateTimeFormatter
+import javax.annotation.PostConstruct
+
+@Component
+class ReScoreItem9: ScoreItem() {
+ companion object {
+ private lateinit var instance: ReScoreItem9
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ @Autowired
+ lateinit var complaintMapper: ComplaintMapper
+
+ override var id: String = "mTre4cqan43BOW82"
+
+ override var name: String="淇¤鎶曡瘔"
+
+ /**
+ * 瀛e害鍐呬俊璁胯褰曡鏍煎寲瀵煎叆
+ * 閫夐」濡備笅锛�
+ * 1.鏃犱俊璁裤�佹棤鎶曡瘔銆佺洃绠¢厤鍚堢Н鏋�
+ * 2.鏈搴﹀彂鐢熷崟娆″尯绾т俊璁挎姇璇�
+ * 3.鏈搴﹀彂鐢熷競绾т俊璁挎姇璇夋垨澶氭鍖虹骇淇¤銆佹姇璇夋垨鐩戠涓嶉厤鍚�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val time = evaluationScene.subTask.value?.planstarttime
+ val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
+ val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
+ val et = st.plusMonths(1)
+
+ val complaints = complaintMapper.selectByExample(Example(Complaint::class.java).apply {
+ createCriteria().andEqualTo("cpSceneid", evaluationScene.userInfoTZ.value?.guid)
+ .andGreaterThanOrEqualTo("cpTime", st)
+ .andLessThan("cpTime", et)
+ })
+
+ var i = 2
+ if (condition2(complaints)) {
+ if (i > size - 1) i = size - 1
+ return i
+ } else if (condition1(complaints)) {
+ i = 1
+ if (i > size - 1) i = size - 1
+ return i
+ }
+ return null
+ }
+
+ /**
+ * @return true 鏈搴﹀彂鐢熷崟娆″尯绾т俊璁挎姇璇�
+ */
+ private fun condition1(c: List<Complaint>): Boolean {
+ c.forEach {
+ if (it.cpExtension1 == "1") {
+ return true
+ }
+ }
+ return false
+ }
+
+ /**
+ * @return true 鏈搴﹀彂鐢熷競绾т俊璁挎姇璇夋垨澶氭鍖虹骇淇¤銆佹姇璇夋垨鐩戠涓嶉厤鍚�
+ */
+ private fun condition2(c: List<Complaint>): Boolean {
+ var count = 0
+ c.forEach {
+ if (it.cpExtension1 == "0") {
+ //鍙戠敓甯傜骇淇¤鎶曡瘔
+ return true
+ } else {
+ count++
+ }
+ }
+ return count > 1
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/storage/StScoreItem1.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/storage/StScoreItem1.kt
new file mode 100644
index 0000000..af8a12f
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/storage/StScoreItem1.kt
@@ -0,0 +1,57 @@
+package cn.flightfeather.supervision.business.autooutput.score.storage
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import javax.annotation.PostConstruct
+
+/**
+ * Date 2022/1/20 16:14
+ * Created by feiyu
+ * 鍫嗗満
+ */
+@Component
+class StScoreItem1: ScoreItem() {
+
+ companion object {
+ private lateinit var instance: StScoreItem1
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "csInMYhgbBqWRyeB"
+
+ override var name: String = "鏁存敼鎺柦鍙婃晥鏋�"
+
+ /**
+ * 鎵ф硶妫�鏌ユ眹鎬绘儏鍐�
+ * 閫夐」濡備笅锛�
+ * 1.闂閮ㄥ垎鏁存敼鎴栦笉鍙婃椂鎻愪緵鏉愭枡
+ * 2.闂鏃犳暣鏀�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+ createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
+// .andGreaterThanOrEqualTo("time", info.sTime)
+// .andLessThan("time", info.eTime)
+ })
+ var i = 0
+
+ val total = p.size
+ var changed = 0
+ p.forEach {
+ if (it.ischanged == true) {
+ changed++
+ }
+ }
+ return when {
+ changed == 0 && total > 0 -> 1
+ changed < total -> 0
+ else -> null
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem1.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem1.kt
new file mode 100644
index 0000000..65548c0
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem1.kt
@@ -0,0 +1,57 @@
+package cn.flightfeather.supervision.business.autooutput.score.wharf
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import javax.annotation.PostConstruct
+
+/**
+ * Date 2022/1/20 16:14
+ * Created by feiyu
+ * 鐮佸ご
+ */
+@Component
+class WhScoreItem1: ScoreItem() {
+
+ companion object {
+ private lateinit var instance: WhScoreItem1
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "mgvVEecYRV8xrnf2"
+
+ override var name: String = "鏁存敼鎺柦鍙婃晥鏋�"
+
+ /**
+ * 鎵ф硶妫�鏌ユ眹鎬绘儏鍐�
+ * 閫夐」濡備笅锛�
+ * 1.闂閮ㄥ垎鏁存敼鎴栦笉鍙婃椂鎻愪緵鏉愭枡
+ * 2.闂鏃犳暣鏀�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+ createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
+// .andGreaterThanOrEqualTo("time", info.sTime)
+// .andLessThan("time", info.eTime)
+ })
+ var i = 0
+
+ val total = p.size
+ var changed = 0
+ p.forEach {
+ if (it.ischanged == true) {
+ changed++
+ }
+ }
+ return when {
+ changed == 0 && total > 0 -> 1
+ changed < total -> 0
+ else -> null
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem2.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem2.kt
new file mode 100644
index 0000000..d7e18d6
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/wharf/WhScoreItem2.kt
@@ -0,0 +1,67 @@
+package cn.flightfeather.supervision.business.autooutput.score.wharf
+
+import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
+import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult
+import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
+import javax.annotation.PostConstruct
+
+/**
+ * Date 2022/1/20 16:14
+ * Created by feiyu
+ * 鐮佸ご
+ */
+@Component
+class WhScoreItem2: ScoreItem() {
+
+ companion object {
+ private lateinit var instance: WhScoreItem2
+ }
+
+ @PostConstruct
+ fun init() {
+ instance = this
+ }
+
+ override var id: String = "5NNLSvkVRFfASMhc"
+
+ override var name: String = "鎵皹鍦ㄧ嚎鐩戞祴鏁版嵁閲忕骇"
+
+ @Autowired
+ lateinit var dustDataResultMapper: DustDataResultMapper
+
+ /**
+ * 鎵皹鍦ㄧ嚎鐩戞祴鏁版嵁閲忕骇
+ * 閫夐」濡備笅锛�
+ * 1.鐩戞祴鏁版嵁鍑虹幇鍗曟棩鍙婁互涓婃湁鏁堣秴鏍�
+ * 2.鐩戞祴鏁版嵁鏈堝潎鍊艰秴鍖哄煙鏈堝潎鍊�20%浠ヤ笂鎴栨暟鎹槑鏄惧紓甯�
+ */
+ override fun otherProblem(size: Int): Int? {
+ val time = evaluationScene.subTask.value?.planstarttime
+ val lt = LocalDateTime.ofInstant(time?.toInstant(), ZoneId.systemDefault())
+ val st = lt.withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0)
+ val et = st.plusMonths(1)
+ val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply {
+ createCriteria().andGreaterThanOrEqualTo("drTime", st)
+ .andLessThan("drTime", et)
+ .andEqualTo("drSceneId", evaluationScene.scene.value?.guid)
+ })
+
+ var result: Int? = null
+ r.forEach {
+ if (it == null) return@forEach
+ if (it.drExceedTimes > 0) {
+ result = 0
+ }
+ if (it.drOverAvgPer > 0.2) {
+ result = 1
+ }
+ }
+
+ return result
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt b/src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt
index 29140ee..c4a0b5f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt
@@ -77,6 +77,7 @@
var result = false
r.forEach {
+ if (it == null) return@forEach
if (it.drExceedTimes > 0) {
result = true
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/location/CoordinateUtil.kt b/src/main/kotlin/cn/flightfeather/supervision/business/location/CoordinateUtil.kt
new file mode 100644
index 0000000..a2678ce
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/location/CoordinateUtil.kt
@@ -0,0 +1,35 @@
+package cn.flightfeather.supervision.business.location
+
+import kotlin.math.PI
+import kotlin.math.cos
+import kotlin.math.sin
+
+object CoordinateUtil {
+
+ private const val Ea = 6378137 //璧ら亾鍗婂緞
+ private const val Eb = 6356725 //鏋佸崐寰�
+
+ /**
+ * 鏍规嵁鍧愭爣鐐广�佽窛绂诲拰瑙掑害锛岃幏鍙栧彟涓�涓潗鏍�
+ * @param pos 鍧愭爣鐐�
+ * @param len 璺濈锛堢背锛�
+ * @param radian 寮у害
+ */
+ fun getPointByLen(pos: Pair<Double, Double>, len: Double, radian: Double): Pair<Double, Double> {
+ val dx = len * sin(radian)
+ val dy = len * cos(radian)
+ val ec = Eb + (Ea - Eb) * (90.0 - pos.second) / 90.0
+ val ed = ec * cos(pos.second * PI / 180)
+ val lng = (dx / ed + pos.first * PI / 180.0) * 180.0 / PI
+ val lat = (dy / ec + pos.second * PI / 180.0) * 180.0 / PI
+ return Pair(lng, lat)
+ }
+
+ /**
+ * 绾害鐩稿悓鏃�
+ * 璺濈杞崲涓虹粡搴�
+ */
+ fun disToLng(distance: Double): Double {
+ return distance * 0.00001
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt b/src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt
new file mode 100644
index 0000000..5719d4e
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt
@@ -0,0 +1,98 @@
+package cn.flightfeather.supervision.business.location
+
+import cn.flightfeather.supervision.common.utils.ExcelUtil
+import cn.flightfeather.supervision.domain.ds1.entity.Scense
+import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
+import tk.mybatis.mapper.entity.Example
+import kotlin.math.PI
+
+/**
+ * 璺鍛ㄨ竟鏌ヨ
+ */
+class LocationRoadNearby(private val scenseMapper: ScenseMapper) {
+
+ private val utilFile = UtilFile()
+
+ data class BasePlace(
+ val name: String,
+ val sP: Pair<Double, Double>,
+ val eP: Pair<Double, Double>,
+ )
+
+ private fun searchOne(basePlace: BasePlace, distance: Double) {
+ val range = rangeRestriction(basePlace, distance)
+ getSceneFromDb(range).forEach { utilFile.parseRow(it) }
+ }
+
+ /**
+ * 鎼滃鍙傝�冭矾娈电粰瀹氬崐寰勫唴鐨勭偣浣�
+ * @param basePlace 鍙傝�冪偣浣嶄俊鎭�
+ * @param distance 鎼滅储鍗婂緞
+ */
+ fun search(basePlace: BasePlace, distance: Double) {
+ utilFile.reset()
+ searchOne(basePlace, distance)
+ utilFile.outPutToFile()
+ }
+
+ fun searchList(pList: List<BasePlace>, distance: Double) {
+ utilFile.reset()
+ pList.forEach {
+ val range = rangeRestriction(it, distance)
+ val sceneList = getSceneFromDb(range)
+ if (sceneList.isEmpty()) {
+ utilFile.addRow(listOf(it.name))
+ }
+ sceneList.forEachIndexed { index, s->
+ utilFile.parseRow(s)
+ if (index == 0) {
+ utilFile.updateLastRow(0, ExcelUtil.MyCell(it.name, sceneList.size))
+ }
+ }
+ utilFile.index = 1
+ }
+ utilFile.outPutToFile()
+ }
+
+ /**
+ * 鑼冨洿闄愬畾
+ * 鏍规嵁璺鐨勫鏈偣鍧愭爣鍜屾煡璇㈠崐寰勶紝璁$畻鏈�澶у彲鑳界殑鑼冨洿鐭╁舰锛屽緱鍑虹粡绾害鐨勬渶澶ф渶灏忓��
+ */
+ private fun rangeRestriction(basePlace: BasePlace, distance: Double): List<Double> {
+ // 姹傜粡搴︾殑鏈�灏忓��
+ val p1 = if (basePlace.sP.first < basePlace.eP.first) basePlace.sP else basePlace.eP
+ val minLng = CoordinateUtil.getPointByLen(p1, distance, PI * 1.5).first
+ // 姹傜粡搴︾殑鏈�澶у��
+ val p2 = if (basePlace.sP.first > basePlace.eP.first) basePlace.sP else basePlace.eP
+ val maxLng = CoordinateUtil.getPointByLen(p2, distance, PI * 0.5).first
+ // 姹傜含搴︾殑鏈�灏忓��
+ val p3 = if (basePlace.sP.second < basePlace.eP.second) basePlace.sP else basePlace.eP
+ val minLat = CoordinateUtil.getPointByLen(p3, distance, PI).second
+ // 姹傜含搴︾殑鏈�澶у��
+ val p4 = if (basePlace.sP.second > basePlace.eP.second) basePlace.sP else basePlace.eP
+ val maxLat = CoordinateUtil.getPointByLen(p4, distance, .0).second
+
+ return listOf(minLng, maxLng, minLat, maxLat)
+ }
+
+ /**
+ * 鏍规嵁闄愬畾鐭╁舰鑼冨洿浠庢暟鎹簱鑾峰彇绗﹀悎鏉′欢鐨勭偣浣�
+ */
+ private fun getSceneFromDb(range: List<Double>): List<Scense> {
+ return scenseMapper.selectByExample(Example(Scense::class.java).apply {
+ createCriteria().andGreaterThanOrEqualTo("longitude", range[0])
+ .andLessThanOrEqualTo("longitude", range[1])
+ .andGreaterThanOrEqualTo("latitude", range[2])
+ .andLessThanOrEqualTo("latitude", range[3])
+ and(createCriteria().orNotEqualTo("extension1", "0")
+ .orIsNull("extension1"))
+ })
+ }
+
+ /**
+ * 绮剧‘璁$畻
+ */
+// private fun checkDistance(scense: Scense):Boolean {
+//
+// }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt b/src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt
new file mode 100644
index 0000000..f6aeb9c
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt
@@ -0,0 +1,88 @@
+package cn.flightfeather.supervision.business.location
+
+import cn.flightfeather.supervision.common.utils.DateUtil
+import cn.flightfeather.supervision.common.utils.ExcelUtil
+import cn.flightfeather.supervision.domain.ds1.entity.Scense
+import org.apache.poi.hssf.usermodel.HSSFWorkbook
+import java.io.File
+import java.io.FileOutputStream
+import java.util.*
+
+class UtilFile {
+
+ private val heads = mutableListOf<Array<Any>>()
+ private val contents = mutableListOf<Array<Any>>()
+ var index = 1
+
+ init {
+// val h1 = listOf(
+// ExcelUtil.MyCell("姹戒慨鍗曚綅鍩烘湰淇℃伅", colSpan = 6),
+// ExcelUtil.MyCell("瀹堟硶甯壎寰俊灏忕▼搴忕櫥褰�", colSpan = 1),
+// ExcelUtil.MyCell("姹戒慨鍗曚綅璁よ瘉锛堝崟涓紒涓氬厑璁稿鐢ㄦ埛锛�", colSpan = 4),
+// ExcelUtil.MyCell("瀹堟硶鎵胯", colSpan = 1),
+// ExcelUtil.MyCell("鍙拌处瑙勮寖鎬�", colSpan = 3),
+// ExcelUtil.MyCell("鑷贰鏌ヨ鑼冩��", colSpan = 2),
+// ExcelUtil.MyCell("瀹堟硶鑷祴鑷瘎", colSpan = 3),
+// ExcelUtil.MyCell("绾夸笂鐩戠缁煎悎椋庨櫓鍒嗘瀽涓庡绛�", colSpan = 3),
+// )
+ val h2 = listOf(
+ ExcelUtil.MyCell("璺", colSpan = 1),
+ ExcelUtil.MyCell("搴忓彿", colSpan = 1),
+ ExcelUtil.MyCell("鍗曚綅鍚嶇О", colSpan = 1),
+ ExcelUtil.MyCell("绫诲瀷", colSpan = 1),
+ ExcelUtil.MyCell("鍗曚綅鍦板潃", colSpan = 1),
+ ExcelUtil.MyCell("缁忓害", colSpan = 1),
+ ExcelUtil.MyCell("绾害", colSpan = 1),
+ ExcelUtil.MyCell("琛楅亾", colSpan = 1),
+ ExcelUtil.MyCell("甯哥敤鑱旂郴浜�", colSpan = 1),
+ ExcelUtil.MyCell("鑱旂郴鏂瑰紡", colSpan = 1),
+ )
+// heads.add(h1.toTypedArray())
+ heads.add(h2.toTypedArray())
+ }
+
+ fun reset() {
+ index = 1
+ contents.clear()
+ }
+
+ fun addRow(row: List<Any>) {
+ contents.add(row.toTypedArray())
+ }
+
+ fun updateLastRow(index: Int, cell: Any) {
+ contents.last()[index] = cell
+ }
+
+ /**
+ * 鐢熸垚涓�琛宔xcel鏁版嵁
+ */
+ fun parseRow(scense: Scense) {
+ val row = listOf<Any>(
+ "",
+ index.toDouble(),
+ scense.name ?: "",
+ scense.type ?: "",
+ scense.location ?: "",
+ scense.longitude?.toDouble() ?: .0,
+ scense.latitude?.toDouble() ?: .0,
+ scense.townname ?: "",
+ scense.contacts ?: "",
+ scense.contactst ?: ""
+ )
+ contents.add(row.toTypedArray())
+ index++
+ }
+
+ fun outPutToFile() {
+ val workbook = HSSFWorkbook()
+ val fileName = "閲戝北鍖哄懆杈圭偣浣�-${DateUtil().DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
+ val filePath = "C:\\work\\宸ヤ綔\\绗笁鏂圭洃绠\鍛ㄨ竟鐐逛綅\\$fileName"
+ val out = FileOutputStream(File(filePath))
+ ExcelUtil.write(heads, contents, workbook)
+ workbook.write(out)
+ workbook.close()
+ out.flush()
+ out.close()
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/BaseCols.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/BaseCols.kt
index 8b6f31f..61a1cb8 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/BaseCols.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/BaseCols.kt
@@ -69,7 +69,7 @@
* 鏂拌�佽〃澶村悎骞�
*/
fun combineHead(oldHeads: MutableList<MutableList<ExcelUtil.MyCell>>, dataSource: DataSource) {
- //鍚堝苟琛ㄥご锛岄噰鍙栫畝鍖栭�昏緫锛屽彧鏈夌涓�琛岀殑琛ㄥご浼氳繘琛屽崟鍏冩牸鐨勮法琛屽悎骞�
+ // FIXME: 2023/1/31 鍚堝苟琛ㄥご锛岄噰鍙栫畝鍖栭�昏緫锛屽彧鏈夌涓�琛岀殑琛ㄥご浼氳繘琛屽崟鍏冩牸鐨勮法琛屽悎骞�
val newHeads = getHeads(dataSource)
if (oldHeads.isEmpty()) {
newHeads.forEach { oldHeads.add(it) }
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcelMulti.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcelMulti.kt
index 0377ffc..277bfad 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcelMulti.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/BaseExcelMulti.kt
@@ -8,7 +8,7 @@
/**
* 鍚勬ā鏉垮悎骞惰緭鍑轰负鏁翠綋鏂囨。
- * 鍗曚釜鏁版嵁婧�
+ * 澶氫釜鏁版嵁婧�
*/
abstract class BaseExcelMulti(private val dataSourceList: List<DataSource>) {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
index 3d715f9..350740f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
@@ -49,11 +49,12 @@
}
fun loop(callback: (index:Int, rowData: RowData) -> Unit) {
- reset()
+// reset()
for (i in sourceList.indices) {
+// rowData.recordLastScene()
rowData.index = i
- rowData.clear()
rowData.subTask = sourceList[i]
+ rowData.clear()
callback(i, rowData)
}
}
@@ -126,11 +127,12 @@
for (s in subTaskList) {
if (s.scenseid == it) {
subtask = s
- break
+ result.add(s)
}
}
- if (subtask == null) subtask = Subtask().apply { scenseid = it }
- result.add(subtask)
+ if (subtask == null) {
+ result.add(Subtask().apply { scenseid = it })
+ }
}
} else {
result.addAll(subTaskList)
@@ -359,23 +361,29 @@
}
/**
+ * 璁板綍涓婁竴涓満鏅�
+ */
+ fun recordLastScene() {
+ lastScene = scene
+ }
+
+ /**
* 娓呯┖褰撳墠澶勭悊鐨勫璞$殑鐩稿叧鏁版嵁婧�
*/
fun clear() {
- if (lastScene != null && lastScene?.typeid != _scene?.typeid) {
- _problemTypes.clear()
- _topItems.clear()
- _rules.clear()
- _ledgerCount = -1
- } else {
- lastScene = _scene
- }
_scene = null
_baseScene = null
_problems.clear()
_evaluation = null
_itemevaluationList.clear()
_ledgerRecordNum = null
+ if (lastScene != null && lastScene?.typeid != scene?.typeid) {
+ _problemTypes.clear()
+ _topItems.clear()
+ _rules.clear()
+ _ledgerCount = -1
+ }
+ recordLastScene()
}
/**
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt
index 5e10883..c42eada 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/template/ScoreDetailSummary.kt
@@ -6,6 +6,10 @@
import cn.flightfeather.supervision.business.report.cols.*
class ScoreDetailSummary(dataSource: DataSource) : BaseTemplate(dataSource) {
- override val cols: List<BaseCols> = listOf(ColSceneName(), ColTown(), ColStatus(), ColTotalGrade(), ColItemGrade())
+ override val cols: List<BaseCols> = listOf(
+ ColSceneName(), ColTown(), ColStatus(), ColInspectionInfo(listOf(0, 1)),
+ ColTotalGrade(),
+ ColItemGrade()
+ )
override val templateName: String = "瑙勮寖鎬ц瘎浼拌鎯呰〃"
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/storage/JinAnScore.kt b/src/main/kotlin/cn/flightfeather/supervision/business/storage/JinAnScore.kt
new file mode 100644
index 0000000..a5d82d9
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/storage/JinAnScore.kt
@@ -0,0 +1,62 @@
+package cn.flightfeather.supervision.business.storage
+
+import cn.flightfeather.supervision.business.Info
+import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
+import cn.flightfeather.supervision.domain.ds1.entity.Score
+import cn.flightfeather.supervision.domain.ds1.mapper.ScoreMapper
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Component
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
+import java.time.ZoneId
+
+/**
+ * 涓婃捣甯傞潤瀹夊尯鍗曠嫭鐨�50鍒嗗埗璇勫垎缁撴灉锛�
+ * 鏍规嵁[StAutoScore]鑷姩璇勫垎缁撴灉杩涜杞崲寰楀嚭
+ */
+@Component
+class JinAnScore {
+
+ @Autowired
+ lateinit var scoreMapper: ScoreMapper
+
+ fun toDb(e: Evaluation, info: Info) {
+ val time = LocalDateTime.ofInstant(e.evaluatetime?.toInstant(), ZoneId.systemDefault())
+ val scoreVo = Score().apply {
+ sceneId = e.sguid
+ sceneName = e.scensename
+ year = time.year
+ month = time.monthValue
+ districtCode = e.districtcode
+ districtName = e.districtname
+ score = transform(e.resultscorebef?.toIntOrNull() ?: 0)
+ completion = !info.online
+ }
+
+ val res = scoreMapper.selectByExample(Example(Score::class.java).apply {
+ createCriteria().andEqualTo("sceneId", e.sguid)
+ .andEqualTo("year", time.year)
+ .andEqualTo("month", time.monthValue)
+ })
+ if (res.isNotEmpty()) {
+ scoreVo.id = res[0].id
+ scoreMapper.updateByPrimaryKeySelective(scoreVo)
+ } else {
+ scoreMapper.insert(scoreVo)
+ }
+ }
+
+ /**
+ * 鍒嗘暟杞崲
+ */
+ private fun transform(oldS: Int): Int {
+ return when {
+ // 鍩烘湰瑙勮寖
+ oldS >= 90 -> 50
+ // 涓嶈鑼�
+ oldS >= 50 -> 30
+ // 涓ラ噸涓嶈鑼�
+ else -> 10
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt b/src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt
index 60e48b5..09c69a3 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/storage/StAutoScore.kt
@@ -37,6 +37,7 @@
stScoreItem_1: StScoreItem_1,
whScoreItem_1: WhScoreItem_1,
whScoreItem_2: WhScoreItem_2,
+ val jinAnScore: JinAnScore,
var sceneType: Constant.ScenseType = Constant.ScenseType.TYPE1, )
{
companion object {
@@ -144,8 +145,9 @@
private fun sceneGradeP(subtask: Subtask) {
val info = itemGrade(subtask)
- val result = totalGrade(info) ?: return
+ val result = totalGrade(info, subtask) ?: return
toDb(info, result)
+// jinAnScore.toDb(result.first, info)
// addToFile(rows, info, result.first)
// toFile()
}
@@ -155,7 +157,7 @@
getScoreItem()
val info = itemGrade(subtask)
- val result = totalGrade(info) ?: return
+ val result = totalGrade(info, subtask) ?: return
addToFile(rows, info, result.first)
}
@@ -186,7 +188,15 @@
val scene = scenseMapper.selectByPrimaryKey(subtask.scenseid)
val info =
- Info(userInfo?.guid, tzUserId, subtask.scenseid, subtask.scensename, sceneType, subTask = subtask, sceneIndex = scene.index)
+ Info(userInfo?.guid,
+ tzUserId,
+ subtask.scenseid,
+ subtask.scensename,
+ sceneType,
+ subTask = subtask,
+ sceneIndex = scene.index,
+ online = scene.extension1 != "0"
+ )
/** 1. 鏍规嵁璇勫垎瑙勫垯瀵瑰簲鐨勯棶棰樿嚜鍔ㄥ垽鏂槸鍚︽墸鍒�***************************************************************/
// 鑾峰彇璇ユ宸℃煡浠诲姟涓嬬殑鎵�鏈夐棶棰�
@@ -200,6 +210,7 @@
// 鍏蜂綋璇勫垎閫夐」
val subRule = r.second
subRule.forEach { sr ->
+ // 瀛樺湪澶氫釜璇勫垎椤瑰拰鍚屼竴涓棶棰樺叧鑱旓紝鍥犳蹇呴』鍏ㄩ儴璇勫垎椤归兘鍒ゅ畾涓�閬�
sr.problemlist?.split(",")?.forEach { pId ->
if (pList.contains(pId)) {
sr.extension1 = (0 - (sr.maxscore ?: 0)).toString()
@@ -248,7 +259,7 @@
/**
* 璁$畻鎬诲垎
*/
- private fun totalGrade(info: Info): Pair<Evaluation, List<Itemevaluation>>? {
+ private fun totalGrade(info: Info, subtask: Subtask): Pair<Evaluation, List<Itemevaluation>>? {
/** 4. 璁$畻鎬诲垎*************************************************************************/
val scene = scenseMapper.selectByPrimaryKey(info.subTask?.scenseid) ?: return null
val inspection = inspectionMapper.selectByExample(Example(Inspection::class.java).apply {
@@ -280,12 +291,12 @@
townname = scene.townname
scensename = scene.name
scenseaddress = scene.location
- evaluatetime = Date()
+ evaluatetime = subtask.planstarttime
evaluatorguid = "admin"
evaluatorusername = "admin"
evaluatorrealname = "admin"
resultscorebef = (totalScore - abs(total)).toString()
- createdate = Date()
+ createdate = subtask.planstarttime
updatedate = Date()
}
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/CsScoreItem_2.kt b/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/CsScoreItem_2.kt
index 7b2ec28..d0211a7 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/CsScoreItem_2.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/CsScoreItem_2.kt
@@ -53,6 +53,7 @@
var result: Int? = null
r.forEach {
+ if (it == null) return@forEach
if (it.drExceedTimes > 0) {
result = 0
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/MpScoreItem_2.kt b/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/MpScoreItem_2.kt
index bfa0db3..eb6eb0d 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/MpScoreItem_2.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/MpScoreItem_2.kt
@@ -13,7 +13,7 @@
/**
* Date 2022/1/20 16:14
* Created by feiyu
- * 宸ュ湴
+ * 鎼呮媽绔�
*/
@Component
class MpScoreItem_2:ScoreItem() {
@@ -53,6 +53,7 @@
var result: Int? = null
r.forEach {
+ if (it == null) return@forEach
if (it.drExceedTimes > 0) {
result = 0
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/WhScoreItem_2.kt b/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/WhScoreItem_2.kt
index 196a468..ebca9e0 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/WhScoreItem_2.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/storage/item/WhScoreItem_2.kt
@@ -13,7 +13,7 @@
/**
* Date 2022/1/20 16:14
* Created by feiyu
- * 宸ュ湴
+ * 鐮佸ご
*/
@Component
class WhScoreItem_2:ScoreItem() {
@@ -53,6 +53,7 @@
var result: Int? = null
r.forEach {
+ if (it == null) return@forEach
if (it.drExceedTimes > 0) {
result = 0
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt b/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt
index 93ecb0f..3fece28 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt
@@ -18,7 +18,8 @@
}
private val fetchData = mutableListOf<FetchData>()
- private var shecdule = Executors.newScheduledThreadPool(2)
+ private var schedule = Executors.newScheduledThreadPool(1)
+ private var maintainSchedule = Executors.newScheduledThreadPool(1)
private var fetchTime: Date = Date()
private var maintainTime: Date = Date()
@@ -32,10 +33,13 @@
maintainTask()
}
- private fun fetchTask() {
- shecdule.scheduleAtFixedRate({
+ private fun fetchTask(isFirst: Boolean = false) {
+ if (!isFirst) {
+ schedule = closeThread(schedule)
+ }
+ schedule.scheduleAtFixedRate({
fetchTime = Date()
- if (Date().time - maintainTime.time > (MAINTAIN_PERIOD_MIN + 1) * 60 * 1000) {
+ if (Date().time - maintainTime.time > (MAINTAIN_PERIOD_MIN * 2) * 60 * 1000) {
maintainTask()
}
fetchData.forEach {
@@ -44,13 +48,28 @@
}, 0, FETCH_PERIOD_MIN, TimeUnit.MINUTES)
}
- private fun maintainTask() {
-
- shecdule.scheduleAtFixedRate({
+ private fun maintainTask(isFirst: Boolean = false) {
+ if (!isFirst) {
+ maintainSchedule = closeThread(maintainSchedule)
+ }
+ maintainSchedule.scheduleAtFixedRate({
maintainTime = Date()
- if (Date().time - fetchTime.time > (FETCH_PERIOD_MIN + 1) * 60 * 1000) {
+ if (Date().time - fetchTime.time > (FETCH_PERIOD_MIN * 2) * 60 * 1000) {
fetchTask()
}
}, 0, MAINTAIN_PERIOD_MIN, TimeUnit.MINUTES)
}
+
+ private fun closeThread(s: ScheduledExecutorService): ScheduledExecutorService {
+ try {
+ s.shutdown()
+ if (s.awaitTermination(10, TimeUnit.SECONDS)) {
+ s.shutdownNow()
+ }
+ } catch (e: InterruptedException) {
+ e.printStackTrace()
+ s.shutdownNow()
+ }
+ return Executors.newScheduledThreadPool(1)
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt b/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
index 3940056..6c76816 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
@@ -4,9 +4,14 @@
import cn.flightfeather.supervision.domain.ds1.entity.NightConstruction
import cn.flightfeather.supervision.domain.ds1.mapper.NightConstructionMapper
import cn.flightfeather.supervision.common.utils.DateUtil
+import cn.flightfeather.supervision.domain.ds1.entity.Scense
+import cn.flightfeather.supervision.domain.ds1.entity.Userinfo
+import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
+import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper
import com.github.pagehelper.PageHelper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
+import org.springframework.transaction.annotation.Transactional
import tk.mybatis.mapper.entity.Example
import java.util.*
import javax.annotation.PostConstruct
@@ -27,28 +32,37 @@
private const val CITY_NAME = "涓婃捣甯�"
private const val DISTRICT_NAME = "闈欏畨鍖�"
- private const val DEFAULT_TIME = "2020-12-01 00:00:00"
+ private const val DEFAULT_TIME = "2022-01-01 00:00:00"
}
@Autowired
lateinit var nightConstructionMapper: NightConstructionMapper
+
+ @Autowired
+ lateinit var scenseMapper: ScenseMapper
+
+ @Autowired
+ lateinit var userinfoMapper: UserinfoMapper
private val dateUtil = DateUtil()
@PostConstruct
fun init() {
instance = this
+ this.nightConstructionMapper = instance.nightConstructionMapper
+ this.scenseMapper = instance.scenseMapper
+ this.userinfoMapper = instance.userinfoMapper
}
-
override fun fetch() {
PageHelper.startPage<NightConstruction>(1, 1)
- nightConstructionMapper.selectByExample(Example(NightConstruction::class.java).apply {
+ val res = nightConstructionMapper.selectByExample(Example(NightConstruction::class.java).apply {
createCriteria().andEqualTo("ncProvinceCode", PROVINCE_CODE)
- .andEqualTo("ncCityCode", CITY_CODE)
- .andEqualTo("ncDistrictCode", DISTRICT_CODE)
+ .andEqualTo("ncCityCode", CITY_CODE)
+ .andEqualTo("ncDistrictCode", DISTRICT_CODE)
orderBy("ncCreateTime").desc()
- }).let {
+ })
+ res.let {
val timeStr = if (it.isNotEmpty()) {
val cal = Calendar.getInstance().apply { time = it[0]?.ncCreateTime }
cal.add(Calendar.DAY_OF_MONTH, -1)
@@ -56,6 +70,7 @@
} else {
DEFAULT_TIME
}
+// val timeStr = DEFAULT_TIME
try {
@@ -82,19 +97,41 @@
ncDistrictCode = DISTRICT_CODE
ncDistrictName = DISTRICT_NAME
}
- nightConstructionMapper.selectByExample(Example(NightConstruction::class.java).apply {
- createCriteria().andEqualTo("ncNum", nightConstruction.ncNum)
- }).run {
- nightConstructionMapper.selectByExample(Example(NightConstruction::class.java).apply {
+ val history = nightConstructionMapper.selectByExample(Example(NightConstruction::class.java)
+ .apply {
+ createCriteria().andEqualTo("ncNum", nightConstruction.ncNum)
+ })
+ // 鍒ゆ柇璇ュ鏂芥枃浠舵槸鍚﹀瓨鍦�
+ if (history.isNotEmpty()) return@forEach
+
+ var sceneId: String? = null
+ var userId: String? = null
+ // 鑾峰彇璇ュ鏂藉搴斾紒涓氱殑鍘嗗彶璁板綍
+ val records = nightConstructionMapper.selectByExample(Example(NightConstruction::class.java)
+ .apply {
createCriteria().andEqualTo("ncItemName", nightConstruction.ncItemName)
- }).takeIf { l-> l.isNotEmpty() }?.get(0)?.let { r->
- nightConstruction.ncUserId = r.ncUserId
- nightConstruction.ncSceneId = r.ncSceneId
- }
- if (isEmpty()) {
- nightConstructionMapper.insert(nightConstruction)
+ })
+ if (records.isNotEmpty()) {
+ sceneId = records[0]?.ncSceneId
+ userId = records[0]?.ncUserId
+ }
+ // 鑻ユ棤鍘嗗彶璁板綍锛屾煡鎵惧満鏅〃锛屽垽鏂槸鍚︽湁鐩稿悓鍚嶇О鐨勫満鏅�
+ else {
+ val scenes = scenseMapper.selectByExample(Example(Scense::class.java).apply {
+ createCriteria().andEqualTo("name", nightConstruction.ncItemName)
+ })
+ if (scenes.isNotEmpty()) {
+ sceneId = scenes[0].guid
+ val user = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
+ createCriteria().andEqualTo("dGuid", sceneId)
+ })
+ if (user.isNotEmpty()) userId = user[0].guid
}
}
+ nightConstruction.ncUserId = userId
+ nightConstruction.ncSceneId = sceneId
+
+ nightConstructionMapper.insert(nightConstruction)
}
}
} catch (e: Exception) {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/datasource/config/DataSourceConfig.kt b/src/main/kotlin/cn/flightfeather/supervision/datasource/config/DataSourceConfig.kt
index 52bf391..d0f4323 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/datasource/config/DataSourceConfig.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/datasource/config/DataSourceConfig.kt
@@ -42,4 +42,17 @@
fun ds2DataSource(@Qualifier("ds2DataSourceProperties") dataSourceProperties: DataSourceProperties): DataSource? {
return dataSourceProperties.initializeDataSourceBuilder().build()
}
+
+ //绗笁涓猟s3鏁版嵁婧愰厤缃�
+ @Bean(name = ["ds3DataSourceProperties"])
+ @ConfigurationProperties(prefix = "spring.datasource.ds3")
+ fun ds3DataSourceProperties(): DataSourceProperties? {
+ return DataSourceProperties()
+ }
+
+ //绗笁涓猟s3鏁版嵁婧�
+ @Bean("ds3DataSource")
+ fun ds3DataSource(@Qualifier("ds3DataSourceProperties") dataSourceProperties: DataSourceProperties): DataSource? {
+ return dataSourceProperties.initializeDataSourceBuilder().build()
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/datasource/config/MybatisConfig4ds3.kt b/src/main/kotlin/cn/flightfeather/supervision/datasource/config/MybatisConfig4ds3.kt
new file mode 100644
index 0000000..78649fc
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/datasource/config/MybatisConfig4ds3.kt
@@ -0,0 +1,47 @@
+package cn.flightfeather.supervision.datasource.config
+
+import org.apache.ibatis.session.SqlSessionFactory
+import org.mybatis.spring.SqlSessionFactoryBean
+import org.mybatis.spring.SqlSessionTemplate
+import org.mybatis.spring.annotation.MapperScan
+import org.springframework.beans.factory.annotation.Qualifier
+import org.springframework.context.annotation.Bean
+import org.springframework.context.annotation.Configuration
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver
+import org.springframework.jdbc.datasource.DataSourceTransactionManager
+import javax.sql.DataSource
+
+
+/**
+ * Mybatis 绗笁涓猟s3鏁版嵁婧愰厤缃�
+ * 澶氭暟鎹簮閰嶇疆渚濊禆鏁版嵁婧愰厤缃�
+ * @see DataSourceConfig
+ */
+@Configuration
+@MapperScan(basePackages = ["cn.flightfeather.supervision.domain.ds3.mapper"],
+ sqlSessionTemplateRef = "ds3SqlSessionTemplate")
+class MybatisConfig4ds3 {
+
+ //ds3鏁版嵁婧�
+ @Bean("ds3SqlSessionFactory")
+ @Throws(Exception::class)
+ fun ds3SqlSessionFactory(@Qualifier("ds3DataSource") dataSource: DataSource?): SqlSessionFactory? {
+ val sqlSessionFactory = SqlSessionFactoryBean()
+ sqlSessionFactory.setDataSource(dataSource)
+ sqlSessionFactory.setMapperLocations(*PathMatchingResourcePatternResolver()
+ .getResources("classpath*:mapper/ds3/*.xml"))
+ return sqlSessionFactory.getObject()
+ }
+
+ //浜嬪姟鏀寔
+ @Bean(name = ["ds3TransactionManager"])
+ fun ds3TransactionManager(@Qualifier("ds3DataSource") dataSource: DataSource): DataSourceTransactionManager? {
+ return DataSourceTransactionManager(dataSource)
+ }
+
+ @Bean(name = ["ds3SqlSessionTemplate"])
+ fun ds3SqlSessionTemplate(@Qualifier("ds3SqlSessionFactory") sqlSessionFactory: SqlSessionFactory?):
+ SqlSessionTemplate? {
+ return SqlSessionTemplate(sqlSessionFactory)
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java
index 0418c15..72bbda6 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/DustDataResult.java
@@ -116,7 +116,7 @@
* @param drSceneName 鍦烘櫙鍚嶇О
*/
public void setDrSceneName(String drSceneName) {
- this.drSceneName = drSceneName;
+ this.drSceneName = drSceneName == null ? null : drSceneName.trim();
}
/**
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt
index fe4faa6..8a33ec6 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/DustDataResultMapper.kt
@@ -5,4 +5,4 @@
import org.apache.ibatis.annotations.Mapper
@Mapper
-interface DustDataResultMapper : MyMapper<DustDataResult>
\ No newline at end of file
+interface DustDataResultMapper : MyMapper<DustDataResult?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteInfo.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteInfo.java
new file mode 100644
index 0000000..894faf7
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteInfo.java
@@ -0,0 +1,1038 @@
+package cn.flightfeather.supervision.domain.ds2.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.util.Date;
+
+@Table(name = "ja_t_dust_site_info")
+public class DustSiteInfo {
+ @Id
+ private String id;
+
+ /**
+ * 瀹夎鍦板潃
+ */
+ private String address;
+
+ /**
+ * 寮�宸ユ椂闂�
+ */
+ @Column(name = "begin_date")
+ private Date beginDate;
+
+ /**
+ * 寤虹瓚闈㈢Н
+ */
+ @Column(name = "build_area")
+ private String buildArea;
+
+ /**
+ * 閲囬泦鏃堕棿
+ */
+ @Column(name = "data_time")
+ private Date dataTime;
+
+ /**
+ * 娓呮礂鎺柦
+ */
+ @Column(name = "clean_measure")
+ private String cleanMeasure;
+
+ /**
+ * 绔欑偣缂栫爜
+ */
+ private String code;
+
+ /**
+ * 鏂藉伐鍗曚綅
+ */
+ @Column(name = "construction_unit")
+ private String constructionUnit;
+
+ /**
+ * 鐐逛綅鎺у埗绾�
+ */
+ @Column(name = "control_level")
+ private String controlLevel;
+
+ /**
+ * 寮�鍙戝晢
+ */
+ private String developers;
+
+ /**
+ * 鎵ц鏃堕棿
+ */
+ @Column(name = "do_time")
+ private Date doTime;
+
+ /**
+ * 杩愮淮鍟�
+ */
+ @Column(name = "duty_company")
+ private String dutyCompany;
+
+ /**
+ * 杩愮淮鍟唅d
+ */
+ @Column(name = "duty_company_id")
+ private String dutyCompanyId;
+
+ /**
+ * 缁撴潫鏃堕棿
+ */
+ @Column(name = "end_date")
+ private Date endDate;
+
+ /**
+ * 褰撳墠鏂藉伐闃舵
+ */
+ @Column(name = "engineering_stage")
+ private String engineeringStage;
+
+ /**
+ * 褰撳墠鏂藉伐闃舵缂栫爜
+ */
+ @Column(name = "engineering_stage_code")
+ private String engineeringStageCode;
+
+ /**
+ * 璁惧缂栫爜
+ */
+ @Column(name = "equipment_code")
+ private String equipmentCode;
+
+ /**
+ * 鍗犲湴闈㈢Н
+ */
+ @Column(name = "floor_area")
+ private String floorArea;
+
+ /**
+ * 鎵�灞炲尯鍘夸唬鐮�
+ */
+ @Column(name = "group_id")
+ private String groupId;
+
+ /**
+ * 鎵�灞炲尯鍘�
+ */
+ @Column(name = "group_name")
+ private String groupName;
+
+ /**
+ * 鏄惁鏈夌洃娴�
+ */
+ @Column(name = "has_monitor")
+ private String hasMonitor;
+
+ /**
+ * 鏄惁鍦ㄧ嚎
+ */
+ @Column(name = "is_online")
+ private String isOnline;
+
+ /**
+ * 璁惧鏄惁寮傚父
+ */
+ @Column(name = "is_trouble")
+ private String isTrouble;
+
+ /**
+ * 鍒犻櫎鏍囧織浣�
+ */
+ @Column(name = "jhpt_delete")
+ private String jhptDelete;
+
+ /**
+ * 鏇存柊鏃堕棿
+ */
+ @Column(name = "jhpt_update_time")
+ private String jhptUpdateTime;
+
+ private String kindex;
+
+ /**
+ * 绾害
+ */
+ private String latitude;
+
+ /**
+ * 鑱旂郴浜�
+ */
+ private String linkman;
+
+ /**
+ * 缁忓害
+ */
+ private String longitude;
+
+ /**
+ * 璁惧缂栫爜
+ */
+ @Column(name = "mn_code")
+ private String mnCode;
+
+ /**
+ * 绔欑偣鍚嶇О
+ */
+ private String name;
+
+ /**
+ * 鍣0鍔熻兘鍖�
+ */
+ @Column(name = "noise_region")
+ private String noiseRegion;
+
+ /**
+ * 鑱旂郴浜虹數璇�
+ */
+ private String phone;
+
+ /**
+ * 鎵�灞炵渷浠�
+ */
+ private String province;
+
+ /**
+ * 璐熻矗浜�
+ */
+ private String responsible;
+
+ /**
+ * 鍐呬腑澶栫幆缂栫爜
+ */
+ @Column(name = "ring_id")
+ private String ringId;
+
+ /**
+ * 闃舵寮�濮嬫棩鏈�
+ */
+ @Column(name = "stage_begin_date")
+ private Date stageBeginDate;
+
+ /**
+ * 鍋滄鏃堕棿
+ */
+ @Column(name = "stop_time")
+ private Date stopTime;
+
+ /**
+ * tsp娴撳害
+ */
+ private Double tsp;
+
+ /**
+ * 绫诲瀷缂栫爜
+ */
+ @Column(name = "type_id")
+ private String typeId;
+
+ /**
+ * 绫诲瀷鍚嶇О
+ */
+ private String typename;
+
+ /**
+ * 缁熻绫诲瀷缂栫爜
+ */
+ @Column(name = "union_type_id")
+ private String unionTypeId;
+
+ /**
+ * 鍥村楂樺害
+ */
+ @Column(name = "wall_height")
+ private String wallHeight;
+
+ /**
+ * 涓氬姟鏃堕棿
+ */
+ @Column(name = "ywsj_date")
+ private Date ywsjDate;
+
+ /**
+ * @return id
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ */
+ public void setId(String id) {
+ this.id = id == null ? null : id.trim();
+ }
+
+ /**
+ * 鑾峰彇瀹夎鍦板潃
+ *
+ * @return address - 瀹夎鍦板潃
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * 璁剧疆瀹夎鍦板潃
+ *
+ * @param address 瀹夎鍦板潃
+ */
+ public void setAddress(String address) {
+ this.address = address == null ? null : address.trim();
+ }
+
+ /**
+ * 鑾峰彇寮�宸ユ椂闂�
+ *
+ * @return begin_date - 寮�宸ユ椂闂�
+ */
+ public Date getBeginDate() {
+ return beginDate;
+ }
+
+ /**
+ * 璁剧疆寮�宸ユ椂闂�
+ *
+ * @param beginDate 寮�宸ユ椂闂�
+ */
+ public void setBeginDate(Date beginDate) {
+ this.beginDate = beginDate;
+ }
+
+ /**
+ * 鑾峰彇寤虹瓚闈㈢Н
+ *
+ * @return build_area - 寤虹瓚闈㈢Н
+ */
+ public String getBuildArea() {
+ return buildArea;
+ }
+
+ /**
+ * 璁剧疆寤虹瓚闈㈢Н
+ *
+ * @param buildArea 寤虹瓚闈㈢Н
+ */
+ public void setBuildArea(String buildArea) {
+ this.buildArea = buildArea == null ? null : buildArea.trim();
+ }
+
+ /**
+ * 鑾峰彇閲囬泦鏃堕棿
+ *
+ * @return data_time - 閲囬泦鏃堕棿
+ */
+ public Date getDataTime() {
+ return dataTime;
+ }
+
+ /**
+ * 璁剧疆閲囬泦鏃堕棿
+ *
+ * @param dataTime 閲囬泦鏃堕棿
+ */
+ public void setDataTime(Date dataTime) {
+ this.dataTime = dataTime;
+ }
+
+ /**
+ * 鑾峰彇娓呮礂鎺柦
+ *
+ * @return clean_measure - 娓呮礂鎺柦
+ */
+ public String getCleanMeasure() {
+ return cleanMeasure;
+ }
+
+ /**
+ * 璁剧疆娓呮礂鎺柦
+ *
+ * @param cleanMeasure 娓呮礂鎺柦
+ */
+ public void setCleanMeasure(String cleanMeasure) {
+ this.cleanMeasure = cleanMeasure == null ? null : cleanMeasure.trim();
+ }
+
+ /**
+ * 鑾峰彇绔欑偣缂栫爜
+ *
+ * @return code - 绔欑偣缂栫爜
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * 璁剧疆绔欑偣缂栫爜
+ *
+ * @param code 绔欑偣缂栫爜
+ */
+ public void setCode(String code) {
+ this.code = code == null ? null : code.trim();
+ }
+
+ /**
+ * 鑾峰彇鏂藉伐鍗曚綅
+ *
+ * @return construction_unit - 鏂藉伐鍗曚綅
+ */
+ public String getConstructionUnit() {
+ return constructionUnit;
+ }
+
+ /**
+ * 璁剧疆鏂藉伐鍗曚綅
+ *
+ * @param constructionUnit 鏂藉伐鍗曚綅
+ */
+ public void setConstructionUnit(String constructionUnit) {
+ this.constructionUnit = constructionUnit == null ? null : constructionUnit.trim();
+ }
+
+ /**
+ * 鑾峰彇鐐逛綅鎺у埗绾�
+ *
+ * @return control_level - 鐐逛綅鎺у埗绾�
+ */
+ public String getControlLevel() {
+ return controlLevel;
+ }
+
+ /**
+ * 璁剧疆鐐逛綅鎺у埗绾�
+ *
+ * @param controlLevel 鐐逛綅鎺у埗绾�
+ */
+ public void setControlLevel(String controlLevel) {
+ this.controlLevel = controlLevel == null ? null : controlLevel.trim();
+ }
+
+ /**
+ * 鑾峰彇寮�鍙戝晢
+ *
+ * @return developers - 寮�鍙戝晢
+ */
+ public String getDevelopers() {
+ return developers;
+ }
+
+ /**
+ * 璁剧疆寮�鍙戝晢
+ *
+ * @param developers 寮�鍙戝晢
+ */
+ public void setDevelopers(String developers) {
+ this.developers = developers == null ? null : developers.trim();
+ }
+
+ /**
+ * 鑾峰彇鎵ц鏃堕棿
+ *
+ * @return do_time - 鎵ц鏃堕棿
+ */
+ public Date getDoTime() {
+ return doTime;
+ }
+
+ /**
+ * 璁剧疆鎵ц鏃堕棿
+ *
+ * @param doTime 鎵ц鏃堕棿
+ */
+ public void setDoTime(Date doTime) {
+ this.doTime = doTime;
+ }
+
+ /**
+ * 鑾峰彇杩愮淮鍟�
+ *
+ * @return duty_company - 杩愮淮鍟�
+ */
+ public String getDutyCompany() {
+ return dutyCompany;
+ }
+
+ /**
+ * 璁剧疆杩愮淮鍟�
+ *
+ * @param dutyCompany 杩愮淮鍟�
+ */
+ public void setDutyCompany(String dutyCompany) {
+ this.dutyCompany = dutyCompany == null ? null : dutyCompany.trim();
+ }
+
+ /**
+ * 鑾峰彇杩愮淮鍟唅d
+ *
+ * @return duty_company_id - 杩愮淮鍟唅d
+ */
+ public String getDutyCompanyId() {
+ return dutyCompanyId;
+ }
+
+ /**
+ * 璁剧疆杩愮淮鍟唅d
+ *
+ * @param dutyCompanyId 杩愮淮鍟唅d
+ */
+ public void setDutyCompanyId(String dutyCompanyId) {
+ this.dutyCompanyId = dutyCompanyId == null ? null : dutyCompanyId.trim();
+ }
+
+ /**
+ * 鑾峰彇缁撴潫鏃堕棿
+ *
+ * @return end_date - 缁撴潫鏃堕棿
+ */
+ public Date getEndDate() {
+ return endDate;
+ }
+
+ /**
+ * 璁剧疆缁撴潫鏃堕棿
+ *
+ * @param endDate 缁撴潫鏃堕棿
+ */
+ public void setEndDate(Date endDate) {
+ this.endDate = endDate;
+ }
+
+ /**
+ * 鑾峰彇褰撳墠鏂藉伐闃舵
+ *
+ * @return engineering_stage - 褰撳墠鏂藉伐闃舵
+ */
+ public String getEngineeringStage() {
+ return engineeringStage;
+ }
+
+ /**
+ * 璁剧疆褰撳墠鏂藉伐闃舵
+ *
+ * @param engineeringStage 褰撳墠鏂藉伐闃舵
+ */
+ public void setEngineeringStage(String engineeringStage) {
+ this.engineeringStage = engineeringStage == null ? null : engineeringStage.trim();
+ }
+
+ /**
+ * 鑾峰彇褰撳墠鏂藉伐闃舵缂栫爜
+ *
+ * @return engineering_stage_code - 褰撳墠鏂藉伐闃舵缂栫爜
+ */
+ public String getEngineeringStageCode() {
+ return engineeringStageCode;
+ }
+
+ /**
+ * 璁剧疆褰撳墠鏂藉伐闃舵缂栫爜
+ *
+ * @param engineeringStageCode 褰撳墠鏂藉伐闃舵缂栫爜
+ */
+ public void setEngineeringStageCode(String engineeringStageCode) {
+ this.engineeringStageCode = engineeringStageCode == null ? null : engineeringStageCode.trim();
+ }
+
+ /**
+ * 鑾峰彇璁惧缂栫爜
+ *
+ * @return equipment_code - 璁惧缂栫爜
+ */
+ public String getEquipmentCode() {
+ return equipmentCode;
+ }
+
+ /**
+ * 璁剧疆璁惧缂栫爜
+ *
+ * @param equipmentCode 璁惧缂栫爜
+ */
+ public void setEquipmentCode(String equipmentCode) {
+ this.equipmentCode = equipmentCode == null ? null : equipmentCode.trim();
+ }
+
+ /**
+ * 鑾峰彇鍗犲湴闈㈢Н
+ *
+ * @return floor_area - 鍗犲湴闈㈢Н
+ */
+ public String getFloorArea() {
+ return floorArea;
+ }
+
+ /**
+ * 璁剧疆鍗犲湴闈㈢Н
+ *
+ * @param floorArea 鍗犲湴闈㈢Н
+ */
+ public void setFloorArea(String floorArea) {
+ this.floorArea = floorArea == null ? null : floorArea.trim();
+ }
+
+ /**
+ * 鑾峰彇鎵�灞炲尯鍘夸唬鐮�
+ *
+ * @return group_id - 鎵�灞炲尯鍘夸唬鐮�
+ */
+ public String getGroupId() {
+ return groupId;
+ }
+
+ /**
+ * 璁剧疆鎵�灞炲尯鍘夸唬鐮�
+ *
+ * @param groupId 鎵�灞炲尯鍘夸唬鐮�
+ */
+ public void setGroupId(String groupId) {
+ this.groupId = groupId == null ? null : groupId.trim();
+ }
+
+ /**
+ * 鑾峰彇鎵�灞炲尯鍘�
+ *
+ * @return group_name - 鎵�灞炲尯鍘�
+ */
+ public String getGroupName() {
+ return groupName;
+ }
+
+ /**
+ * 璁剧疆鎵�灞炲尯鍘�
+ *
+ * @param groupName 鎵�灞炲尯鍘�
+ */
+ public void setGroupName(String groupName) {
+ this.groupName = groupName == null ? null : groupName.trim();
+ }
+
+ /**
+ * 鑾峰彇鏄惁鏈夌洃娴�
+ *
+ * @return has_monitor - 鏄惁鏈夌洃娴�
+ */
+ public String getHasMonitor() {
+ return hasMonitor;
+ }
+
+ /**
+ * 璁剧疆鏄惁鏈夌洃娴�
+ *
+ * @param hasMonitor 鏄惁鏈夌洃娴�
+ */
+ public void setHasMonitor(String hasMonitor) {
+ this.hasMonitor = hasMonitor == null ? null : hasMonitor.trim();
+ }
+
+ /**
+ * 鑾峰彇鏄惁鍦ㄧ嚎
+ *
+ * @return is_online - 鏄惁鍦ㄧ嚎
+ */
+ public String getIsOnline() {
+ return isOnline;
+ }
+
+ /**
+ * 璁剧疆鏄惁鍦ㄧ嚎
+ *
+ * @param isOnline 鏄惁鍦ㄧ嚎
+ */
+ public void setIsOnline(String isOnline) {
+ this.isOnline = isOnline == null ? null : isOnline.trim();
+ }
+
+ /**
+ * 鑾峰彇璁惧鏄惁寮傚父
+ *
+ * @return is_trouble - 璁惧鏄惁寮傚父
+ */
+ public String getIsTrouble() {
+ return isTrouble;
+ }
+
+ /**
+ * 璁剧疆璁惧鏄惁寮傚父
+ *
+ * @param isTrouble 璁惧鏄惁寮傚父
+ */
+ public void setIsTrouble(String isTrouble) {
+ this.isTrouble = isTrouble == null ? null : isTrouble.trim();
+ }
+
+ /**
+ * 鑾峰彇鍒犻櫎鏍囧織浣�
+ *
+ * @return jhpt_delete - 鍒犻櫎鏍囧織浣�
+ */
+ public String getJhptDelete() {
+ return jhptDelete;
+ }
+
+ /**
+ * 璁剧疆鍒犻櫎鏍囧織浣�
+ *
+ * @param jhptDelete 鍒犻櫎鏍囧織浣�
+ */
+ public void setJhptDelete(String jhptDelete) {
+ this.jhptDelete = jhptDelete == null ? null : jhptDelete.trim();
+ }
+
+ /**
+ * 鑾峰彇鏇存柊鏃堕棿
+ *
+ * @return jhpt_update_time - 鏇存柊鏃堕棿
+ */
+ public String getJhptUpdateTime() {
+ return jhptUpdateTime;
+ }
+
+ /**
+ * 璁剧疆鏇存柊鏃堕棿
+ *
+ * @param jhptUpdateTime 鏇存柊鏃堕棿
+ */
+ public void setJhptUpdateTime(String jhptUpdateTime) {
+ this.jhptUpdateTime = jhptUpdateTime == null ? null : jhptUpdateTime.trim();
+ }
+
+ /**
+ * @return kindex
+ */
+ public String getKindex() {
+ return kindex;
+ }
+
+ /**
+ * @param kindex
+ */
+ public void setKindex(String kindex) {
+ this.kindex = kindex == null ? null : kindex.trim();
+ }
+
+ /**
+ * 鑾峰彇绾害
+ *
+ * @return latitude - 绾害
+ */
+ public String getLatitude() {
+ return latitude;
+ }
+
+ /**
+ * 璁剧疆绾害
+ *
+ * @param latitude 绾害
+ */
+ public void setLatitude(String latitude) {
+ this.latitude = latitude == null ? null : latitude.trim();
+ }
+
+ /**
+ * 鑾峰彇鑱旂郴浜�
+ *
+ * @return linkman - 鑱旂郴浜�
+ */
+ public String getLinkman() {
+ return linkman;
+ }
+
+ /**
+ * 璁剧疆鑱旂郴浜�
+ *
+ * @param linkman 鑱旂郴浜�
+ */
+ public void setLinkman(String linkman) {
+ this.linkman = linkman == null ? null : linkman.trim();
+ }
+
+ /**
+ * 鑾峰彇缁忓害
+ *
+ * @return longitude - 缁忓害
+ */
+ public String getLongitude() {
+ return longitude;
+ }
+
+ /**
+ * 璁剧疆缁忓害
+ *
+ * @param longitude 缁忓害
+ */
+ public void setLongitude(String longitude) {
+ this.longitude = longitude == null ? null : longitude.trim();
+ }
+
+ /**
+ * 鑾峰彇璁惧缂栫爜
+ *
+ * @return mn_code - 璁惧缂栫爜
+ */
+ public String getMnCode() {
+ return mnCode;
+ }
+
+ /**
+ * 璁剧疆璁惧缂栫爜
+ *
+ * @param mnCode 璁惧缂栫爜
+ */
+ public void setMnCode(String mnCode) {
+ this.mnCode = mnCode == null ? null : mnCode.trim();
+ }
+
+ /**
+ * 鑾峰彇绔欑偣鍚嶇О
+ *
+ * @return name - 绔欑偣鍚嶇О
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * 璁剧疆绔欑偣鍚嶇О
+ *
+ * @param name 绔欑偣鍚嶇О
+ */
+ public void setName(String name) {
+ this.name = name == null ? null : name.trim();
+ }
+
+ /**
+ * 鑾峰彇鍣0鍔熻兘鍖�
+ *
+ * @return noise_region - 鍣0鍔熻兘鍖�
+ */
+ public String getNoiseRegion() {
+ return noiseRegion;
+ }
+
+ /**
+ * 璁剧疆鍣0鍔熻兘鍖�
+ *
+ * @param noiseRegion 鍣0鍔熻兘鍖�
+ */
+ public void setNoiseRegion(String noiseRegion) {
+ this.noiseRegion = noiseRegion == null ? null : noiseRegion.trim();
+ }
+
+ /**
+ * 鑾峰彇鑱旂郴浜虹數璇�
+ *
+ * @return phone - 鑱旂郴浜虹數璇�
+ */
+ public String getPhone() {
+ return phone;
+ }
+
+ /**
+ * 璁剧疆鑱旂郴浜虹數璇�
+ *
+ * @param phone 鑱旂郴浜虹數璇�
+ */
+ public void setPhone(String phone) {
+ this.phone = phone == null ? null : phone.trim();
+ }
+
+ /**
+ * 鑾峰彇鎵�灞炵渷浠�
+ *
+ * @return province - 鎵�灞炵渷浠�
+ */
+ public String getProvince() {
+ return province;
+ }
+
+ /**
+ * 璁剧疆鎵�灞炵渷浠�
+ *
+ * @param province 鎵�灞炵渷浠�
+ */
+ public void setProvince(String province) {
+ this.province = province == null ? null : province.trim();
+ }
+
+ /**
+ * 鑾峰彇璐熻矗浜�
+ *
+ * @return responsible - 璐熻矗浜�
+ */
+ public String getResponsible() {
+ return responsible;
+ }
+
+ /**
+ * 璁剧疆璐熻矗浜�
+ *
+ * @param responsible 璐熻矗浜�
+ */
+ public void setResponsible(String responsible) {
+ this.responsible = responsible == null ? null : responsible.trim();
+ }
+
+ /**
+ * 鑾峰彇鍐呬腑澶栫幆缂栫爜
+ *
+ * @return ring_id - 鍐呬腑澶栫幆缂栫爜
+ */
+ public String getRingId() {
+ return ringId;
+ }
+
+ /**
+ * 璁剧疆鍐呬腑澶栫幆缂栫爜
+ *
+ * @param ringId 鍐呬腑澶栫幆缂栫爜
+ */
+ public void setRingId(String ringId) {
+ this.ringId = ringId == null ? null : ringId.trim();
+ }
+
+ /**
+ * 鑾峰彇闃舵寮�濮嬫棩鏈�
+ *
+ * @return stage_begin_date - 闃舵寮�濮嬫棩鏈�
+ */
+ public Date getStageBeginDate() {
+ return stageBeginDate;
+ }
+
+ /**
+ * 璁剧疆闃舵寮�濮嬫棩鏈�
+ *
+ * @param stageBeginDate 闃舵寮�濮嬫棩鏈�
+ */
+ public void setStageBeginDate(Date stageBeginDate) {
+ this.stageBeginDate = stageBeginDate;
+ }
+
+ /**
+ * 鑾峰彇鍋滄鏃堕棿
+ *
+ * @return stop_time - 鍋滄鏃堕棿
+ */
+ public Date getStopTime() {
+ return stopTime;
+ }
+
+ /**
+ * 璁剧疆鍋滄鏃堕棿
+ *
+ * @param stopTime 鍋滄鏃堕棿
+ */
+ public void setStopTime(Date stopTime) {
+ this.stopTime = stopTime;
+ }
+
+ /**
+ * 鑾峰彇tsp娴撳害
+ *
+ * @return tsp - tsp娴撳害
+ */
+ public Double getTsp() {
+ return tsp;
+ }
+
+ /**
+ * 璁剧疆tsp娴撳害
+ *
+ * @param tsp tsp娴撳害
+ */
+ public void setTsp(Double tsp) {
+ this.tsp = tsp;
+ }
+
+ /**
+ * 鑾峰彇绫诲瀷缂栫爜
+ *
+ * @return type_id - 绫诲瀷缂栫爜
+ */
+ public String getTypeId() {
+ return typeId;
+ }
+
+ /**
+ * 璁剧疆绫诲瀷缂栫爜
+ *
+ * @param typeId 绫诲瀷缂栫爜
+ */
+ public void setTypeId(String typeId) {
+ this.typeId = typeId == null ? null : typeId.trim();
+ }
+
+ /**
+ * 鑾峰彇绫诲瀷鍚嶇О
+ *
+ * @return typename - 绫诲瀷鍚嶇О
+ */
+ public String getTypename() {
+ return typename;
+ }
+
+ /**
+ * 璁剧疆绫诲瀷鍚嶇О
+ *
+ * @param typename 绫诲瀷鍚嶇О
+ */
+ public void setTypename(String typename) {
+ this.typename = typename == null ? null : typename.trim();
+ }
+
+ /**
+ * 鑾峰彇缁熻绫诲瀷缂栫爜
+ *
+ * @return union_type_id - 缁熻绫诲瀷缂栫爜
+ */
+ public String getUnionTypeId() {
+ return unionTypeId;
+ }
+
+ /**
+ * 璁剧疆缁熻绫诲瀷缂栫爜
+ *
+ * @param unionTypeId 缁熻绫诲瀷缂栫爜
+ */
+ public void setUnionTypeId(String unionTypeId) {
+ this.unionTypeId = unionTypeId == null ? null : unionTypeId.trim();
+ }
+
+ /**
+ * 鑾峰彇鍥村楂樺害
+ *
+ * @return wall_height - 鍥村楂樺害
+ */
+ public String getWallHeight() {
+ return wallHeight;
+ }
+
+ /**
+ * 璁剧疆鍥村楂樺害
+ *
+ * @param wallHeight 鍥村楂樺害
+ */
+ public void setWallHeight(String wallHeight) {
+ this.wallHeight = wallHeight == null ? null : wallHeight.trim();
+ }
+
+ /**
+ * 鑾峰彇涓氬姟鏃堕棿
+ *
+ * @return ywsj_date - 涓氬姟鏃堕棿
+ */
+ public Date getYwsjDate() {
+ return ywsjDate;
+ }
+
+ /**
+ * 璁剧疆涓氬姟鏃堕棿
+ *
+ * @param ywsjDate 涓氬姟鏃堕棿
+ */
+ public void setYwsjDate(Date ywsjDate) {
+ this.ywsjDate = ywsjDate;
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteMap.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteMap.java
new file mode 100644
index 0000000..e3fe2c1
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/DustSiteMap.java
@@ -0,0 +1,146 @@
+package cn.flightfeather.supervision.domain.ds2.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.util.Date;
+
+@Table(name = "ja_t_dust_site_map")
+public class DustSiteMap {
+ @Id
+ @Column(name = "Id")
+ private Integer id;
+
+ @Column(name = "TZ_User_Id")
+ private String tzUserId;
+
+ @Column(name = "TZ_User_Name")
+ private String tzUserName;
+
+ @Column(name = "JA_MN_Code")
+ private String jaMnCode;
+
+ @Column(name = "JA_Scene_Name")
+ private String jaSceneName;
+
+ @Column(name = "SV_User_Id")
+ private String svUserId;
+
+ @Column(name = "SV_User_name")
+ private String svUserName;
+
+ @Column(name = "Create_Time")
+ private Date createTime;
+
+ /**
+ * @return Id
+ */
+ public Integer getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ */
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ /**
+ * @return TZ_User_Id
+ */
+ public String getTzUserId() {
+ return tzUserId;
+ }
+
+ /**
+ * @param tzUserId
+ */
+ public void setTzUserId(String tzUserId) {
+ this.tzUserId = tzUserId == null ? null : tzUserId.trim();
+ }
+
+ /**
+ * @return TZ_User_Name
+ */
+ public String getTzUserName() {
+ return tzUserName;
+ }
+
+ /**
+ * @param tzUserName
+ */
+ public void setTzUserName(String tzUserName) {
+ this.tzUserName = tzUserName == null ? null : tzUserName.trim();
+ }
+
+ /**
+ * @return JA_MN_Code
+ */
+ public String getJaMnCode() {
+ return jaMnCode;
+ }
+
+ /**
+ * @param jaMnCode
+ */
+ public void setJaMnCode(String jaMnCode) {
+ this.jaMnCode = jaMnCode == null ? null : jaMnCode.trim();
+ }
+
+ /**
+ * @return JA_Scene_Name
+ */
+ public String getJaSceneName() {
+ return jaSceneName;
+ }
+
+ /**
+ * @param jaSceneName
+ */
+ public void setJaSceneName(String jaSceneName) {
+ this.jaSceneName = jaSceneName == null ? null : jaSceneName.trim();
+ }
+
+ /**
+ * @return SV_User_Id
+ */
+ public String getSvUserId() {
+ return svUserId;
+ }
+
+ /**
+ * @param svUserId
+ */
+ public void setSvUserId(String svUserId) {
+ this.svUserId = svUserId == null ? null : svUserId.trim();
+ }
+
+ /**
+ * @return SV_User_name
+ */
+ public String getSvUserName() {
+ return svUserName;
+ }
+
+ /**
+ * @param svUserName
+ */
+ public void setSvUserName(String svUserName) {
+ this.svUserName = svUserName == null ? null : svUserName.trim();
+ }
+
+ /**
+ * @return Create_Time
+ */
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime
+ */
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/HourDustData.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/HourDustData.java
new file mode 100644
index 0000000..dbe9e56
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/HourDustData.java
@@ -0,0 +1,326 @@
+package cn.flightfeather.supervision.domain.ds2.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.util.Date;
+
+@Table(name = "ja_t_hour_dust_data")
+public class HourDustData {
+ @Id
+ private String id;
+
+ /**
+ * 鎵皹鍊�
+ */
+ private Double dustvalue;
+
+ /**
+ * FLAG
+ */
+ private String flag;
+
+ /**
+ * 绛夌骇
+ */
+ private String grade;
+
+ /**
+ * 鎵�灞炲尯鍘�
+ */
+ private String groupname;
+
+ /**
+ * 鍏ュ簱鏃堕棿
+ */
+ private Date inserttime;
+
+ /**
+ * 寮�濮嬫椂闂�
+ */
+ private Date lst;
+
+ /**
+ * 缁撴潫鏃堕棿
+ */
+ @Column(name = "lst_end")
+ private Date lstEnd;
+
+ /**
+ * 鐩戞祴璁惧缂栫爜
+ */
+ private String mncode;
+
+ /**
+ * 宸ョ▼鍚嶇О
+ */
+ private String name;
+
+ /**
+ * 鍣0鍊�
+ */
+ private String noisevalue;
+
+ /**
+ * 宸ョ▼ID
+ */
+ private String projectid;
+
+ /**
+ * 宸ョ▼绫诲埆ID
+ */
+ private String projecttypeid;
+
+ /**
+ * 璐ㄩ噺
+ */
+ private String quality;
+
+ /**
+ * @return id
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ */
+ public void setId(String id) {
+ this.id = id == null ? null : id.trim();
+ }
+
+ /**
+ * 鑾峰彇鎵皹鍊�
+ *
+ * @return dustvalue - 鎵皹鍊�
+ */
+ public Double getDustvalue() {
+ return dustvalue;
+ }
+
+ /**
+ * 璁剧疆鎵皹鍊�
+ *
+ * @param dustvalue 鎵皹鍊�
+ */
+ public void setDustvalue(Double dustvalue) {
+ this.dustvalue = dustvalue;
+ }
+
+ /**
+ * 鑾峰彇FLAG
+ *
+ * @return flag - FLAG
+ */
+ public String getFlag() {
+ return flag;
+ }
+
+ /**
+ * 璁剧疆FLAG
+ *
+ * @param flag FLAG
+ */
+ public void setFlag(String flag) {
+ this.flag = flag == null ? null : flag.trim();
+ }
+
+ /**
+ * 鑾峰彇绛夌骇
+ *
+ * @return grade - 绛夌骇
+ */
+ public String getGrade() {
+ return grade;
+ }
+
+ /**
+ * 璁剧疆绛夌骇
+ *
+ * @param grade 绛夌骇
+ */
+ public void setGrade(String grade) {
+ this.grade = grade == null ? null : grade.trim();
+ }
+
+ /**
+ * 鑾峰彇鎵�灞炲尯鍘�
+ *
+ * @return groupname - 鎵�灞炲尯鍘�
+ */
+ public String getGroupname() {
+ return groupname;
+ }
+
+ /**
+ * 璁剧疆鎵�灞炲尯鍘�
+ *
+ * @param groupname 鎵�灞炲尯鍘�
+ */
+ public void setGroupname(String groupname) {
+ this.groupname = groupname == null ? null : groupname.trim();
+ }
+
+ /**
+ * 鑾峰彇鍏ュ簱鏃堕棿
+ *
+ * @return inserttime - 鍏ュ簱鏃堕棿
+ */
+ public Date getInserttime() {
+ return inserttime;
+ }
+
+ /**
+ * 璁剧疆鍏ュ簱鏃堕棿
+ *
+ * @param inserttime 鍏ュ簱鏃堕棿
+ */
+ public void setInserttime(Date inserttime) {
+ this.inserttime = inserttime;
+ }
+
+ /**
+ * 鑾峰彇寮�濮嬫椂闂�
+ *
+ * @return lst - 寮�濮嬫椂闂�
+ */
+ public Date getLst() {
+ return lst;
+ }
+
+ /**
+ * 璁剧疆寮�濮嬫椂闂�
+ *
+ * @param lst 寮�濮嬫椂闂�
+ */
+ public void setLst(Date lst) {
+ this.lst = lst;
+ }
+
+ /**
+ * 鑾峰彇缁撴潫鏃堕棿
+ *
+ * @return lst_end - 缁撴潫鏃堕棿
+ */
+ public Date getLstEnd() {
+ return lstEnd;
+ }
+
+ /**
+ * 璁剧疆缁撴潫鏃堕棿
+ *
+ * @param lstEnd 缁撴潫鏃堕棿
+ */
+ public void setLstEnd(Date lstEnd) {
+ this.lstEnd = lstEnd;
+ }
+
+ /**
+ * 鑾峰彇鐩戞祴璁惧缂栫爜
+ *
+ * @return mncode - 鐩戞祴璁惧缂栫爜
+ */
+ public String getMncode() {
+ return mncode;
+ }
+
+ /**
+ * 璁剧疆鐩戞祴璁惧缂栫爜
+ *
+ * @param mncode 鐩戞祴璁惧缂栫爜
+ */
+ public void setMncode(String mncode) {
+ this.mncode = mncode == null ? null : mncode.trim();
+ }
+
+ /**
+ * 鑾峰彇宸ョ▼鍚嶇О
+ *
+ * @return name - 宸ョ▼鍚嶇О
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * 璁剧疆宸ョ▼鍚嶇О
+ *
+ * @param name 宸ョ▼鍚嶇О
+ */
+ public void setName(String name) {
+ this.name = name == null ? null : name.trim();
+ }
+
+ /**
+ * 鑾峰彇鍣0鍊�
+ *
+ * @return noisevalue - 鍣0鍊�
+ */
+ public String getNoisevalue() {
+ return noisevalue;
+ }
+
+ /**
+ * 璁剧疆鍣0鍊�
+ *
+ * @param noisevalue 鍣0鍊�
+ */
+ public void setNoisevalue(String noisevalue) {
+ this.noisevalue = noisevalue == null ? null : noisevalue.trim();
+ }
+
+ /**
+ * 鑾峰彇宸ョ▼ID
+ *
+ * @return projectid - 宸ョ▼ID
+ */
+ public String getProjectid() {
+ return projectid;
+ }
+
+ /**
+ * 璁剧疆宸ョ▼ID
+ *
+ * @param projectid 宸ョ▼ID
+ */
+ public void setProjectid(String projectid) {
+ this.projectid = projectid == null ? null : projectid.trim();
+ }
+
+ /**
+ * 鑾峰彇宸ョ▼绫诲埆ID
+ *
+ * @return projecttypeid - 宸ョ▼绫诲埆ID
+ */
+ public String getProjecttypeid() {
+ return projecttypeid;
+ }
+
+ /**
+ * 璁剧疆宸ョ▼绫诲埆ID
+ *
+ * @param projecttypeid 宸ョ▼绫诲埆ID
+ */
+ public void setProjecttypeid(String projecttypeid) {
+ this.projecttypeid = projecttypeid == null ? null : projecttypeid.trim();
+ }
+
+ /**
+ * 鑾峰彇璐ㄩ噺
+ *
+ * @return quality - 璐ㄩ噺
+ */
+ public String getQuality() {
+ return quality;
+ }
+
+ /**
+ * 璁剧疆璐ㄩ噺
+ *
+ * @param quality 璐ㄩ噺
+ */
+ public void setQuality(String quality) {
+ this.quality = quality == null ? null : quality.trim();
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampDeviceData.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampDeviceData.java
new file mode 100644
index 0000000..e44659b
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampDeviceData.java
@@ -0,0 +1,290 @@
+package cn.flightfeather.supervision.domain.ds2.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.util.Date;
+
+@Table(name = "ja_t_lamp_device_data")
+public class LampDeviceData {
+ @Id
+ private Integer id;
+
+ /**
+ * 閫氶亾鍙�
+ */
+ @Column(name = "channel_num")
+ private String channelNum;
+
+ /**
+ * 娓呮磥搴�
+ */
+ @Column(name = "clean_liness")
+ private String cleanLiness;
+
+ /**
+ * 璁惧缂栧彿
+ */
+ @Column(name = "device_code")
+ private String deviceCode;
+
+ /**
+ * 璁惧鍚嶇О
+ */
+ @Column(name = "device_name")
+ private String deviceName;
+
+ /**
+ * 璁惧鐘舵��
+ */
+ @Column(name = "device_state")
+ private String deviceState;
+
+ /**
+ * 浼佷笟缂栧彿
+ */
+ @Column(name = "enter_id")
+ private String enterId;
+
+ /**
+ * 椋庢墖鐘舵��
+ */
+ @Column(name = "fan_state")
+ private String fanState;
+
+ /**
+ * 娌圭儫娴撳害
+ */
+ @Column(name = "lampblack_value")
+ private Double lampblackValue;
+
+ /**
+ * 鐩戞祴鏃堕棿
+ */
+ @Column(name = "monitor_time")
+ private Date monitorTime;
+
+ /**
+ * 鐢熶骇鏃堕棿
+ */
+ @Column(name = "production_date")
+ private Date productionDate;
+
+ /**
+ * 鍑�鍖栧櫒鐘舵��
+ */
+ @Column(name = "purifier_state")
+ private String purifierState;
+
+ /**
+ * @return id
+ */
+ public Integer getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ */
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ /**
+ * 鑾峰彇閫氶亾鍙�
+ *
+ * @return channel_num - 閫氶亾鍙�
+ */
+ public String getChannelNum() {
+ return channelNum;
+ }
+
+ /**
+ * 璁剧疆閫氶亾鍙�
+ *
+ * @param channelNum 閫氶亾鍙�
+ */
+ public void setChannelNum(String channelNum) {
+ this.channelNum = channelNum == null ? null : channelNum.trim();
+ }
+
+ /**
+ * 鑾峰彇娓呮磥搴�
+ *
+ * @return clean_liness - 娓呮磥搴�
+ */
+ public String getCleanLiness() {
+ return cleanLiness;
+ }
+
+ /**
+ * 璁剧疆娓呮磥搴�
+ *
+ * @param cleanLiness 娓呮磥搴�
+ */
+ public void setCleanLiness(String cleanLiness) {
+ this.cleanLiness = cleanLiness == null ? null : cleanLiness.trim();
+ }
+
+ /**
+ * 鑾峰彇璁惧缂栧彿
+ *
+ * @return device_code - 璁惧缂栧彿
+ */
+ public String getDeviceCode() {
+ return deviceCode;
+ }
+
+ /**
+ * 璁剧疆璁惧缂栧彿
+ *
+ * @param deviceCode 璁惧缂栧彿
+ */
+ public void setDeviceCode(String deviceCode) {
+ this.deviceCode = deviceCode == null ? null : deviceCode.trim();
+ }
+
+ /**
+ * 鑾峰彇璁惧鍚嶇О
+ *
+ * @return device_name - 璁惧鍚嶇О
+ */
+ public String getDeviceName() {
+ return deviceName;
+ }
+
+ /**
+ * 璁剧疆璁惧鍚嶇О
+ *
+ * @param deviceName 璁惧鍚嶇О
+ */
+ public void setDeviceName(String deviceName) {
+ this.deviceName = deviceName == null ? null : deviceName.trim();
+ }
+
+ /**
+ * 鑾峰彇璁惧鐘舵��
+ *
+ * @return device_state - 璁惧鐘舵��
+ */
+ public String getDeviceState() {
+ return deviceState;
+ }
+
+ /**
+ * 璁剧疆璁惧鐘舵��
+ *
+ * @param deviceState 璁惧鐘舵��
+ */
+ public void setDeviceState(String deviceState) {
+ this.deviceState = deviceState == null ? null : deviceState.trim();
+ }
+
+ /**
+ * 鑾峰彇浼佷笟缂栧彿
+ *
+ * @return enter_id - 浼佷笟缂栧彿
+ */
+ public String getEnterId() {
+ return enterId;
+ }
+
+ /**
+ * 璁剧疆浼佷笟缂栧彿
+ *
+ * @param enterId 浼佷笟缂栧彿
+ */
+ public void setEnterId(String enterId) {
+ this.enterId = enterId == null ? null : enterId.trim();
+ }
+
+ /**
+ * 鑾峰彇椋庢墖鐘舵��
+ *
+ * @return fan_state - 椋庢墖鐘舵��
+ */
+ public String getFanState() {
+ return fanState;
+ }
+
+ /**
+ * 璁剧疆椋庢墖鐘舵��
+ *
+ * @param fanState 椋庢墖鐘舵��
+ */
+ public void setFanState(String fanState) {
+ this.fanState = fanState == null ? null : fanState.trim();
+ }
+
+ /**
+ * 鑾峰彇娌圭儫娴撳害
+ *
+ * @return lampblack_value - 娌圭儫娴撳害
+ */
+ public Double getLampblackValue() {
+ return lampblackValue;
+ }
+
+ /**
+ * 璁剧疆娌圭儫娴撳害
+ *
+ * @param lampblackValue 娌圭儫娴撳害
+ */
+ public void setLampblackValue(Double lampblackValue) {
+ this.lampblackValue = lampblackValue;
+ }
+
+ /**
+ * 鑾峰彇鐩戞祴鏃堕棿
+ *
+ * @return monitor_time - 鐩戞祴鏃堕棿
+ */
+ public Date getMonitorTime() {
+ return monitorTime;
+ }
+
+ /**
+ * 璁剧疆鐩戞祴鏃堕棿
+ *
+ * @param monitorTime 鐩戞祴鏃堕棿
+ */
+ public void setMonitorTime(Date monitorTime) {
+ this.monitorTime = monitorTime;
+ }
+
+ /**
+ * 鑾峰彇鐢熶骇鏃堕棿
+ *
+ * @return production_date - 鐢熶骇鏃堕棿
+ */
+ public Date getProductionDate() {
+ return productionDate;
+ }
+
+ /**
+ * 璁剧疆鐢熶骇鏃堕棿
+ *
+ * @param productionDate 鐢熶骇鏃堕棿
+ */
+ public void setProductionDate(Date productionDate) {
+ this.productionDate = productionDate;
+ }
+
+ /**
+ * 鑾峰彇鍑�鍖栧櫒鐘舵��
+ *
+ * @return purifier_state - 鍑�鍖栧櫒鐘舵��
+ */
+ public String getPurifierState() {
+ return purifierState;
+ }
+
+ /**
+ * 璁剧疆鍑�鍖栧櫒鐘舵��
+ *
+ * @param purifierState 鍑�鍖栧櫒鐘舵��
+ */
+ public void setPurifierState(String purifierState) {
+ this.purifierState = purifierState == null ? null : purifierState.trim();
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampEnterBaseInfo.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampEnterBaseInfo.java
new file mode 100644
index 0000000..ed0d312
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/LampEnterBaseInfo.java
@@ -0,0 +1,377 @@
+package cn.flightfeather.supervision.domain.ds2.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.util.Date;
+
+@Table(name = "ja_t_lamp_enter_base_info")
+public class LampEnterBaseInfo {
+ /**
+ * 浼佷笟缂栫爜
+ */
+ @Id
+ @Column(name = "enter_id")
+ private String enterId;
+
+ /**
+ * 浼佷笟鍚嶇О
+ */
+ @Column(name = "enter_name")
+ private String enterName;
+
+ /**
+ * 浼佷笟鍦板潃
+ */
+ private String address;
+
+ /**
+ * 钀ヤ笟鏃堕棿
+ */
+ @Column(name = "business_date")
+ private String businessDate;
+
+ /**
+ * 鏁版嵁婧�
+ */
+ private String datasource;
+
+ /**
+ * 闆嗚仛鍖虹紪鐮�
+ */
+ @Column(name = "jjq_code")
+ private String jjqCode;
+
+ /**
+ * 闆嗚仛鍖哄悕绉�
+ */
+ @Column(name = "jjq_name")
+ private String jjqName;
+
+ /**
+ * 绾害
+ */
+ private Double latitude;
+
+ /**
+ * 鑱旂郴浜�
+ */
+ @Column(name = "link_man")
+ private String linkMan;
+
+ /**
+ * 鑱旂郴鐢佃瘽
+ */
+ @Column(name = "link_phone")
+ private String linkPhone;
+
+ /**
+ * 缁忓害
+ */
+ private Double longitude;
+
+ /**
+ * 琛屾斂鍖哄悕绉�
+ */
+ @Column(name = "region_name")
+ private String regionName;
+
+ /**
+ * 娉ㄥ唽鏃堕棿
+ */
+ @Column(name = "regist_date")
+ private Date registDate;
+
+ /**
+ * 鐘舵��
+ */
+ private String state;
+
+ /**
+ * 鎵�灞炶閬�
+ */
+ private String street;
+
+ /**
+ * 鎺掑彛绫诲瀷
+ */
+ private String outfallType;
+
+ /**
+ * 鑾峰彇浼佷笟缂栫爜
+ *
+ * @return enter_id - 浼佷笟缂栫爜
+ */
+ public String getEnterId() {
+ return enterId;
+ }
+
+ /**
+ * 璁剧疆浼佷笟缂栫爜
+ *
+ * @param enterId 浼佷笟缂栫爜
+ */
+ public void setEnterId(String enterId) {
+ this.enterId = enterId == null ? null : enterId.trim();
+ }
+
+ /**
+ * 鑾峰彇浼佷笟鍚嶇О
+ *
+ * @return enter_name - 浼佷笟鍚嶇О
+ */
+ public String getEnterName() {
+ return enterName;
+ }
+
+ /**
+ * 璁剧疆浼佷笟鍚嶇О
+ *
+ * @param enterName 浼佷笟鍚嶇О
+ */
+ public void setEnterName(String enterName) {
+ this.enterName = enterName == null ? null : enterName.trim();
+ }
+
+ /**
+ * 鑾峰彇浼佷笟鍦板潃
+ *
+ * @return address - 浼佷笟鍦板潃
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * 璁剧疆浼佷笟鍦板潃
+ *
+ * @param address 浼佷笟鍦板潃
+ */
+ public void setAddress(String address) {
+ this.address = address == null ? null : address.trim();
+ }
+
+ /**
+ * 鑾峰彇钀ヤ笟鏃堕棿
+ *
+ * @return business_date - 钀ヤ笟鏃堕棿
+ */
+ public String getBusinessDate() {
+ return businessDate;
+ }
+
+ /**
+ * 璁剧疆钀ヤ笟鏃堕棿
+ *
+ * @param businessDate 钀ヤ笟鏃堕棿
+ */
+ public void setBusinessDate(String businessDate) {
+ this.businessDate = businessDate == null ? null : businessDate.trim();
+ }
+
+ /**
+ * 鑾峰彇鏁版嵁婧�
+ *
+ * @return datasource - 鏁版嵁婧�
+ */
+ public String getDatasource() {
+ return datasource;
+ }
+
+ /**
+ * 璁剧疆鏁版嵁婧�
+ *
+ * @param datasource 鏁版嵁婧�
+ */
+ public void setDatasource(String datasource) {
+ this.datasource = datasource == null ? null : datasource.trim();
+ }
+
+ /**
+ * 鑾峰彇闆嗚仛鍖虹紪鐮�
+ *
+ * @return jjq_code - 闆嗚仛鍖虹紪鐮�
+ */
+ public String getJjqCode() {
+ return jjqCode;
+ }
+
+ /**
+ * 璁剧疆闆嗚仛鍖虹紪鐮�
+ *
+ * @param jjqCode 闆嗚仛鍖虹紪鐮�
+ */
+ public void setJjqCode(String jjqCode) {
+ this.jjqCode = jjqCode == null ? null : jjqCode.trim();
+ }
+
+ /**
+ * 鑾峰彇闆嗚仛鍖哄悕绉�
+ *
+ * @return jjq_name - 闆嗚仛鍖哄悕绉�
+ */
+ public String getJjqName() {
+ return jjqName;
+ }
+
+ /**
+ * 璁剧疆闆嗚仛鍖哄悕绉�
+ *
+ * @param jjqName 闆嗚仛鍖哄悕绉�
+ */
+ public void setJjqName(String jjqName) {
+ this.jjqName = jjqName == null ? null : jjqName.trim();
+ }
+
+ /**
+ * 鑾峰彇绾害
+ *
+ * @return latitude - 绾害
+ */
+ public Double getLatitude() {
+ return latitude;
+ }
+
+ /**
+ * 璁剧疆绾害
+ *
+ * @param latitude 绾害
+ */
+ public void setLatitude(Double latitude) {
+ this.latitude = latitude;
+ }
+
+ /**
+ * 鑾峰彇鑱旂郴浜�
+ *
+ * @return link_man - 鑱旂郴浜�
+ */
+ public String getLinkMan() {
+ return linkMan;
+ }
+
+ /**
+ * 璁剧疆鑱旂郴浜�
+ *
+ * @param linkMan 鑱旂郴浜�
+ */
+ public void setLinkMan(String linkMan) {
+ this.linkMan = linkMan == null ? null : linkMan.trim();
+ }
+
+ /**
+ * 鑾峰彇鑱旂郴鐢佃瘽
+ *
+ * @return link_phone - 鑱旂郴鐢佃瘽
+ */
+ public String getLinkPhone() {
+ return linkPhone;
+ }
+
+ /**
+ * 璁剧疆鑱旂郴鐢佃瘽
+ *
+ * @param linkPhone 鑱旂郴鐢佃瘽
+ */
+ public void setLinkPhone(String linkPhone) {
+ this.linkPhone = linkPhone == null ? null : linkPhone.trim();
+ }
+
+ /**
+ * 鑾峰彇缁忓害
+ *
+ * @return longitude - 缁忓害
+ */
+ public Double getLongitude() {
+ return longitude;
+ }
+
+ /**
+ * 璁剧疆缁忓害
+ *
+ * @param longitude 缁忓害
+ */
+ public void setLongitude(Double longitude) {
+ this.longitude = longitude;
+ }
+
+ /**
+ * 鑾峰彇琛屾斂鍖哄悕绉�
+ *
+ * @return region_name - 琛屾斂鍖哄悕绉�
+ */
+ public String getRegionName() {
+ return regionName;
+ }
+
+ /**
+ * 璁剧疆琛屾斂鍖哄悕绉�
+ *
+ * @param regionName 琛屾斂鍖哄悕绉�
+ */
+ public void setRegionName(String regionName) {
+ this.regionName = regionName == null ? null : regionName.trim();
+ }
+
+ /**
+ * 鑾峰彇娉ㄥ唽鏃堕棿
+ *
+ * @return regist_date - 娉ㄥ唽鏃堕棿
+ */
+ public Date getRegistDate() {
+ return registDate;
+ }
+
+ /**
+ * 璁剧疆娉ㄥ唽鏃堕棿
+ *
+ * @param registDate 娉ㄥ唽鏃堕棿
+ */
+ public void setRegistDate(Date registDate) {
+ this.registDate = registDate;
+ }
+
+ /**
+ * 鑾峰彇鐘舵��
+ *
+ * @return state - 鐘舵��
+ */
+ public String getState() {
+ return state;
+ }
+
+ /**
+ * 璁剧疆鐘舵��
+ *
+ * @param state 鐘舵��
+ */
+ public void setState(String state) {
+ this.state = state == null ? null : state.trim();
+ }
+
+ /**
+ * 鑾峰彇鎵�灞炶閬�
+ *
+ * @return street - 鎵�灞炶閬�
+ */
+ public String getStreet() {
+ return street;
+ }
+
+ /**
+ * 璁剧疆鎵�灞炶閬�
+ *
+ * @param street 鎵�灞炶閬�
+ */
+ public void setStreet(String street) {
+ this.street = street == null ? null : street.trim();
+ }
+
+ public String getOutfallType() {
+ return outfallType;
+ }
+
+ public void setOutfallType(String outfallType) {
+ this.outfallType = outfallType;
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/RestaurantBaseInfo.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/RestaurantBaseInfo.java
new file mode 100644
index 0000000..8f08d32
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/RestaurantBaseInfo.java
@@ -0,0 +1,600 @@
+package cn.flightfeather.supervision.domain.ds2.entity;
+
+import cn.flightfeather.supervision.domain.ds1.entity.BaseScene;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Table(name = "ea_t_restaurant_base_info")
+public class RestaurantBaseInfo implements BaseScene {
+ @Id
+ @Column(name = "RB_GUID")
+ private String rbGuid;
+
+ /**
+ * 缁忚惀鑿滅郴
+ */
+ @Column(name = "RB_Cuisine")
+ private String rbCuisine;
+
+ /**
+ * 娌圭儫绫诲瀷
+ */
+ @Column(name = "RB_Cooking_Fumes_Type")
+ private String rbCookingFumesType;
+
+ /**
+ * 鏉ュ楂樺嘲鏃舵
+ */
+ @Column(name = "RB_Peak_Period")
+ private String rbPeakPeriod;
+
+ /**
+ * 瀹ゅ唴灏遍浣�
+ */
+ @Column(name = "RB_Indoor_Seating")
+ private Integer rbIndoorSeating;
+
+ /**
+ * 瀹ゅ灏遍浣�
+ */
+ @Column(name = "RB_Outdoor_Seating")
+ private Integer rbOutdoorSeating;
+
+ /**
+ * 灏遍浣嶆�绘暟
+ */
+ @Column(name = "RB_Total_Seating")
+ private Integer rbTotalSeating;
+
+ /**
+ * 鏄惁瀛樺湪澶у爞鐑х儰鎴栨埛澶栫儳鐑�
+ */
+ @Column(name = "RB_Outdoor_Barbecue")
+ private Boolean rbOutdoorBarbecue;
+
+ /**
+ * 鍚庡帹鏄惁鏈夊悜澶栨暈寮�闂ㄧ獥
+ */
+ @Column(name = "RB_Open_Kitchen")
+ private Boolean rbOpenKitchen;
+
+ /**
+ * 澶у爞銆佸悗鍘ㄧ幆澧冩儏鍐�
+ */
+ @Column(name = "RB_Environment")
+ private String rbEnvironment;
+
+ /**
+ * 鐏跺ご鏁�
+ */
+ @Column(name = "RB_Cooking_Range_Num")
+ private Integer rbCookingRangeNum;
+
+ /**
+ * 鐢电儰鐐�
+ */
+ @Column(name = "RB_Electric_Oven_Num")
+ private Integer rbElectricOvenNum;
+
+ /**
+ * 鍏朵粬娑夋补鐑熺倞鍏�
+ */
+ @Column(name = "RB_Other_Cooker_Num")
+ private String rbOtherCookerNum;
+
+ /**
+ * 鍚庡帹鏄惁鏈夋柊椋�
+ */
+ @Column(name = "RB_Fresh_Air")
+ private Boolean rbFreshAir;
+
+ /**
+ * 鍚庡帹鏄惁鏈夌┖璋�
+ */
+ @Column(name = "RB_Air_Conditioner")
+ private Boolean rbAirConditioner;
+
+ /**
+ * 鍚庡帹鏄惁鏈夋帓姘旀墖
+ */
+ @Column(name = "RB_Exhaust_Fan")
+ private Boolean rbExhaustFan;
+
+ /**
+ * 鐢ㄦ补绫诲瀷
+ */
+ @Column(name = "RB_Cooking_Oil_Type")
+ private String rbCookingOilType;
+
+ /**
+ * 鏈堝害鐢ㄦ补閲忥紙L锛�
+ */
+ @Column(name = "RB_Cooking_Oil_Capacity")
+ private String rbCookingOilCapacity;
+
+ /**
+ * 鎵�灞為泦涓尯
+ */
+ @Column(name = "RB_Concentration_Area")
+ private String rbConcentrationArea;
+
+ /**
+ * 鎺掑彛鏁伴噺
+ */
+ @Column(name = "RB_Outfall_Count")
+ private Integer rbOutfallCount;
+
+ /**
+ * 鎺掑彛浣嶇疆
+ */
+ @Column(name = "RB_Outfall_Location")
+ private String rbOutfallLocation;
+
+ /**
+ * 鎺掑彛缂栧彿
+ */
+ @Column(name = "RB_Outfall_Num")
+ private String rbOutfallNum;
+
+ @Column(name = "RB_Extension1")
+ private String rbExtension1;
+
+ @Column(name = "RB_Extension2")
+ private String rbExtension2;
+
+ @Column(name = "RB_Extension3")
+ private String rbExtension3;
+
+ @Column(name = "RB_Remark")
+ private String rbRemark;
+
+ /**
+ * @return RB_GUID
+ */
+ public String getRbGuid() {
+ return rbGuid;
+ }
+
+ /**
+ * @param rbGuid
+ */
+ public void setRbGuid(String rbGuid) {
+ this.rbGuid = rbGuid == null ? null : rbGuid.trim();
+ }
+
+ /**
+ * 鑾峰彇缁忚惀鑿滅郴
+ *
+ * @return RB_Cuisine - 缁忚惀鑿滅郴
+ */
+ public String getRbCuisine() {
+ return rbCuisine;
+ }
+
+ /**
+ * 璁剧疆缁忚惀鑿滅郴
+ *
+ * @param rbCuisine 缁忚惀鑿滅郴
+ */
+ public void setRbCuisine(String rbCuisine) {
+ this.rbCuisine = rbCuisine == null ? null : rbCuisine.trim();
+ }
+
+ /**
+ * 鑾峰彇娌圭儫绫诲瀷
+ *
+ * @return RB_Cooking_Fumes_Type - 娌圭儫绫诲瀷
+ */
+ public String getRbCookingFumesType() {
+ return rbCookingFumesType;
+ }
+
+ /**
+ * 璁剧疆娌圭儫绫诲瀷
+ *
+ * @param rbCookingFumesType 娌圭儫绫诲瀷
+ */
+ public void setRbCookingFumesType(String rbCookingFumesType) {
+ this.rbCookingFumesType = rbCookingFumesType == null ? null : rbCookingFumesType.trim();
+ }
+
+ /**
+ * 鑾峰彇鏉ュ楂樺嘲鏃舵
+ *
+ * @return RB_Peak_Period - 鏉ュ楂樺嘲鏃舵
+ */
+ public String getRbPeakPeriod() {
+ return rbPeakPeriod;
+ }
+
+ /**
+ * 璁剧疆鏉ュ楂樺嘲鏃舵
+ *
+ * @param rbPeakPeriod 鏉ュ楂樺嘲鏃舵
+ */
+ public void setRbPeakPeriod(String rbPeakPeriod) {
+ this.rbPeakPeriod = rbPeakPeriod == null ? null : rbPeakPeriod.trim();
+ }
+
+ /**
+ * 鑾峰彇瀹ゅ唴灏遍浣�
+ *
+ * @return RB_Indoor_Seating - 瀹ゅ唴灏遍浣�
+ */
+ public Integer getRbIndoorSeating() {
+ return rbIndoorSeating;
+ }
+
+ /**
+ * 璁剧疆瀹ゅ唴灏遍浣�
+ *
+ * @param rbIndoorSeating 瀹ゅ唴灏遍浣�
+ */
+ public void setRbIndoorSeating(Integer rbIndoorSeating) {
+ this.rbIndoorSeating = rbIndoorSeating;
+ }
+
+ /**
+ * 鑾峰彇瀹ゅ灏遍浣�
+ *
+ * @return RB_Outdoor_Seating - 瀹ゅ灏遍浣�
+ */
+ public Integer getRbOutdoorSeating() {
+ return rbOutdoorSeating;
+ }
+
+ /**
+ * 璁剧疆瀹ゅ灏遍浣�
+ *
+ * @param rbOutdoorSeating 瀹ゅ灏遍浣�
+ */
+ public void setRbOutdoorSeating(Integer rbOutdoorSeating) {
+ this.rbOutdoorSeating = rbOutdoorSeating;
+ }
+
+ /**
+ * 鑾峰彇灏遍浣嶆�绘暟
+ *
+ * @return RB_Total_Seating - 灏遍浣嶆�绘暟
+ */
+ public Integer getRbTotalSeating() {
+ return rbTotalSeating;
+ }
+
+ /**
+ * 璁剧疆灏遍浣嶆�绘暟
+ *
+ * @param rbTotalSeating 灏遍浣嶆�绘暟
+ */
+ public void setRbTotalSeating(Integer rbTotalSeating) {
+ this.rbTotalSeating = rbTotalSeating;
+ }
+
+ /**
+ * 鑾峰彇鏄惁瀛樺湪澶у爞鐑х儰鎴栨埛澶栫儳鐑�
+ *
+ * @return RB_Outdoor_Barbecue - 鏄惁瀛樺湪澶у爞鐑х儰鎴栨埛澶栫儳鐑�
+ */
+ public Boolean getRbOutdoorBarbecue() {
+ return rbOutdoorBarbecue;
+ }
+
+ /**
+ * 璁剧疆鏄惁瀛樺湪澶у爞鐑х儰鎴栨埛澶栫儳鐑�
+ *
+ * @param rbOutdoorBarbecue 鏄惁瀛樺湪澶у爞鐑х儰鎴栨埛澶栫儳鐑�
+ */
+ public void setRbOutdoorBarbecue(Boolean rbOutdoorBarbecue) {
+ this.rbOutdoorBarbecue = rbOutdoorBarbecue;
+ }
+
+ /**
+ * 鑾峰彇鍚庡帹鏄惁鏈夊悜澶栨暈寮�闂ㄧ獥
+ *
+ * @return RB_Open_Kitchen - 鍚庡帹鏄惁鏈夊悜澶栨暈寮�闂ㄧ獥
+ */
+ public Boolean getRbOpenKitchen() {
+ return rbOpenKitchen;
+ }
+
+ /**
+ * 璁剧疆鍚庡帹鏄惁鏈夊悜澶栨暈寮�闂ㄧ獥
+ *
+ * @param rbOpenKitchen 鍚庡帹鏄惁鏈夊悜澶栨暈寮�闂ㄧ獥
+ */
+ public void setRbOpenKitchen(Boolean rbOpenKitchen) {
+ this.rbOpenKitchen = rbOpenKitchen;
+ }
+
+ /**
+ * 鑾峰彇澶у爞銆佸悗鍘ㄧ幆澧冩儏鍐�
+ *
+ * @return RB_Environment - 澶у爞銆佸悗鍘ㄧ幆澧冩儏鍐�
+ */
+ public String getRbEnvironment() {
+ return rbEnvironment;
+ }
+
+ /**
+ * 璁剧疆澶у爞銆佸悗鍘ㄧ幆澧冩儏鍐�
+ *
+ * @param rbEnvironment 澶у爞銆佸悗鍘ㄧ幆澧冩儏鍐�
+ */
+ public void setRbEnvironment(String rbEnvironment) {
+ this.rbEnvironment = rbEnvironment == null ? null : rbEnvironment.trim();
+ }
+
+ /**
+ * 鑾峰彇鐏跺ご鏁�
+ *
+ * @return RB_Cooking_Range_Num - 鐏跺ご鏁�
+ */
+ public Integer getRbCookingRangeNum() {
+ return rbCookingRangeNum;
+ }
+
+ /**
+ * 璁剧疆鐏跺ご鏁�
+ *
+ * @param rbCookingRangeNum 鐏跺ご鏁�
+ */
+ public void setRbCookingRangeNum(Integer rbCookingRangeNum) {
+ this.rbCookingRangeNum = rbCookingRangeNum;
+ }
+
+ /**
+ * 鑾峰彇鐢电儰鐐�
+ *
+ * @return RB_Electric_Oven_Num - 鐢电儰鐐�
+ */
+ public Integer getRbElectricOvenNum() {
+ return rbElectricOvenNum;
+ }
+
+ /**
+ * 璁剧疆鐢电儰鐐�
+ *
+ * @param rbElectricOvenNum 鐢电儰鐐�
+ */
+ public void setRbElectricOvenNum(Integer rbElectricOvenNum) {
+ this.rbElectricOvenNum = rbElectricOvenNum;
+ }
+
+ /**
+ * 鑾峰彇鍏朵粬娑夋补鐑熺倞鍏�
+ *
+ * @return RB_Other_Cooker_Num - 鍏朵粬娑夋补鐑熺倞鍏�
+ */
+ public String getRbOtherCookerNum() {
+ return rbOtherCookerNum;
+ }
+
+ /**
+ * 璁剧疆鍏朵粬娑夋补鐑熺倞鍏�
+ *
+ * @param rbOtherCookerNum 鍏朵粬娑夋补鐑熺倞鍏�
+ */
+ public void setRbOtherCookerNum(String rbOtherCookerNum) {
+ this.rbOtherCookerNum = rbOtherCookerNum == null ? null : rbOtherCookerNum.trim();
+ }
+
+ /**
+ * 鑾峰彇鍚庡帹鏄惁鏈夋柊椋�
+ *
+ * @return RB_Fresh_Air - 鍚庡帹鏄惁鏈夋柊椋�
+ */
+ public Boolean getRbFreshAir() {
+ return rbFreshAir;
+ }
+
+ /**
+ * 璁剧疆鍚庡帹鏄惁鏈夋柊椋�
+ *
+ * @param rbFreshAir 鍚庡帹鏄惁鏈夋柊椋�
+ */
+ public void setRbFreshAir(Boolean rbFreshAir) {
+ this.rbFreshAir = rbFreshAir;
+ }
+
+ /**
+ * 鑾峰彇鍚庡帹鏄惁鏈夌┖璋�
+ *
+ * @return RB_Air_Conditioner - 鍚庡帹鏄惁鏈夌┖璋�
+ */
+ public Boolean getRbAirConditioner() {
+ return rbAirConditioner;
+ }
+
+ /**
+ * 璁剧疆鍚庡帹鏄惁鏈夌┖璋�
+ *
+ * @param rbAirConditioner 鍚庡帹鏄惁鏈夌┖璋�
+ */
+ public void setRbAirConditioner(Boolean rbAirConditioner) {
+ this.rbAirConditioner = rbAirConditioner;
+ }
+
+ /**
+ * 鑾峰彇鍚庡帹鏄惁鏈夋帓姘旀墖
+ *
+ * @return RB_Exhaust_Fan - 鍚庡帹鏄惁鏈夋帓姘旀墖
+ */
+ public Boolean getRbExhaustFan() {
+ return rbExhaustFan;
+ }
+
+ /**
+ * 璁剧疆鍚庡帹鏄惁鏈夋帓姘旀墖
+ *
+ * @param rbExhaustFan 鍚庡帹鏄惁鏈夋帓姘旀墖
+ */
+ public void setRbExhaustFan(Boolean rbExhaustFan) {
+ this.rbExhaustFan = rbExhaustFan;
+ }
+
+ /**
+ * 鑾峰彇鐢ㄦ补绫诲瀷
+ *
+ * @return RB_Cooking_Oil_Type - 鐢ㄦ补绫诲瀷
+ */
+ public String getRbCookingOilType() {
+ return rbCookingOilType;
+ }
+
+ /**
+ * 璁剧疆鐢ㄦ补绫诲瀷
+ *
+ * @param rbCookingOilType 鐢ㄦ补绫诲瀷
+ */
+ public void setRbCookingOilType(String rbCookingOilType) {
+ this.rbCookingOilType = rbCookingOilType == null ? null : rbCookingOilType.trim();
+ }
+
+ /**
+ * 鑾峰彇鏈堝害鐢ㄦ补閲忥紙L锛�
+ *
+ * @return RB_Cooking_Oil_Capacity - 鏈堝害鐢ㄦ补閲忥紙L锛�
+ */
+ public String getRbCookingOilCapacity() {
+ return rbCookingOilCapacity;
+ }
+
+ /**
+ * 璁剧疆鏈堝害鐢ㄦ补閲忥紙L锛�
+ *
+ * @param rbCookingOilCapacity 鏈堝害鐢ㄦ补閲忥紙L锛�
+ */
+ public void setRbCookingOilCapacity(String rbCookingOilCapacity) {
+ this.rbCookingOilCapacity = rbCookingOilCapacity == null ? null : rbCookingOilCapacity.trim();
+ }
+
+ /**
+ * 鑾峰彇鎵�灞為泦涓尯
+ *
+ * @return RB_Concentration_Area - 鎵�灞為泦涓尯
+ */
+ public String getRbConcentrationArea() {
+ return rbConcentrationArea;
+ }
+
+ /**
+ * 璁剧疆鎵�灞為泦涓尯
+ *
+ * @param rbConcentrationArea 鎵�灞為泦涓尯
+ */
+ public void setRbConcentrationArea(String rbConcentrationArea) {
+ this.rbConcentrationArea = rbConcentrationArea == null ? null : rbConcentrationArea.trim();
+ }
+
+ /**
+ * 鑾峰彇鎺掑彛鏁伴噺
+ *
+ * @return RB_Outfall_Count - 鎺掑彛鏁伴噺
+ */
+ public Integer getRbOutfallCount() {
+ return rbOutfallCount;
+ }
+
+ /**
+ * 璁剧疆鎺掑彛鏁伴噺
+ *
+ * @param rbOutfallCount 鎺掑彛鏁伴噺
+ */
+ public void setRbOutfallCount(Integer rbOutfallCount) {
+ this.rbOutfallCount = rbOutfallCount;
+ }
+
+ /**
+ * 鑾峰彇鎺掑彛浣嶇疆
+ *
+ * @return RB_Outfall_Location - 鎺掑彛浣嶇疆
+ */
+ public String getRbOutfallLocation() {
+ return rbOutfallLocation;
+ }
+
+ /**
+ * 璁剧疆鎺掑彛浣嶇疆
+ *
+ * @param rbOutfallLocation 鎺掑彛浣嶇疆
+ */
+ public void setRbOutfallLocation(String rbOutfallLocation) {
+ this.rbOutfallLocation = rbOutfallLocation == null ? null : rbOutfallLocation.trim();
+ }
+
+ /**
+ * 鑾峰彇鎺掑彛缂栧彿
+ *
+ * @return RB_Outfall_Num - 鎺掑彛缂栧彿
+ */
+ public String getRbOutfallNum() {
+ return rbOutfallNum;
+ }
+
+ /**
+ * 璁剧疆鎺掑彛缂栧彿
+ *
+ * @param rbOutfallNum 鎺掑彛缂栧彿
+ */
+ public void setRbOutfallNum(String rbOutfallNum) {
+ this.rbOutfallNum = rbOutfallNum == null ? null : rbOutfallNum.trim();
+ }
+
+ /**
+ * @return RB_Extension1
+ */
+ public String getRbExtension1() {
+ return rbExtension1;
+ }
+
+ /**
+ * @param rbExtension1
+ */
+ public void setRbExtension1(String rbExtension1) {
+ this.rbExtension1 = rbExtension1 == null ? null : rbExtension1.trim();
+ }
+
+ /**
+ * @return RB_Extension2
+ */
+ public String getRbExtension2() {
+ return rbExtension2;
+ }
+
+ /**
+ * @param rbExtension2
+ */
+ public void setRbExtension2(String rbExtension2) {
+ this.rbExtension2 = rbExtension2 == null ? null : rbExtension2.trim();
+ }
+
+ /**
+ * @return RB_Extension3
+ */
+ public String getRbExtension3() {
+ return rbExtension3;
+ }
+
+ /**
+ * @param rbExtension3
+ */
+ public void setRbExtension3(String rbExtension3) {
+ this.rbExtension3 = rbExtension3 == null ? null : rbExtension3.trim();
+ }
+
+ /**
+ * @return RB_Remark
+ */
+ public String getRbRemark() {
+ return rbRemark;
+ }
+
+ /**
+ * @param rbRemark
+ */
+ public void setRbRemark(String rbRemark) {
+ this.rbRemark = rbRemark == null ? null : rbRemark.trim();
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/UserinfoTZ.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/UserinfoTZ.kt
index 93e050c..c2e91df 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/UserinfoTZ.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/UserinfoTZ.kt
@@ -1,16 +1,20 @@
package cn.flightfeather.supervision.domain.ds2.entity
import com.fasterxml.jackson.annotation.JsonInclude
+import java.util.*
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table
@Table(name = "sm_t_userinfo")
@JsonInclude(JsonInclude.Include.NON_NULL)
-public class UserinfoTZ {
+open class UserinfoTZ {
@Id
@Column(name = "UI_GUID")
var guid: String? = null
+
+ @Column(name = "UI_HeadIconUrl")
+ var headIconUrl: String? = null
@Column(name = "UI_AcountName")
var acountname: String? = null
@@ -36,6 +40,12 @@
@Column(name = "UI_UserType")
var usertype: String? = null
+ @Column(name = "UI_User_SubType_Id")
+ var userSubTypeId: Int? = null
+
+ @Column(name = "UI_User_SubType")
+ var userSubType: String? = null
+
@Column(name = "D_GUID")
var dGuid: String? = null
@@ -54,6 +64,12 @@
@Column(name = "UI_WechatID")
var wechatid: String? = null
+ @Column(name = "UI_Create_Time")
+ var uiCreateTime: Date? = null
+
+ @Column(name = "UI_Login_Time")
+ var uiLoginTime: Date? = null
+
@Column(name = "UI_Extension1")
var extension1: String? = null
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/VehicleBaseInfo.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/VehicleBaseInfo.java
new file mode 100644
index 0000000..3e7e2a1
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/entity/VehicleBaseInfo.java
@@ -0,0 +1,172 @@
+package cn.flightfeather.supervision.domain.ds2.entity;
+
+import cn.flightfeather.supervision.domain.ds1.entity.BaseScene;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Table(name = "ea_t_vehicle_base_info")
+public class VehicleBaseInfo implements BaseScene {
+ @Id
+ @Column(name = "VB_GUID")
+ private String vbGuid;
+
+ /**
+ * 姹借溅缁翠慨缁忚惀璁稿彲璇佺紪鍙�
+ */
+ @Column(name = "VB_Repair_License")
+ private String vbRepairLicense;
+
+ /**
+ * 姹借溅缁翠慨缁忚惀璁稿彲璇佹湁鏁堟湡
+ */
+ @Column(name = "VB_Repair_License_Validity")
+ private String vbRepairLicenseValidity;
+
+ /**
+ * 鐜繚璐熻矗浜�
+ */
+ @Column(name = "VB_Environment_Manager")
+ private String vbEnvironmentManager;
+
+ /**
+ * 鐜繚璐熻矗浜虹數璇�
+ */
+ @Column(name = "VB_Environment_Manager_Tel")
+ private String vbEnvironmentManagerTel;
+
+ /**
+ * 淇溅绫诲瀷
+ */
+ @Column(name = "VB_Repair_Type")
+ private String vbRepairType;
+
+ /**
+ * 缁翠慨璧勮川绾у埆
+ */
+ @Column(name = "VB_Repair_Level")
+ private String vbRepairLevel;
+
+ /**
+ * @return VB_GUID
+ */
+ public String getVbGuid() {
+ return vbGuid;
+ }
+
+ /**
+ * @param vbGuid
+ */
+ public void setVbGuid(String vbGuid) {
+ this.vbGuid = vbGuid == null ? null : vbGuid.trim();
+ }
+
+ /**
+ * 鑾峰彇姹借溅缁翠慨缁忚惀璁稿彲璇佺紪鍙�
+ *
+ * @return VB_Repair_License - 姹借溅缁翠慨缁忚惀璁稿彲璇佺紪鍙�
+ */
+ public String getVbRepairLicense() {
+ return vbRepairLicense;
+ }
+
+ /**
+ * 璁剧疆姹借溅缁翠慨缁忚惀璁稿彲璇佺紪鍙�
+ *
+ * @param vbRepairLicense 姹借溅缁翠慨缁忚惀璁稿彲璇佺紪鍙�
+ */
+ public void setVbRepairLicense(String vbRepairLicense) {
+ this.vbRepairLicense = vbRepairLicense == null ? null : vbRepairLicense.trim();
+ }
+
+ /**
+ * 鑾峰彇姹借溅缁翠慨缁忚惀璁稿彲璇佹湁鏁堟湡
+ *
+ * @return VB_Repair_License_Validity - 姹借溅缁翠慨缁忚惀璁稿彲璇佹湁鏁堟湡
+ */
+ public String getVbRepairLicenseValidity() {
+ return vbRepairLicenseValidity;
+ }
+
+ /**
+ * 璁剧疆姹借溅缁翠慨缁忚惀璁稿彲璇佹湁鏁堟湡
+ *
+ * @param vbRepairLicenseValidity 姹借溅缁翠慨缁忚惀璁稿彲璇佹湁鏁堟湡
+ */
+ public void setVbRepairLicenseValidity(String vbRepairLicenseValidity) {
+ this.vbRepairLicenseValidity = vbRepairLicenseValidity == null ? null : vbRepairLicenseValidity.trim();
+ }
+
+ /**
+ * 鑾峰彇鐜繚璐熻矗浜�
+ *
+ * @return VB_Environment_Manager - 鐜繚璐熻矗浜�
+ */
+ public String getVbEnvironmentManager() {
+ return vbEnvironmentManager;
+ }
+
+ /**
+ * 璁剧疆鐜繚璐熻矗浜�
+ *
+ * @param vbEnvironmentManager 鐜繚璐熻矗浜�
+ */
+ public void setVbEnvironmentManager(String vbEnvironmentManager) {
+ this.vbEnvironmentManager = vbEnvironmentManager == null ? null : vbEnvironmentManager.trim();
+ }
+
+ /**
+ * 鑾峰彇鐜繚璐熻矗浜虹數璇�
+ *
+ * @return VB_Environment_Manager_Tel - 鐜繚璐熻矗浜虹數璇�
+ */
+ public String getVbEnvironmentManagerTel() {
+ return vbEnvironmentManagerTel;
+ }
+
+ /**
+ * 璁剧疆鐜繚璐熻矗浜虹數璇�
+ *
+ * @param vbEnvironmentManagerTel 鐜繚璐熻矗浜虹數璇�
+ */
+ public void setVbEnvironmentManagerTel(String vbEnvironmentManagerTel) {
+ this.vbEnvironmentManagerTel = vbEnvironmentManagerTel == null ? null : vbEnvironmentManagerTel.trim();
+ }
+
+ /**
+ * 鑾峰彇淇溅绫诲瀷
+ *
+ * @return VB_Repair_Type - 淇溅绫诲瀷
+ */
+ public String getVbRepairType() {
+ return vbRepairType;
+ }
+
+ /**
+ * 璁剧疆淇溅绫诲瀷
+ *
+ * @param vbRepairType 淇溅绫诲瀷
+ */
+ public void setVbRepairType(String vbRepairType) {
+ this.vbRepairType = vbRepairType == null ? null : vbRepairType.trim();
+ }
+
+ /**
+ * 鑾峰彇缁翠慨璧勮川绾у埆
+ *
+ * @return VB_Repair_Level - 缁翠慨璧勮川绾у埆
+ */
+ public String getVbRepairLevel() {
+ return vbRepairLevel;
+ }
+
+ /**
+ * 璁剧疆缁翠慨璧勮川绾у埆
+ *
+ * @param vbRepairLevel 缁翠慨璧勮川绾у埆
+ */
+ public void setVbRepairLevel(String vbRepairLevel) {
+ this.vbRepairLevel = vbRepairLevel == null ? null : vbRepairLevel.trim();
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteInfoMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteInfoMapper.kt
new file mode 100644
index 0000000..bfdedfd
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteInfoMapper.kt
@@ -0,0 +1,8 @@
+package cn.flightfeather.supervision.domain.ds2.mapper
+
+import cn.flightfeather.supervision.domain.ds2.entity.DustSiteInfo
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
+
+@Mapper
+interface DustSiteInfoMapper : MyMapper<DustSiteInfo?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteMapMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteMapMapper.kt
new file mode 100644
index 0000000..116a204
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/DustSiteMapMapper.kt
@@ -0,0 +1,8 @@
+package cn.flightfeather.supervision.domain.ds2.mapper
+
+import cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
+
+@Mapper
+interface DustSiteMapMapper : MyMapper<DustSiteMap?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/HourDustDataMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/HourDustDataMapper.kt
new file mode 100644
index 0000000..c9c04b5
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/HourDustDataMapper.kt
@@ -0,0 +1,8 @@
+package cn.flightfeather.supervision.domain.ds2.mapper
+
+import cn.flightfeather.supervision.domain.ds2.entity.HourDustData
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
+
+@Mapper
+interface HourDustDataMapper : MyMapper<HourDustData?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampDeviceDataMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampDeviceDataMapper.kt
new file mode 100644
index 0000000..92577b5
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampDeviceDataMapper.kt
@@ -0,0 +1,8 @@
+package cn.flightfeather.supervision.domain.ds2.mapper
+
+import cn.flightfeather.supervision.domain.ds2.entity.LampDeviceData
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
+
+@Mapper
+interface LampDeviceDataMapper : MyMapper<LampDeviceData?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampEnterBaseInfoMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampEnterBaseInfoMapper.kt
new file mode 100644
index 0000000..fbd5159
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/LampEnterBaseInfoMapper.kt
@@ -0,0 +1,8 @@
+package cn.flightfeather.supervision.domain.ds2.mapper
+
+import cn.flightfeather.supervision.domain.ds2.entity.LampEnterBaseInfo
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
+
+@Mapper
+interface LampEnterBaseInfoMapper : MyMapper<LampEnterBaseInfo?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/RestaurantBaseInfoMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/RestaurantBaseInfoMapper.kt
new file mode 100644
index 0000000..9553c53
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/RestaurantBaseInfoMapper.kt
@@ -0,0 +1,8 @@
+package cn.flightfeather.supervision.domain.ds2.mapper
+
+import cn.flightfeather.supervision.domain.ds2.entity.RestaurantBaseInfo
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
+
+@Mapper
+interface RestaurantBaseInfoMapper : MyMapper<RestaurantBaseInfo>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/VehicleBaseInfoMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/VehicleBaseInfoMapper.kt
new file mode 100644
index 0000000..db023f7
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds2/mapper/VehicleBaseInfoMapper.kt
@@ -0,0 +1,8 @@
+package cn.flightfeather.supervision.domain.ds2.mapper
+
+import cn.flightfeather.supervision.domain.ds2.entity.VehicleBaseInfo
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
+
+@Mapper
+interface VehicleBaseInfoMapper : MyMapper<VehicleBaseInfo?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/entity/FumeDailyAnalysis.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/entity/FumeDailyAnalysis.java
new file mode 100644
index 0000000..7aa59f5
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/entity/FumeDailyAnalysis.java
@@ -0,0 +1,403 @@
+package cn.flightfeather.supervision.domain.ds3.entity;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import javax.persistence.*;
+
+@Table(name = "fm_web_analysis_data")
+public class FumeDailyAnalysis {
+ /**
+ * 璁惧缂栧彿
+ */
+ @Column(name = "fume_dev_id")
+ private String fumeDevId;
+
+ @Column(name = "fume_date")
+ private Date fumeDate;
+
+ /**
+ * 鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ */
+ @Column(name = "fume_day_min")
+ private Double fumeDayMin;
+
+ /**
+ * 鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ */
+ @Column(name = "fume_day_max")
+ private Double fumeDayMax;
+
+ @Column(name = "fume_day_average")
+ private Double fumeDayAverage;
+
+ @Column(name = "purifier_open_rate")
+ private String purifierOpenRate;
+
+ @Column(name = "fume_minute_exceeding_num")
+ private BigDecimal fumeMinuteExceedingNum;
+
+ @Column(name = "fume_over_standard_rate")
+ private String fumeOverStandardRate;
+
+ @Column(name = "fume_data_efficiency")
+ private String fumeDataEfficiency;
+
+ @Column(name = "daily_online_rate")
+ private String dailyOnlineRate;
+
+ @Column(name = "noon_online_rate")
+ private String noonOnlineRate;
+
+ @Column(name = "night_online_rate")
+ private String nightOnlineRate;
+
+ @Column(name = "key_online_rate")
+ private String keyOnlineRate;
+
+ @Column(name = "noon__valid_rate")
+ private String noonValidRate;
+
+ @Column(name = "night__valid_rate")
+ private String nightValidRate;
+
+ @Column(name = "key_valid_rate")
+ private String keyValidRate;
+
+ @Column(name = "noon_opening_count")
+ private String noonOpeningCount;
+
+ @Column(name = "night_opening_count")
+ private String nightOpeningCount;
+
+ @Column(name = "key_opening_rate")
+ private String keyOpeningRate;
+
+ @Column(name = "noon_exceeding_num")
+ private String noonExceedingNum;
+
+ @Column(name = "night_exceeding_num")
+ private String nightExceedingNum;
+
+ @Column(name = "key_exceeding_rate")
+ private String keyExceedingRate;
+
+ /**
+ * 鑾峰彇璁惧缂栧彿
+ *
+ * @return fume_dev_id - 璁惧缂栧彿
+ */
+ public String getFumeDevId() {
+ return fumeDevId;
+ }
+
+ /**
+ * 璁剧疆璁惧缂栧彿
+ *
+ * @param fumeDevId 璁惧缂栧彿
+ */
+ public void setFumeDevId(String fumeDevId) {
+ this.fumeDevId = fumeDevId == null ? null : fumeDevId.trim();
+ }
+
+ /**
+ * @return fume_date
+ */
+ public Date getFumeDate() {
+ return fumeDate;
+ }
+
+ /**
+ * @param fumeDate
+ */
+ public void setFumeDate(Date fumeDate) {
+ this.fumeDate = fumeDate;
+ }
+
+ /**
+ * 鑾峰彇鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ *
+ * @return fume_day_min - 鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ */
+ public Double getFumeDayMin() {
+ return fumeDayMin;
+ }
+
+ /**
+ * 璁剧疆鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ *
+ * @param fumeDayMin 鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ */
+ public void setFumeDayMin(Double fumeDayMin) {
+ this.fumeDayMin = fumeDayMin;
+ }
+
+ /**
+ * 鑾峰彇鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ *
+ * @return fume_day_max - 鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ */
+ public Double getFumeDayMax() {
+ return fumeDayMax;
+ }
+
+ /**
+ * 璁剧疆鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ *
+ * @param fumeDayMax 鎺掔儫娴撳害锛屽崟浣峬g/m^3
+ */
+ public void setFumeDayMax(Double fumeDayMax) {
+ this.fumeDayMax = fumeDayMax;
+ }
+
+ /**
+ * @return fume_day_average
+ */
+ public Double getFumeDayAverage() {
+ return fumeDayAverage;
+ }
+
+ /**
+ * @param fumeDayAverage
+ */
+ public void setFumeDayAverage(Double fumeDayAverage) {
+ this.fumeDayAverage = fumeDayAverage;
+ }
+
+ /**
+ * @return purifier_open_rate
+ */
+ public String getPurifierOpenRate() {
+ return purifierOpenRate;
+ }
+
+ /**
+ * @param purifierOpenRate
+ */
+ public void setPurifierOpenRate(String purifierOpenRate) {
+ this.purifierOpenRate = purifierOpenRate == null ? null : purifierOpenRate.trim();
+ }
+
+ /**
+ * @return fume_minute_exceeding_num
+ */
+ public BigDecimal getFumeMinuteExceedingNum() {
+ return fumeMinuteExceedingNum;
+ }
+
+ /**
+ * @param fumeMinuteExceedingNum
+ */
+ public void setFumeMinuteExceedingNum(BigDecimal fumeMinuteExceedingNum) {
+ this.fumeMinuteExceedingNum = fumeMinuteExceedingNum;
+ }
+
+ /**
+ * @return fume_over_standard_rate
+ */
+ public String getFumeOverStandardRate() {
+ return fumeOverStandardRate;
+ }
+
+ /**
+ * @param fumeOverStandardRate
+ */
+ public void setFumeOverStandardRate(String fumeOverStandardRate) {
+ this.fumeOverStandardRate = fumeOverStandardRate == null ? null : fumeOverStandardRate.trim();
+ }
+
+ /**
+ * @return fume_data_efficiency
+ */
+ public String getFumeDataEfficiency() {
+ return fumeDataEfficiency;
+ }
+
+ /**
+ * @param fumeDataEfficiency
+ */
+ public void setFumeDataEfficiency(String fumeDataEfficiency) {
+ this.fumeDataEfficiency = fumeDataEfficiency == null ? null : fumeDataEfficiency.trim();
+ }
+
+ /**
+ * @return daily_online_rate
+ */
+ public String getDailyOnlineRate() {
+ return dailyOnlineRate;
+ }
+
+ /**
+ * @param dailyOnlineRate
+ */
+ public void setDailyOnlineRate(String dailyOnlineRate) {
+ this.dailyOnlineRate = dailyOnlineRate == null ? null : dailyOnlineRate.trim();
+ }
+
+ /**
+ * @return noon_online_rate
+ */
+ public String getNoonOnlineRate() {
+ return noonOnlineRate;
+ }
+
+ /**
+ * @param noonOnlineRate
+ */
+ public void setNoonOnlineRate(String noonOnlineRate) {
+ this.noonOnlineRate = noonOnlineRate == null ? null : noonOnlineRate.trim();
+ }
+
+ /**
+ * @return night_online_rate
+ */
+ public String getNightOnlineRate() {
+ return nightOnlineRate;
+ }
+
+ /**
+ * @param nightOnlineRate
+ */
+ public void setNightOnlineRate(String nightOnlineRate) {
+ this.nightOnlineRate = nightOnlineRate == null ? null : nightOnlineRate.trim();
+ }
+
+ /**
+ * @return key_online_rate
+ */
+ public String getKeyOnlineRate() {
+ return keyOnlineRate;
+ }
+
+ /**
+ * @param keyOnlineRate
+ */
+ public void setKeyOnlineRate(String keyOnlineRate) {
+ this.keyOnlineRate = keyOnlineRate == null ? null : keyOnlineRate.trim();
+ }
+
+ /**
+ * @return noon__valid_rate
+ */
+ public String getNoonValidRate() {
+ return noonValidRate;
+ }
+
+ /**
+ * @param noonValidRate
+ */
+ public void setNoonValidRate(String noonValidRate) {
+ this.noonValidRate = noonValidRate == null ? null : noonValidRate.trim();
+ }
+
+ /**
+ * @return night__valid_rate
+ */
+ public String getNightValidRate() {
+ return nightValidRate;
+ }
+
+ /**
+ * @param nightValidRate
+ */
+ public void setNightValidRate(String nightValidRate) {
+ this.nightValidRate = nightValidRate == null ? null : nightValidRate.trim();
+ }
+
+ /**
+ * @return key_valid_rate
+ */
+ public String getKeyValidRate() {
+ return keyValidRate;
+ }
+
+ /**
+ * @param keyValidRate
+ */
+ public void setKeyValidRate(String keyValidRate) {
+ this.keyValidRate = keyValidRate == null ? null : keyValidRate.trim();
+ }
+
+ /**
+ * @return noon_opening_count
+ */
+ public String getNoonOpeningCount() {
+ return noonOpeningCount;
+ }
+
+ /**
+ * @param noonOpeningCount
+ */
+ public void setNoonOpeningCount(String noonOpeningCount) {
+ this.noonOpeningCount = noonOpeningCount == null ? null : noonOpeningCount.trim();
+ }
+
+ /**
+ * @return night_opening_count
+ */
+ public String getNightOpeningCount() {
+ return nightOpeningCount;
+ }
+
+ /**
+ * @param nightOpeningCount
+ */
+ public void setNightOpeningCount(String nightOpeningCount) {
+ this.nightOpeningCount = nightOpeningCount == null ? null : nightOpeningCount.trim();
+ }
+
+ /**
+ * @return key_opening_rate
+ */
+ public String getKeyOpeningRate() {
+ return keyOpeningRate;
+ }
+
+ /**
+ * @param keyOpeningRate
+ */
+ public void setKeyOpeningRate(String keyOpeningRate) {
+ this.keyOpeningRate = keyOpeningRate == null ? null : keyOpeningRate.trim();
+ }
+
+ /**
+ * @return noon_exceeding_num
+ */
+ public String getNoonExceedingNum() {
+ return noonExceedingNum;
+ }
+
+ /**
+ * @param noonExceedingNum
+ */
+ public void setNoonExceedingNum(String noonExceedingNum) {
+ this.noonExceedingNum = noonExceedingNum == null ? null : noonExceedingNum.trim();
+ }
+
+ /**
+ * @return night_exceeding_num
+ */
+ public String getNightExceedingNum() {
+ return nightExceedingNum;
+ }
+
+ /**
+ * @param nightExceedingNum
+ */
+ public void setNightExceedingNum(String nightExceedingNum) {
+ this.nightExceedingNum = nightExceedingNum == null ? null : nightExceedingNum.trim();
+ }
+
+ /**
+ * @return key_exceeding_rate
+ */
+ public String getKeyExceedingRate() {
+ return keyExceedingRate;
+ }
+
+ /**
+ * @param keyExceedingRate
+ */
+ public void setKeyExceedingRate(String keyExceedingRate) {
+ this.keyExceedingRate = keyExceedingRate == null ? null : keyExceedingRate.trim();
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/mapper/FumeDailyAnalysisMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/mapper/FumeDailyAnalysisMapper.kt
new file mode 100644
index 0000000..09f4aa7
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/mapper/FumeDailyAnalysisMapper.kt
@@ -0,0 +1,8 @@
+package cn.flightfeather.supervision.domain.ds3.mapper
+
+import cn.flightfeather.supervision.domain.ds3.entity.FumeDailyAnalysis
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
+
+@Mapper
+interface FumeDailyAnalysisMapper : MyMapper<FumeDailyAnalysis?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt
index c647132..7a19ffd 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScenseService.kt
@@ -39,4 +39,6 @@
fun getSceneDetail(sceneId: String):BaseResponse<SceneDetail>
fun updateSceneDetail(typeId: Int, sceneDetailStr: SceneDetailStr): BaseResponse<String>
+
+ fun searchScene(areaVo: AreaVo, page: Int?, perPage: Int?): BaseResponse<List<Scense>>
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt
index d9f1e97..4ff4b70 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/UserinfoService.kt
@@ -3,7 +3,7 @@
import cn.flightfeather.supervision.domain.ds1.entity.Userinfo
interface UserinfoService {
- fun findOne(id: String): Userinfo
+ fun findOne(id: String): Userinfo?
fun findAll(): MutableList<Userinfo>
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt
index 6586836..b73efb9 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/InspectionServiceImpl.kt
@@ -182,12 +182,12 @@
}
//鏍规嵁瀛愪换鍔d鑾峰彇鍗曢」鑰冩牳璇勪及
- val itemevaluation = itemevaluationService.findBySubTaskID(subTaskID)
- if (!itemevaluation.isEmpty()) {
- inspectionVo.itemevaluationList = itemevaluation
- } else {
- inspectionVo.itemevaluationList = mutableListOf()
- }
+// val itemevaluation = itemevaluationService.findBySubTaskID(subTaskID)
+// if (!itemevaluation.isEmpty()) {
+// inspectionVo.itemevaluationList = itemevaluation
+// } else {
+// inspectionVo.itemevaluationList = mutableListOf()
+// }
//杩斿洖
return inspectionVo
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt
index 5af47d9..09bde16 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt
@@ -300,60 +300,88 @@
}
}
- var r = 0
- var isUpdate = true
- when (typeId.toString()) {
- Constant.ScenseType.TYPE1.value -> {
- val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneConstructionSite::class.java)
- if (subScene.getsGuid() != null) {
- val record =sceneConstructionSiteMapper.selectByPrimaryKey(subScene.getsGuid())
- isUpdate = record != null
- r = if (record == null) {
- sceneConstructionSiteMapper.insert(subScene)
- } else {
- sceneConstructionSiteMapper.updateByPrimaryKeySelective(subScene)
+ if (sceneDetailStr.subScene != null) {
+ var r = 0
+ var isUpdate = true
+ when (typeId.toString()) {
+ Constant.ScenseType.TYPE1.value -> {
+ val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneConstructionSite::class.java)
+ if (subScene.getsGuid() != null) {
+ val record = sceneConstructionSiteMapper.selectByPrimaryKey(subScene.getsGuid())
+ isUpdate = record != null
+ r = if (record == null) {
+ sceneConstructionSiteMapper.insert(subScene)
+ } else {
+ sceneConstructionSiteMapper.updateByPrimaryKeySelective(subScene)
+ }
+ }
+ }
+ Constant.ScenseType.TYPE2.value -> {
+ val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneWharf::class.java)
+ if (subScene.getsGuid() != null) {
+ val record = sceneWharfMapper.selectByPrimaryKey(subScene.getsGuid())
+ isUpdate = record != null
+ r = if (record == null) {
+ sceneWharfMapper.insert(subScene)
+ } else {
+ sceneWharfMapper.updateByPrimaryKeySelective(subScene)
+ }
+ }
+ }
+ Constant.ScenseType.TYPE3.value -> {
+ val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneMixingPlant::class.java)
+ if (subScene.getsGuid() != null) {
+ val record = sceneMixingPlantMapper.selectByPrimaryKey(subScene.getsGuid())
+ isUpdate = record != null
+ r = if (record == null) {
+ sceneMixingPlantMapper.insert(subScene)
+ } else {
+ sceneMixingPlantMapper.updateByPrimaryKeySelective(subScene)
+ }
+ }
+ }
+ Constant.ScenseType.TYPE14.value -> {
+ val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneStorageYard::class.java)
+ if (subScene.getsGuid() != null) {
+ val record = sceneStorageYardMapper.selectByPrimaryKey(subScene.getsGuid())
+ isUpdate = record != null
+ r = if (record == null) {
+ sceneStorageYardMapper.insert(subScene)
+ } else {
+ sceneStorageYardMapper.updateByPrimaryKeySelective(subScene)
+ }
}
}
}
- Constant.ScenseType.TYPE2.value -> {
- val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneWharf::class.java)
- if (subScene.getsGuid() != null) {
- val record =sceneWharfMapper.selectByPrimaryKey(subScene.getsGuid())
- isUpdate = record != null
- r = if (record == null) {
- sceneWharfMapper.insert(subScene)
- } else {
- sceneWharfMapper.updateByPrimaryKeySelective(subScene)
- }
- }
- }
- Constant.ScenseType.TYPE3.value -> {
- val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneMixingPlant::class.java)
- if (subScene.getsGuid() != null) {
- val record =sceneMixingPlantMapper.selectByPrimaryKey(subScene.getsGuid())
- isUpdate = record != null
- r = if (record == null) {
- sceneMixingPlantMapper.insert(subScene)
- } else {
- sceneMixingPlantMapper.updateByPrimaryKeySelective(subScene)
- }
- }
- }
- Constant.ScenseType.TYPE14.value -> {
- val subScene = Gson().fromJson(sceneDetailStr.subScene, SceneStorageYard::class.java)
- if (subScene.getsGuid() != null) {
- val record =sceneStorageYardMapper.selectByPrimaryKey(subScene.getsGuid())
- isUpdate = record != null
- r = if (record == null) {
- sceneStorageYardMapper.insert(subScene)
- } else {
- sceneStorageYardMapper.updateByPrimaryKeySelective(subScene)
- }
- }
- }
+ result.append("鍦烘櫙鐗规湁淇℃伅${if (isUpdate) "鏇存柊" else "鏂板"}: $r; ")
}
- result.append("鍦烘櫙鐗规湁淇℃伅${if (isUpdate) "鏇存柊" else "鏂板"}: $r; ")
return BaseResponse(true, data = result.toString())
}
+
+ override fun searchScene(areaVo: AreaVo, page: Int?, perPage: Int?): BaseResponse<List<Scense>> {
+ val p = PageHelper.startPage<Scense>(page ?: 1, perPage ?: 30)
+ val list = scenseMapper.selectByExample(Example(Scense::class.java).apply {
+ createCriteria().apply {
+ areaVo.provincecode?.let { andEqualTo("provincecode", it) }
+ areaVo.citycode?.let { andEqualTo("citycode", it) }
+ areaVo.districtcode?.let { andEqualTo("districtcode", it) }
+ areaVo.towncode?.let { andEqualTo("towncode", it) }
+ areaVo.scensetypeid?.let { andEqualTo("typeid", it) }
+ areaVo.sceneName?.let { andLike("name", "%${it}%") }
+
+ }
+ areaVo.online?.let {
+ and(createCriteria().apply {
+ if (it) {
+ orNotEqualTo("extension1", "0").orIsNull("extension1")
+ } else {
+ andEqualTo("extension1", "0")
+ }
+ })
+ }
+ orderBy("typeid").orderBy("index")
+ })
+ return BaseResponse(true, head = DataHead(p.pageNum, p.pages, p.total), data = list)
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
index d8d8315..1cdc743 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
@@ -79,25 +79,6 @@
)
val dataSource = DataSource(config, dbMapper)
val t = when (mode) {
-// //闂涓庢暣鏀硅窡韪眹鎬昏〃
-// 0 -> ProDetailSummary(dataSource)
-// //鍒嗚闀囬棶棰樻暣鏀瑰垎鏋愭眹鎬昏〃
-// 1 -> ProAnalysisSummary(dataSource)
-//
-// //瑙勮寖鎬ц瘎浼拌鎯呰〃
-// 2 -> ScoreDetailSummary(dataSource)
-// //鍒嗚闀囪鑼冩�у垎鏋愯〃
-// 3 -> ScoreAnalysisSummary(dataSource)
-//
-// //闂涓庢暣鏀瑰垎绫荤粺璁¤〃
-// 4 -> ProTypeDetailSummary(dataSource)
-// //闂涓庢暣鏀瑰垎绫绘帓鍚�
-// 5 -> ProTypeRankSummary(dataSource)
-// //鏈堝害涓昏鎴栧吀鍨嬮棶棰樺垎鏋愯〃
-// 6 -> ProTypeRankMainSummary(dataSource)
-// //宸ュ湴鏂藉伐闃舵闂鍒嗙被鍒嗘瀽琛�
-// 7 -> ProTypeStatusSummary(dataSource)
-
8 -> ReportOne(dataSource)
9 -> ReportTwo(dataSource)
10 -> ReportThree(dataSource)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
index 78b73e7..1cebbb9 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.service.impl
+import cn.flightfeather.supervision.business.storage.JinAnScore
import cn.flightfeather.supervision.business.storage.StAutoScore
import cn.flightfeather.supervision.business.storage.item.*
import cn.flightfeather.supervision.domain.ds1.entity.*
@@ -18,6 +19,7 @@
import tk.mybatis.mapper.entity.Example
import tk.mybatis.mapper.util.StringUtil
import java.util.*
+import kotlin.math.ceil
@Service
class SubtaskServiceImpl(
@@ -27,6 +29,7 @@
private val stScoreItem_1: StScoreItem_1,
private val whScoreItem_1: WhScoreItem_1,
private val whScoreItem_2: WhScoreItem_2,
+ private val jinAnScore: JinAnScore,
) : SubtaskService {
val dateUtil = DateUtil()
@@ -486,7 +489,8 @@
// autoScore.calculateScore()
// }
val s = scenseMapper.selectByPrimaryKey(subtask.scenseid)
- val autoScore = StAutoScore(scoreItem1, scoreItem2, mpScoreItem_1, mpScoreItem_2, stScoreItem_1, whScoreItem_1, whScoreItem_2)
+ val autoScore = StAutoScore(scoreItem1, scoreItem2, mpScoreItem_1, mpScoreItem_2, stScoreItem_1,
+ whScoreItem_1, whScoreItem_2, jinAnScore)
autoScore.sceneType = Constant.ScenseType.getByValue(s.typeid?.toString())
autoScore.sceneGrade(subtask)
}
@@ -542,7 +546,7 @@
}
}
- val tempResult = BaseSearchResultVo()
+ val result = BaseSearchResultVo()
val _sceneType = sceneType ?: 1
val _districtCode = "310106"
@@ -570,97 +574,126 @@
}
}
- val example = Example(Subtask::class.java).apply {
- createCriteria().andEqualTo("districtcode", _districtCode)
- .andGreaterThanOrEqualTo("planstarttime", _startTime)
- .andLessThanOrEqualTo("planendtime", _endTime)
- }
-
- var counts = 0
-
-
-// val offset = (perPage ?: 30).times((page ?: 1).minus(1))
-// PageHelper.offsetPage<Subtask>(offset, perPage ?: 30)
-
- subtaskMapper.selectByExample(example).forEach { s ->
-
- val scene = scenseMapper.selectByPrimaryKey(s.scenseid)
- val inspection = inspectionMapper.selectByExample(Example(Inspection::class.java).apply {
- createCriteria().andEqualTo("stguid", s.stguid)
- }).takeIf { it.isNotEmpty() }?.get(0)
- val evaluation = evaluationMapper.selectByExample(Example(Evaluation::class.java).apply {
- createCriteria().andEqualTo("stguid", s.stguid)
- }).takeIf { it.isNotEmpty() }?.get(0)
-
- if (scene.typeid != _sceneType.toByte()) {
- return@forEach
+ val subtaskMap = mutableMapOf<String?, SubtaskSearchResultVo>()
+ val problemMap = mutableMapOf<String?, ProblemDetail>()
+// val p = PageHelper.startPage<Subtask>(page ?: 1, perPage ?: 30)
+ subtaskMapper.getSubtask2(null, null, _districtCode, _sceneType.toByte(), _startTime, _endTime).forEach {
+ if (!subtaskMap.containsKey(it.subTaskId)) {
+ val vo =SubtaskSearchResultVo()
+ BeanUtils.copyProperties(it, vo)
+ subtaskMap[it.subTaskId] = vo
+ }
+ if (!problemMap.containsKey(it.problemId)) {
+ val problemDetail = ProblemDetail()
+ BeanUtils.copyProperties(it, problemDetail)
+ problemMap[it.problemId] = problemDetail
+ subtaskMap[it.subTaskId]?.problemList?.add(problemDetail)
+ }
+ val url = it.mExtension1 + it.mGuid+ ".jpg"
+ if (it.isChanged == true) {
+ problemMap[it.problemId]?.rectificationPics?.add(url)
} else {
- counts++
- }
-
-
- val subtaskSearchResultVo = SubtaskSearchResultVo().apply {
- this.districtName = scene.districtname
- this.townName = scene.townname
- this.sceneName = scene.name
- this.sceneAddress = scene.location
- this.planStartTime = s.planstarttime
- this.planEndTime = s.planendtime
- this.status = s.status
- this.path= inspection?.extension1
- this.score = evaluation?.resultscorebef?.toIntOrNull()
- this.level = when {
- score == null -> null
- score!! >= 54 -> "鍚堟牸"
- else -> "涓嶅悎鏍�"
- }
- }
- tempResult.data.add(subtaskSearchResultVo)
-
- problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
- createCriteria().andEqualTo("stguid", s.stguid)
- }).forEach { p ->
- val problem = ProblemDetail().apply {
- this.problemName = p.problemname
- this.longitude = p.longitude?.toDouble()
- this.latitude = p.latitude?.toDouble()
- this.location = p.location
- this.rectification = p.ischanged
- this.rectificationTime = p.changedtime
- }
- subtaskSearchResultVo.problemList.add(problem)
-
- mediafileMapper.selectByExample(Example(Mediafile::class.java).apply {
- createCriteria().andEqualTo("businessguid", p.guid)
- }).forEach { m ->
- val url = m.extension1 + m.guid + ".jpg"
- if (m.ischanged == true) {
- problem.rectificationPics.add(url)
- } else {
- problem.problemPics.add(url)
- }
- }
+ problemMap[it.problemId]?.problemPics?.add(url)
}
}
- val totalPage = Math.ceil(counts.toDouble() / (perPage ?: 30).toDouble()).toInt()
-
- val result = BaseSearchResultVo()
-
+ val totalPage = ceil(subtaskMap.size.toDouble() / (perPage ?: 30).toDouble()).toInt()
result.head = DataHead().apply {
this.page = page ?: 1
this.totalPage = totalPage
+ this.totalCount = subtaskMap.size.toLong()
}
-
- val firstIndex = 0 + ((page ?: 1) - 1).times(perPage ?: 30)
- val lastIndex = firstIndex + (perPage ?: 30) - 1
-
- for (i in firstIndex until tempResult.data.size) {
- if (i > lastIndex) {
- break
+ var count = 0
+ val startIndex = ((page ?: 1) - 1) * (perPage ?: 30)
+ val endIndex = startIndex + (perPage ?: 30) - 1
+ with(subtaskMap) exit@{
+ subtaskMap.forEach {
+ if (count in startIndex..endIndex) {
+ result.data.add(it.value)
+ }
+ count++
+ if (count > endIndex) return@exit
}
- result.data.add(tempResult.data[i])
}
+
+
+// val example = Example(Subtask::class.java).apply {
+// createCriteria().andEqualTo("districtcode", _districtCode)
+// .andGreaterThanOrEqualTo("planstarttime", _startTime)
+// .andLessThanOrEqualTo("planendtime", _endTime)
+// }
+//
+// var counts = 0
+//
+// val p = PageHelper.startPage<Subtask>(page ?: 1, perPage ?: 30)
+//
+// subtaskMapper.selectByExample(example).forEach { s ->
+//
+// val scene = scenseMapper.selectByPrimaryKey(s.scenseid)
+// val inspection = inspectionMapper.selectByExample(Example(Inspection::class.java).apply {
+// createCriteria().andEqualTo("stguid", s.stguid)
+// }).takeIf { it.isNotEmpty() }?.get(0)
+// val evaluation = evaluationMapper.selectByExample(Example(Evaluation::class.java).apply {
+// createCriteria().andEqualTo("stguid", s.stguid)
+// }).takeIf { it.isNotEmpty() }?.get(0)
+//
+// if (scene.typeid != _sceneType.toByte()) {
+// return@forEach
+// } else {
+// counts++
+// }
+//
+//
+// val subtaskSearchResultVo = SubtaskSearchResultVo().apply {
+// this.subTaskId = s.stguid
+// this.districtName = scene.districtname
+// this.townName = scene.townname
+// this.sceneName = scene.name
+// this.sceneAddress = scene.location
+// this.planStartTime = s.planstarttime
+// this.planEndTime = s.planendtime
+// this.status = s.status
+// this.path= inspection?.extension1
+// this.score = evaluation?.resultscorebef?.toIntOrNull()
+// this.level = when {
+// score == null -> null
+// score!! >= 54 -> "鍚堟牸"
+// else -> "涓嶅悎鏍�"
+// }
+// }
+// tempResult.data.add(subtaskSearchResultVo)
+//
+// problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
+// createCriteria().andEqualTo("stguid", s.stguid)
+// }).forEach { p ->
+// val problem = ProblemDetail().apply {
+// this.problemId = p.guid
+// this.problemName = p.problemname
+// this.longitude = p.longitude?.toDouble()
+// this.latitude = p.latitude?.toDouble()
+// this.location = p.location
+// this.rectification = p.ischanged
+// this.rectificationTime = p.changedtime
+// }
+// subtaskSearchResultVo.problemList.add(problem)
+//
+// mediafileMapper.selectByExample(Example(Mediafile::class.java).apply {
+// createCriteria().andEqualTo("businessguid", p.guid)
+// }).forEach { m ->
+// val url = m.extension1 + m.guid + ".jpg"
+// if (m.ischanged == true) {
+// problem.rectificationPics.add(url)
+// } else {
+// problem.problemPics.add(url)
+// }
+// }
+// }
+// }
+//
+// tempResult.head = DataHead().apply {
+// this.page = p.pageNum
+// this.totalPage = p.pages
+// }
return result
}
@@ -768,6 +801,7 @@
result.head = DataHead().apply {
this.page = p.pageNum
this.totalPage = p.pages
+ this.totalCount = p.total
}
subtasklist.forEach {
@@ -781,6 +815,7 @@
}
val subtaskMap = mutableMapOf<String?, SubtaskSearchResultVo>()
val problemMap = mutableMapOf<String?, ProblemDetail>()
+// val p = PageHelper.startPage<Subtask>(page ?: 1, perPage ?: 30)
subtaskMapper.getSubtask2(time, time2, _districtCode, _sceneType?.toByte(), null, null).forEach {
if (!subtaskMap.containsKey(it.subTaskId)) {
val vo =SubtaskSearchResultVo()
@@ -803,6 +838,7 @@
result.head = DataHead().apply {
this.page = 1
this.totalPage = 1
+ this.totalCount = subtaskMap.size.toLong()
}
subtaskMap.forEach {
result.data.add(it.value)
@@ -921,6 +957,7 @@
result.head = DataHead().apply {
this.page = p.pageNum
this.totalPage = p.pages
+ this.totalCount = p.total
}
subtasklist.forEach {
@@ -934,6 +971,7 @@
}
val subtaskMap = mutableMapOf<String?, SubtaskSearchResultVo>()
val problemMap = mutableMapOf<String?, ProblemDetail>()
+// val p = PageHelper.startPage<Subtask>(page ?: 1, perPage ?: 30)
subtaskMapper.getSubtask2(time, time2, _districtCode, _sceneType?.toByte(), null, null).forEach {
if (!subtaskMap.containsKey(it.subTaskId)) {
val vo =SubtaskSearchResultVo()
@@ -956,6 +994,7 @@
result.head = DataHead().apply {
this.page = 1
this.totalPage = 1
+ this.totalCount = subtaskMap.size.toLong()
}
subtaskMap.forEach {
result.data.add(it.value)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
index 022941c..e80a61c 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/TaskServiceImpl.kt
@@ -222,7 +222,7 @@
// example.or(
example.createCriteria().andIsNull("tsguid")
.andEqualTo("districtcode", districtCode)
- .andLessThan("starttime", date)
+ .andLessThanOrEqualTo("starttime", date)
.andGreaterThanOrEqualTo("endtime", date)
// )
example.orderBy("starttime").desc()
@@ -506,7 +506,7 @@
val criteria = example.createCriteria()
//鑾峰彇鐢ㄦ埛淇℃伅
val userInfo = userinfoMapper.findOne(guid)
- val districtCode = userInfo.dGuid
+ val districtCode = userInfo?.dGuid
//娣诲姞鏃ユ湡杩囨护
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt
index 7459669..a15ee33 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt
@@ -38,7 +38,7 @@
return result
}
- override fun findOne(id: String): Userinfo = userinfoMapper.selectByPrimaryKey(id)
+ override fun findOne(id: String): Userinfo? = userinfoMapper.selectByPrimaryKey(id)
override fun findAll(): MutableList<Userinfo> = userinfoMapper.selectAll()
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AreaVo.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AreaVo.kt
index 7e8025e..feb7ec6 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AreaVo.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AreaVo.kt
@@ -25,9 +25,14 @@
var endtime: String? = null
+ var sceneName: String? = null
+
var scensetypeid: String? = null
var notstandardnum: Int = 0
var allsensenum: Int = 0
+
+ //鏄惁涓婄嚎
+ var online: Boolean? = null
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt
index 3f7dc2e..9dea88e 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt
@@ -14,7 +14,8 @@
data class DataHead(
var page: Int = 1,
- var totalPage: Int = 1
+ var totalPage: Int = 1,
+ var totalCount:Long = 0
)
open class DataContent{
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
index f367981..c1415b5 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.entity.Task
import cn.flightfeather.supervision.lightshare.service.ScenseService
+import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.BaseResponse
import cn.flightfeather.supervision.lightshare.vo.SceneDetailStr
import io.swagger.annotations.Api
@@ -73,4 +74,11 @@
@RequestBody sceneDetailStr: SceneDetailStr
) = scenseService.updateSceneDetail(typeId, sceneDetailStr)
+ @PostMapping("/find")
+ fun searchScene(
+ @RequestBody areaVo: AreaVo,
+ @RequestParam("page", required = false) page: Int?,
+ @RequestParam("per_page", required = false) perPage: Int?
+ ) = scenseService.searchScene(areaVo, page, perPage)
+
}
\ No newline at end of file
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index b61c152..cf2f525 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -14,19 +14,19 @@
# password: cn.FLIGHTFEATHER
#-杩滅▼娴嬭瘯鏈嶅姟鍣�-
-# url: jdbc:mysql://47.100.191.150:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
-# username: remoteU1
-# password: eSoF8DnzfGTlhAjE
+ url: jdbc:mysql://47.100.191.150:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+ username: remoteU1
+ password: eSoF8DnzfGTlhAjE
#-鍙戝竷鏈嶅姟鍣�-
- url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
- username: supervision
- password: supervision_feiyu2021
+# url: jdbc:mysql://localhost:3306/supervision?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+# username: supervision
+# password: supervision_feiyu2021
#-鐜鐫e療娴嬭瘯鏈嶅姟鍣�-
- # url: jdbc:mysql://192.168.0.200:3306/supervision_ii?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
- # username: root
- # password: cn.FLIGHTFEATHER
+# url: jdbc:mysql://192.168.0.200:3306/supervision_ii?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+# username: root
+# password: cn.FLIGHTFEATHER
initialSize: 5
minIdle: 5
@@ -45,15 +45,6 @@
ds2:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
- #-Test-
- # url: jdbc:mysql://192.168.0.200:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
- # username: root
- # password: cn.FLIGHTFEATHER
-
- # url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
- # username: root
- # password: 123456
- #-TestEnd-
#-鍙戝竷鏈嶅姟鍣�-
# url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
@@ -80,6 +71,15 @@
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true
+ ds3:
+ type: com.alibaba.druid.pool.DruidDataSource
+ driver-class-name: com.mysql.jdbc.Driver
+
+ # 杩滅▼鏈嶅姟鍣�
+ url: jdbc:mysql://114.215.109.124:3306/fume?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
+ username: fumeRemote
+ password: feiyu2023
+
#thymeleaf璁剧疆涓嶇紦瀛�
thymeleaf:
cache: false
diff --git a/src/main/resources/generator/generatorConfig4ds1.xml b/src/main/resources/generator/generatorConfig4ds1.xml
index 5165dbe..ab95faf 100644
--- a/src/main/resources/generator/generatorConfig4ds1.xml
+++ b/src/main/resources/generator/generatorConfig4ds1.xml
@@ -4,7 +4,8 @@
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 鏁版嵁搴撻┍鍔�:閫夋嫨浣犵殑鏈湴纭洏涓婇潰鐨勬暟鎹簱椹卞姩鍖�-->
- <classPathEntry location="C:\Users\feiyu\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>
+<!-- <classPathEntry location="C:\Users\feiyu\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>-->
+ <classPathEntry location="C:\Users\feiyu02\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat">
<!-- TKmybatis閰嶇疆 -->
<property name="javaFileEncoding" value="UTF-8"/>
diff --git a/src/main/resources/generator/generatorConfig4ds3.xml b/src/main/resources/generator/generatorConfig4ds3.xml
new file mode 100644
index 0000000..62b3f23
--- /dev/null
+++ b/src/main/resources/generator/generatorConfig4ds3.xml
@@ -0,0 +1,50 @@
+<!--<?xml version="1.0" encoding="UTF-8"?>-->
+<!DOCTYPE generatorConfiguration
+ PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
+ "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
+<generatorConfiguration>
+ <!-- 鏁版嵁搴撻┍鍔�:閫夋嫨浣犵殑鏈湴纭洏涓婇潰鐨勬暟鎹簱椹卞姩鍖�-->
+<!-- <classPathEntry location="C:\Users\feiyu\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>-->
+ <classPathEntry location="C:\Users\feiyu02\.m2\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar"/>
+ <context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat">
+ <!-- TKmybatis閰嶇疆 -->
+ <property name="javaFileEncoding" value="UTF-8"/>
+ <property name="beginningDelimiter" value="`"/>
+ <property name="endingDelimiter" value="`"/>
+ <plugin type="${mapper.plugin}">
+ <property name="mappers" value="${mapper.Mapper}"/>
+ </plugin>
+ <commentGenerator>
+ <property name="suppressDate" value="true"/>
+ <!-- 鏄惁鍘婚櫎鑷姩鐢熸垚鐨勬敞閲� true锛氭槸 锛� false:鍚� -->
+ <property name="suppressAllComments" value="true"/>
+ </commentGenerator>
+ <!--鏁版嵁搴撻摼鎺RL锛岀敤鎴峰悕銆佸瘑鐮� -->
+ <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://114.215.109.124:3306/fume?serverTimezone=Asia/Shanghai"
+ userId="fumeRemote"
+ password="feiyu2023">
+ </jdbcConnection>
+ <javaTypeResolver>
+ <property name="forceBigDecimals" value="false"/>
+ </javaTypeResolver>
+ <!-- 鐢熸垚妯″瀷鐨勫寘鍚嶅拰浣嶇疆-->
+ <javaModelGenerator targetPackage="cn.flightfeather.supervision.domain.ds3.entity"
+ targetProject="src/main/kotlin">
+ <property name="enableSubPackages" value="true"/>
+ <property name="trimStrings" value="true"/>
+ </javaModelGenerator>
+ <!-- 鐢熸垚鏄犲皠鏂囦欢鐨勫寘鍚嶅拰浣嶇疆-->
+ <sqlMapGenerator targetPackage="ds3" targetProject="src/main/resources/mapper">
+ <property name="enableSubPackages" value="true"/>
+ </sqlMapGenerator>
+ <!-- 鐢熸垚DAO鐨勫寘鍚嶅拰浣嶇疆-->
+ <javaClientGenerator type="XMLMAPPER" targetPackage="cn.flightfeather.supervision.domain.ds3.mapper"
+ targetProject="src/main/kotlin">
+ <property name="enableSubPackages" value="true"/>
+ </javaClientGenerator>
+ <!-- 瑕佺敓鎴愮殑琛� tableName鏄暟鎹簱涓殑琛ㄥ悕鎴栬鍥惧悕 domainObjectName鏄疄浣撶被鍚�-->
+ <table tableName="fm_web_analysis_data" domainObjectName="FumeDailyAnalysis" enableCountByExample="false"
+ enableUpdateByExample="false" enableDeleteByExample="false"
+ enableSelectByExample="false" selectByExampleQueryId="false"/>
+ </context>
+</generatorConfiguration>
\ No newline at end of file
diff --git a/src/main/resources/mapper/ds1/DustDataResultMapper.xml b/src/main/resources/mapper/ds1/DustDataResultMapper.xml
index d96848f..a48cfd7 100644
--- a/src/main/resources/mapper/ds1/DustDataResultMapper.xml
+++ b/src/main/resources/mapper/ds1/DustDataResultMapper.xml
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper" >
- <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DustDataResult" >
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper">
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.DustDataResult">
<!--
WARNING - @mbg.generated
-->
- <id column="DR_Id" property="drId" jdbcType="INTEGER" />
- <result column="DR_Scene_Id" property="drSceneId" jdbcType="VARCHAR" />
- <result column="DR_Scene_Name" property="drSceneName" jdbcType="VARCHAR" />
- <result column="DR_Time" property="drTime" jdbcType="DATE" />
- <result column="DR_Exceed_Times" property="drExceedTimes" jdbcType="INTEGER" />
- <result column="DR_Avg" property="drAvg" jdbcType="DOUBLE" />
- <result column="DR_Max" property="drMax" jdbcType="DOUBLE" />
- <result column="DR_Min" property="drMin" jdbcType="DOUBLE" />
- <result column="DR_Over_Avg_Per" property="drOverAvgPer" jdbcType="DOUBLE" />
- <result column="DR_Data_Num" property="drDataNum" jdbcType="INTEGER" />
- <result column="DR_Effective_Rate" property="drEffectiveRate" jdbcType="DOUBLE" />
+ <id column="DR_Id" jdbcType="INTEGER" property="drId" />
+ <result column="DR_Scene_Id" jdbcType="VARCHAR" property="drSceneId" />
+ <result column="DR_Scene_Name" jdbcType="VARCHAR" property="drSceneName" />
+ <result column="DR_Time" jdbcType="DATE" property="drTime" />
+ <result column="DR_Exceed_Times" jdbcType="INTEGER" property="drExceedTimes" />
+ <result column="DR_Avg" jdbcType="DOUBLE" property="drAvg" />
+ <result column="DR_Max" jdbcType="DOUBLE" property="drMax" />
+ <result column="DR_Min" jdbcType="DOUBLE" property="drMin" />
+ <result column="DR_Over_Avg_Per" jdbcType="DOUBLE" property="drOverAvgPer" />
+ <result column="DR_Data_Num" jdbcType="INTEGER" property="drDataNum" />
+ <result column="DR_Effective_Rate" jdbcType="DOUBLE" property="drEffectiveRate" />
</resultMap>
- <sql id="Base_Column_List" >
+ <sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
diff --git a/src/main/resources/mapper/ds1/SubtaskMapper.xml b/src/main/resources/mapper/ds1/SubtaskMapper.xml
index 037dd56..1df171d 100644
--- a/src/main/resources/mapper/ds1/SubtaskMapper.xml
+++ b/src/main/resources/mapper/ds1/SubtaskMapper.xml
@@ -240,10 +240,10 @@
LEFT JOIN sm_t_problemtype AS f ON d.PT_GUID = f.PT_GUID
RIGHT JOIN im_t_mediafile AS e ON d.PL_GUID = e.MF_BusinessGUID
WHERE
+ a.ST_DistrictCode = #{param3}
<if test="param1 != null">
- ((d.PL_ChangedTime is not null and d.PL_ChangedTime > #{param1}) OR d.PL_Time > #{param2})
+ AND ((d.PL_ChangedTime is not null and d.PL_ChangedTime > #{param1}) OR d.PL_Time > #{param2})
</if>
- AND a.ST_DistrictCode = #{param3}
<if test="param4 != null">
AND b.S_TypeID = #{param4}
</if>
diff --git a/src/main/resources/mapper/ds2/DustSiteInfoMapper.xml b/src/main/resources/mapper/ds2/DustSiteInfoMapper.xml
new file mode 100644
index 0000000..0f6766f
--- /dev/null
+++ b/src/main/resources/mapper/ds2/DustSiteInfoMapper.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.DustSiteInfoMapper" >
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.DustSiteInfo" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ <id column="id" property="id" jdbcType="VARCHAR" />
+ <result column="address" property="address" jdbcType="VARCHAR" />
+ <result column="begin_date" property="beginDate" jdbcType="TIMESTAMP" />
+ <result column="build_area" property="buildArea" jdbcType="VARCHAR" />
+ <result column="data_time" property="dataTime" jdbcType="TIMESTAMP" />
+ <result column="clean_measure" property="cleanMeasure" jdbcType="VARCHAR" />
+ <result column="code" property="code" jdbcType="VARCHAR" />
+ <result column="construction_unit" property="constructionUnit" jdbcType="VARCHAR" />
+ <result column="control_level" property="controlLevel" jdbcType="VARCHAR" />
+ <result column="developers" property="developers" jdbcType="VARCHAR" />
+ <result column="do_time" property="doTime" jdbcType="TIMESTAMP" />
+ <result column="duty_company" property="dutyCompany" jdbcType="VARCHAR" />
+ <result column="duty_company_id" property="dutyCompanyId" jdbcType="VARCHAR" />
+ <result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
+ <result column="engineering_stage" property="engineeringStage" jdbcType="VARCHAR" />
+ <result column="engineering_stage_code" property="engineeringStageCode" jdbcType="VARCHAR" />
+ <result column="equipment_code" property="equipmentCode" jdbcType="VARCHAR" />
+ <result column="floor_area" property="floorArea" jdbcType="VARCHAR" />
+ <result column="group_id" property="groupId" jdbcType="VARCHAR" />
+ <result column="group_name" property="groupName" jdbcType="VARCHAR" />
+ <result column="has_monitor" property="hasMonitor" jdbcType="VARCHAR" />
+ <result column="is_online" property="isOnline" jdbcType="VARCHAR" />
+ <result column="is_trouble" property="isTrouble" jdbcType="VARCHAR" />
+ <result column="jhpt_delete" property="jhptDelete" jdbcType="VARCHAR" />
+ <result column="jhpt_update_time" property="jhptUpdateTime" jdbcType="VARCHAR" />
+ <result column="kindex" property="kindex" jdbcType="VARCHAR" />
+ <result column="latitude" property="latitude" jdbcType="VARCHAR" />
+ <result column="linkman" property="linkman" jdbcType="VARCHAR" />
+ <result column="longitude" property="longitude" jdbcType="VARCHAR" />
+ <result column="mn_code" property="mnCode" jdbcType="VARCHAR" />
+ <result column="name" property="name" jdbcType="VARCHAR" />
+ <result column="noise_region" property="noiseRegion" jdbcType="VARCHAR" />
+ <result column="phone" property="phone" jdbcType="VARCHAR" />
+ <result column="province" property="province" jdbcType="VARCHAR" />
+ <result column="responsible" property="responsible" jdbcType="VARCHAR" />
+ <result column="ring_id" property="ringId" jdbcType="VARCHAR" />
+ <result column="stage_begin_date" property="stageBeginDate" jdbcType="TIMESTAMP" />
+ <result column="stop_time" property="stopTime" jdbcType="TIMESTAMP" />
+ <result column="tsp" property="tsp" jdbcType="DOUBLE" />
+ <result column="type_id" property="typeId" jdbcType="VARCHAR" />
+ <result column="typename" property="typename" jdbcType="VARCHAR" />
+ <result column="union_type_id" property="unionTypeId" jdbcType="VARCHAR" />
+ <result column="wall_height" property="wallHeight" jdbcType="VARCHAR" />
+ <result column="ywsj_date" property="ywsjDate" jdbcType="TIMESTAMP" />
+ </resultMap>
+ <sql id="Base_Column_List" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ id, address, begin_date, build_area, data_time, clean_measure, code, construction_unit,
+ control_level, developers, do_time, duty_company, duty_company_id, end_date, engineering_stage,
+ engineering_stage_code, equipment_code, floor_area, group_id, group_name, has_monitor,
+ is_online, is_trouble, jhpt_delete, jhpt_update_time, kindex, latitude, linkman,
+ longitude, mn_code, name, noise_region, phone, province, responsible, ring_id, stage_begin_date,
+ stop_time, tsp, type_id, typename, union_type_id, wall_height, ywsj_date
+ </sql>
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/ds2/DustSiteMapMapper.xml b/src/main/resources/mapper/ds2/DustSiteMapMapper.xml
new file mode 100644
index 0000000..d8ff577
--- /dev/null
+++ b/src/main/resources/mapper/ds2/DustSiteMapMapper.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.DustSiteMapMapper">
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap">
+ <!--
+ WARNING - @mbg.generated
+ -->
+ <id column="Id" jdbcType="INTEGER" property="id" />
+ <result column="TZ_User_Id" jdbcType="VARCHAR" property="tzUserId" />
+ <result column="TZ_User_Name" jdbcType="VARCHAR" property="tzUserName" />
+ <result column="JA_MN_Code" jdbcType="VARCHAR" property="jaMnCode" />
+ <result column="JA_Scene_Name" jdbcType="VARCHAR" property="jaSceneName" />
+ <result column="SV_User_Id" jdbcType="VARCHAR" property="svUserId" />
+ <result column="SV_User_name" jdbcType="VARCHAR" property="svUserName" />
+ <result column="Create_Time" jdbcType="TIMESTAMP" property="createTime" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--
+ WARNING - @mbg.generated
+ -->
+ Id, TZ_User_Id, TZ_User_Name, JA_MN_Code, JA_Scene_Name, SV_User_Id, SV_User_name,
+ Create_Time
+ </sql>
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/ds2/HourDustDataMapper.xml b/src/main/resources/mapper/ds2/HourDustDataMapper.xml
new file mode 100644
index 0000000..2faa286
--- /dev/null
+++ b/src/main/resources/mapper/ds2/HourDustDataMapper.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.HourDustDataMapper" >
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.HourDustData" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ <id column="id" property="id" jdbcType="VARCHAR" />
+ <result column="dustvalue" property="dustvalue" jdbcType="DOUBLE" />
+ <result column="flag" property="flag" jdbcType="VARCHAR" />
+ <result column="grade" property="grade" jdbcType="VARCHAR" />
+ <result column="groupname" property="groupname" jdbcType="VARCHAR" />
+ <result column="inserttime" property="inserttime" jdbcType="TIMESTAMP" />
+ <result column="lst" property="lst" jdbcType="TIMESTAMP" />
+ <result column="lst_end" property="lstEnd" jdbcType="TIMESTAMP" />
+ <result column="mncode" property="mncode" jdbcType="VARCHAR" />
+ <result column="name" property="name" jdbcType="VARCHAR" />
+ <result column="noisevalue" property="noisevalue" jdbcType="VARCHAR" />
+ <result column="projectid" property="projectid" jdbcType="VARCHAR" />
+ <result column="projecttypeid" property="projecttypeid" jdbcType="VARCHAR" />
+ <result column="quality" property="quality" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Base_Column_List" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ id, dustvalue, flag, grade, groupname, inserttime, lst, lst_end, mncode, name, noisevalue,
+ projectid, projecttypeid, quality
+ </sql>
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/ds2/LampDeviceDataMapper.xml b/src/main/resources/mapper/ds2/LampDeviceDataMapper.xml
new file mode 100644
index 0000000..0c70376
--- /dev/null
+++ b/src/main/resources/mapper/ds2/LampDeviceDataMapper.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.LampDeviceDataMapper" >
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.LampDeviceData" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ <id column="id" property="id" jdbcType="INTEGER" />
+ <result column="channel_num" property="channelNum" jdbcType="VARCHAR" />
+ <result column="clean_liness" property="cleanLiness" jdbcType="VARCHAR" />
+ <result column="device_code" property="deviceCode" jdbcType="VARCHAR" />
+ <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
+ <result column="device_state" property="deviceState" jdbcType="VARCHAR" />
+ <result column="enter_id" property="enterId" jdbcType="VARCHAR" />
+ <result column="fan_state" property="fanState" jdbcType="VARCHAR" />
+ <result column="lampblack_value" property="lampblackValue" jdbcType="DOUBLE" />
+ <result column="monitor_time" property="monitorTime" jdbcType="TIMESTAMP" />
+ <result column="production_date" property="productionDate" jdbcType="TIMESTAMP" />
+ <result column="purifier_state" property="purifierState" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Base_Column_List" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ id, channel_num, clean_liness, device_code, device_name, device_state, enter_id,
+ fan_state, lampblack_value, monitor_time, production_date, purifier_state
+ </sql>
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/ds2/LampEnterBaseInfoMapper.xml b/src/main/resources/mapper/ds2/LampEnterBaseInfoMapper.xml
new file mode 100644
index 0000000..cee7f14
--- /dev/null
+++ b/src/main/resources/mapper/ds2/LampEnterBaseInfoMapper.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="cn.flightfeather.supervision.domain.ds2.mapper.LampEnterBaseInfoMapper" >
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds2.entity.LampEnterBaseInfo" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ <id column="enter_id" property="enterId" jdbcType="VARCHAR" />
+ <result column="enter_name" property="enterName" jdbcType="VARCHAR" />
+ <result column="address" property="address" jdbcType="VARCHAR" />
+ <result column="business_date" property="businessDate" jdbcType="VARCHAR" />
+ <result column="datasource" property="datasource" jdbcType="VARCHAR" />
+ <result column="jjq_code" property="jjqCode" jdbcType="VARCHAR" />
+ <result column="jjq_name" property="jjqName" jdbcType="VARCHAR" />
+ <result column="latitude" property="latitude" jdbcType="DOUBLE" />
+ <result column="link_man" property="linkMan" jdbcType="VARCHAR" />
+ <result column="link_phone" property="linkPhone" jdbcType="VARCHAR" />
+ <result column="longitude" property="longitude" jdbcType="DOUBLE" />
+ <result column="region_name" property="regionName" jdbcType="VARCHAR" />
+ <result column="regist_date" property="registDate" jdbcType="TIMESTAMP" />
+ <result column="state" property="state" jdbcType="VARCHAR" />
+ <result column="street" property="street" jdbcType="VARCHAR" />
+ <result column="outfall_type" property="outfallType" jdbcType="VARCHAR" />
+ </resultMap>
+ <sql id="Base_Column_List" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ enter_id, enter_name, address, business_date, datasource, jjq_code, jjq_name, latitude,
+ link_man, link_phone, longitude, region_name, regist_date, state, street
+ </sql>
+</mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/ds3/FumeDailyAnalysisMapper.xml b/src/main/resources/mapper/ds3/FumeDailyAnalysisMapper.xml
new file mode 100644
index 0000000..ecf6535
--- /dev/null
+++ b/src/main/resources/mapper/ds3/FumeDailyAnalysisMapper.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="cn.flightfeather.supervision.domain.ds3.mapper.FumeDailyAnalysisMapper" >
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds3.entity.FumeDailyAnalysis" >
+ <!--
+ WARNING - @mbg.generated
+ -->
+ <result column="fume_dev_id" property="fumeDevId" jdbcType="VARCHAR" />
+ <result column="fume_date" property="fumeDate" jdbcType="DATE" />
+ <result column="fume_day_min" property="fumeDayMin" jdbcType="DOUBLE" />
+ <result column="fume_day_max" property="fumeDayMax" jdbcType="DOUBLE" />
+ <result column="fume_day_average" property="fumeDayAverage" jdbcType="DOUBLE" />
+ <result column="purifier_open_rate" property="purifierOpenRate" jdbcType="VARCHAR" />
+ <result column="fume_minute_exceeding_num" property="fumeMinuteExceedingNum" jdbcType="DECIMAL" />
+ <result column="fume_over_standard_rate" property="fumeOverStandardRate" jdbcType="VARCHAR" />
+ <result column="fume_data_efficiency" property="fumeDataEfficiency" jdbcType="VARCHAR" />
+ <result column="daily_online_rate" property="dailyOnlineRate" jdbcType="VARCHAR" />
+ <result column="noon_online_rate" property="noonOnlineRate" jdbcType="VARCHAR" />
+ <result column="night_online_rate" property="nightOnlineRate" jdbcType="VARCHAR" />
+ <result column="key_online_rate" property="keyOnlineRate" jdbcType="VARCHAR" />
+ <result column="noon__valid_rate" property="noonValidRate" jdbcType="VARCHAR" />
+ <result column="night__valid_rate" property="nightValidRate" jdbcType="VARCHAR" />
+ <result column="key_valid_rate" property="keyValidRate" jdbcType="VARCHAR" />
+ <result column="noon_opening_count" property="noonOpeningCount" jdbcType="VARCHAR" />
+ <result column="night_opening_count" property="nightOpeningCount" jdbcType="VARCHAR" />
+ <result column="key_opening_rate" property="keyOpeningRate" jdbcType="VARCHAR" />
+ <result column="noon_exceeding_num" property="noonExceedingNum" jdbcType="VARCHAR" />
+ <result column="night_exceeding_num" property="nightExceedingNum" jdbcType="VARCHAR" />
+ <result column="key_exceeding_rate" property="keyExceedingRate" jdbcType="VARCHAR" />
+ </resultMap>
+</mapper>
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
new file mode 100644
index 0000000..c5b741d
--- /dev/null
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
@@ -0,0 +1,58 @@
+package cn.flightfeather.supervision.business.autooutput
+
+import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation
+import cn.flightfeather.supervision.business.autooutput.score.construction.JADataAnalysis
+import cn.flightfeather.supervision.lightshare.service.SearchService
+import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
+import org.junit.Test
+import org.junit.jupiter.api.extension.ExtendWith
+import org.junit.runner.RunWith
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.test.context.SpringBootTest
+import org.springframework.test.context.junit.jupiter.SpringExtension
+import org.springframework.test.context.junit4.SpringRunner
+
+@RunWith(SpringRunner::class)
+@ExtendWith(SpringExtension::class)
+@SpringBootTest
+class AopEvaluationTest {
+
+ @Autowired
+ lateinit var aopEvaluation: AopEvaluation
+
+ @Autowired
+ lateinit var searchService: SearchService
+
+ @Autowired
+ lateinit var jaDataAnalysis: JADataAnalysis
+
+ /**
+ * 缁熻鐩戞祴鏁版嵁缁撴灉
+ */
+ @Test
+ fun test1() {
+ jaDataAnalysis.setResource("VHXHS1dHsykTNUf2", 1, 2023, 8)
+ jaDataAnalysis.execute()
+ }
+
+ /**
+ * 鑷姩璇勪及
+ */
+ @Test
+ fun test() {
+ aopEvaluation.setResource("VHXHS1dHsykTNUf2", 1)
+ aopEvaluation.execute()
+ }
+
+ /**
+ * 瀵煎嚭鑷姩璇勪及缁撴灉
+ */
+ @Test
+ fun test2() {
+ val mode = 9
+ searchService.writeToFile(ExcelConfigVo(
+ "VHXHS1dHsykTNUf2",
+ districtCode = "310106",
+ sceneType = 1), mode)
+ }
+}
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt
index 0214e92..bfe6945 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/fume/AutoScoreTest.kt
@@ -42,13 +42,13 @@
// val t = s.substring(0, s.length - 2)
// println(t)
-// autoScore.sceneType = Constant.ScenseType.TYPE1
-// autoScore.topTaskGrade("8QN1VzftuhBJmrF8")
-// val subtask = subtaskMapper.selectByPrimaryKey("OPmza2ddEAKiQHqz")
+ autoScore.sceneType = Constant.ScenseType.TYPE1
+ autoScore.topTaskGrade("BdSm7KhSYWar3BSp")
+// val subtask = subtaskMapper.selectByPrimaryKey("YoKxHlojS1wIlFoQ")
// autoScore.sceneGrade(subtask)
// autoScore.sceneGradeToFile(subtask)
- autoScore3.go(2022, 9, 1)
+// autoScore3.go(2022, 9, 1)
// val t = problemlistMapper.getStatisticalResult("310116", "2021-09-01 00:00:00", "2021-09-30 00:00:00", "1")
// println()
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt
new file mode 100644
index 0000000..046ce9f
--- /dev/null
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt
@@ -0,0 +1,50 @@
+package cn.flightfeather.supervision.business.location
+
+import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
+import org.junit.Test
+import org.junit.jupiter.api.Assertions.*
+import org.junit.jupiter.api.extension.ExtendWith
+import org.junit.runner.RunWith
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.test.context.SpringBootTest
+import org.springframework.test.context.junit.jupiter.SpringExtension
+import org.springframework.test.context.junit4.SpringRunner
+
+@RunWith(SpringRunner::class)
+@ExtendWith(SpringExtension::class)
+@SpringBootTest
+class LocationRoadNearbyTest {
+
+ @Autowired
+ lateinit var scenseMapper: ScenseMapper
+
+ @Test
+ fun foo1() {
+ val locationRoadNearby = LocationRoadNearby(scenseMapper)
+// val b = LocationRoadNearby.BasePlace("", Pair(121.378346, 30.84923), Pair(121.378296, 30.861472))
+// locationRoadNearby.search(b, 1000.0)
+ val bList = listOf(
+ LocationRoadNearby.BasePlace("骞查挶璺�-閲戠煶鍖楄矾-閲戝紶鍏矾", Pair(121.218411,30.826654), Pair(121.227142,30.828403)),
+ LocationRoadNearby.BasePlace("閲戝粖鍏矾-寤轰箰璺�-鏈卞悤鍏矾", Pair(121.18409,30.835699), Pair(121.183811,30.831636)),
+ LocationRoadNearby.BasePlace("閲戝紶鍏矾-鐢版柊璺�-骞查挶璺�", Pair(121.219555,30.829319), Pair(121.227142,30.828403)),
+ LocationRoadNearby.BasePlace("澶ц尗涓績璺�-鏈卞钩鍏矾-鏈卞璺�", Pair(121.147448,30.858481), Pair(121.149312,30.857804)),
+ LocationRoadNearby.BasePlace("澶ц尗涓績璺�-寤哄瘜璺�-鏈卞钩鍏矾", Pair(121.141819,30.858344), Pair(121.147448,30.858481)),
+ LocationRoadNearby.BasePlace("鏈卞悤鍏矾-閲戝紶鍏矾-搴峰叴璺�", Pair(121.177261,30.83326), Pair(121.18053,30.830751)),
+ LocationRoadNearby.BasePlace("鏈卞悤鍏矾-閲戝粖鍏矾-搴峰叴璺�", Pair(121.183811,30.831636), Pair(121.18053,30.830751)),
+ LocationRoadNearby.BasePlace("鍚曟柊璺�-寤轰箰璺�-鏈卞悤鍏矾", Pair(121.191766,30.835612), Pair(121.196591,30.831604)),
+ LocationRoadNearby.BasePlace("婧寳璺�-鏈卞悤鍏矾-鏂颁笢琛�", Pair(121.171163,30.832014), Pair(121.174958,30.827349)),
+ LocationRoadNearby.BasePlace("涓滄柟绾腑蹇冭矾-鍐滃缓璺�-鏈卞钩鍏矾", Pair(121.141617,30.870365), Pair(121.145145,30.870635)),
+ LocationRoadNearby.BasePlace("涓滄柟绾腑蹇冭矾-鏈卞钩鍏矾-鏈卞璺�", Pair(121.145145,30.870635), Pair(121.155051,30.870966)),
+ LocationRoadNearby.BasePlace("鏈卞悤鍏矾-閲戝粖鍏矾-鐢版璺�", Pair(121.183811,30.831636), Pair(121.18989,30.831606)),
+ LocationRoadNearby.BasePlace("鏈卞钩鍏矾-涓滃瘜璺�-澶ц尗涓績璺�", Pair(121.146281,30.864199), Pair(121.147448,30.858481)),
+ LocationRoadNearby.BasePlace("鏈卞钩鍏矾-涓滄柟绾腑蹇冭矾-涓滃瘜璺�", Pair(121.145404,30.869592), Pair(121.146281,30.864199)),
+ LocationRoadNearby.BasePlace("閲戝紶鍏矾-閲戠煶鍖楄矾-鐢版柊璺�", Pair(121.215668,30.830838), Pair(121.219555,30.829319)),
+ LocationRoadNearby.BasePlace("鏈卞钩鍏矾-鍚曢潚璺�-钄疯崥璺�", Pair(121.148479,30.836083), Pair(121.14842,30.842135)),
+ LocationRoadNearby.BasePlace("鏈辨尘鍐滃缓璺�-寤哄瘜璺�-鏈卞钩鍏矾", Pair(121.142609,30.863955), Pair(121.146407,30.864167)),
+ LocationRoadNearby.BasePlace("鏈辨尘鍐滃缓璺�-鏈卞钩鍏矾-鏈卞璺�", Pair(121.146407,30.864167), Pair(121.153675,30.864075)),
+ LocationRoadNearby.BasePlace("鍚曢潚璺�-鏈卞悤鍏矾-鏈卞钩鍏矾", Pair(121.136318,30.833325), Pair(121.148624,30.836094)),
+ LocationRoadNearby.BasePlace("娉栨咕鏀矾-鍚曢潚璺�-鏈卞钩鍏矾", Pair(121.155048,30.835229), Pair(121.148659,30.829861)),
+ )
+ locationRoadNearby.searchList(bList, 1000.0)
+ }
+}
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt b/src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt
new file mode 100644
index 0000000..2878288
--- /dev/null
+++ b/src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt
@@ -0,0 +1,22 @@
+package cn.flightfeather.supervision.datafetch
+
+import cn.flightfeather.supervision.SupervisionApplication
+import org.junit.Test
+import org.junit.jupiter.api.Assertions.*
+import org.junit.runner.RunWith
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.test.context.SpringBootTest
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
+
+@RunWith(SpringJUnit4ClassRunner::class)
+@SpringBootTest(classes = [SupervisionApplication::class])
+class FetchNightConstructionTest {
+
+ @Autowired
+ lateinit var fetchNightConstruction: FetchNightConstruction
+
+ @Test
+ fun foo1() {
+ fetchNightConstruction.fetch()
+ }
+}
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt
index fce4cef..568eb3d 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImplTest.kt
@@ -37,10 +37,10 @@
val sD = Date.from(localTimeS.atZone(ZoneId.systemDefault()).toInstant())
val eD = Date.from(localTimeE.atZone(ZoneId.systemDefault()).toInstant())
- val mode = 8
+ val mode = 9
//閲戝北2022骞�6鏈�
searchService.writeToFile(ExcelConfigVo(
- "udXAWrrRbM2MvZ5u",
+ "0kG5dblu1uPqo8qW",
districtCode = "310106",
// townCode = "310116113",
sceneType = 1), mode)
--
Gitblit v1.9.3