From b212ef0208cb094f63ea8a239a1361f8e859c839 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 08 七月 2024 17:40:39 +0800
Subject: [PATCH] 2024.7.8
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AutoScoreResultVo.kt | 1
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt | 27
src/main/resources/mapper/ds1/InspectionMapper.xml | 56 +-
src/main/resources/mapper/ds1/EvaluationMapper.xml | 2
src/test/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRepTest.kt | 35 +
pom.xml | 20
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt | 7
src/test/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstructionTest.kt | 3
src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt | 9
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt | 38 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/EvaluationVo.kt | 33 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt | 11
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt | 2
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt | 42 +
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRep.kt | 42 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt | 4
src/test/kotlin/cn/flightfeather/supervision/business/subtask/TaskTest.kt | 33 +
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt | 13
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishEvaluation.kt | 29 +
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishTopTask.kt | 49 ++
src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchData.kt | 2
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt | 50 +
src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt | 53 ++
src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt | 3
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt | 8
src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt | 5
src/test/kotlin/cn/flightfeather/supervision/business/bgtask/JinAnScoreTaskCtrlTest.kt | 4
src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchController.kt | 2
src/main/resources/log4j2.xml | 16
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrl.kt | 37 +
src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt | 2
src/main/resources/mapper/ds1/SubtaskMapper.xml | 458 +++++++++++--------
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt | 21
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRep.kt | 9
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SubtaskServiceImpl.kt | 56 +-
src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishSubtask.kt | 30 +
src/main/kotlin/cn/flightfeather/supervision/config/AsyncConfig.kt | 28 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt | 6
src/main/kotlin/cn/flightfeather/supervision/scheduler/ScheduleService.kt | 59 ++
src/main/resources/application.yml | 10
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt | 9
41 files changed, 988 insertions(+), 336 deletions(-)
diff --git a/pom.xml b/pom.xml
index b4fd6e9..93616db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,24 +34,23 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-quartz</artifactId>
+ <artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
- <artifactId>spring-boot-starter-logging</artifactId>
<groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-quartz</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
- <exclusions>
- <exclusion>
- <artifactId>spring-boot-starter-logging</artifactId>
- <groupId>org.springframework.boot</groupId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
@@ -123,11 +122,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
diff --git a/src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt b/src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
index 9099122..e21e4dd 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
@@ -1,15 +1,16 @@
package cn.flightfeather.supervision
-import cn.flightfeather.supervision.datafetch.FetchController
-import cn.flightfeather.supervision.infrastructure.service.ServerManager
+import cn.flightfeather.supervision.business.datafetch.FetchController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.ApplicationRunner
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.context.annotation.Bean
+import org.springframework.scheduling.annotation.EnableScheduling
@SpringBootApplication
+@EnableScheduling
class SupervisionApplication {
@Autowired
@@ -18,7 +19,7 @@
@Bean
fun runner() = ApplicationRunner {
- fetchController. run()
+ fetchController.run()
}
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt
index 2e3e308..1f84f3e 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt
@@ -106,6 +106,8 @@
drMin = tempMin.total
drOverAvgPer = overAvgRate(drAvg, dAvg)
drDataNum = count(dataList)
+ // 褰撴暟鎹噺涓�0鏃讹紝瓒呮湀搴﹀尯鍧囧�肩櫨鍒嗘瘮鍙樹负0
+ if (drDataNum == 0) drOverAvgPer = .0
drEffectiveRate = effectiveRate(dataList, evaluationScene)
}
//鏇存柊鍏ュ簱
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
index ecc3eb2..a19472f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt
@@ -70,7 +70,9 @@
evaluationScene.clear()
evaluationScene.index = i
evaluationScene.setDefaultScene(scene)
- callback(i, evaluationScene)
+ do {
+ callback(i, evaluationScene)
+ } while (evaluationScene.gotoNextSubTask())
}
}
1 -> {
@@ -92,6 +94,9 @@
sceneSourceList.clear()
val taskSceneIdList =
aopDbMapper.scenseMapper.getSceneByType(config.topTaskGuid, config.sceneType, config.townCode)
+ taskSceneIdList.forEach {
+ println(it.name)
+ }
sceneSourceList.addAll(taskSceneIdList)
}
@@ -150,12 +155,21 @@
})
}
//宸℃煡浠诲姟淇℃伅
+ var subTaskIndex = 0
val subTask = InfoProxy<Subtask> {_,_ ->
+ return@InfoProxy if (subTaskList.value?.isNotEmpty() == true) {
+ subTaskList.value?.get(subTaskIndex)
+ } else {
+ null
+ }
+ }
+
+ val subTaskList = InfoProxy<List<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)
+ })
}
//鐜板満宸℃煡淇℃伅
@@ -341,21 +355,43 @@
*/
fun clear() {
scene.clear()
+ subTaskIndex = 0
+ subTaskList.clear()
userInfo.clear()
userInfoTZ.clear()
+ baseScene.clear()
+ problemTypes.clear()
+ ledgerCount.clear()
+ ledgerRecords.clear()
+
+ clearSubtask()
+ }
+
+ fun clearSubtask() {
subTask.clear()
inspection.clear()
- baseScene.clear()
problems.clear()
evaluation.clear()
itemevaluationList.clear()
- problemTypes.clear()
- baseRule.clear()
totalScore.clear()
topItems.clear()
+ baseRule.clear()
rules.clear()
- ledgerCount.clear()
- ledgerRecords.clear()
+ }
+
+ /**
+ * 鍒囨崲鑷充笅涓�涓贰鏌ヤ换鍔�
+ * 涓�涓満鏅彲鑳藉悓鏃跺瓨鍦ㄥ涓贰鏌ヤ换鍔subTaskList]锛岄渶瑕佸姣忎釜宸℃煡浠诲姟鍒嗗埆杩涜璇勫垎
+ * @return 鏄惁鏈変笅涓�涓贰鏌ヤ换鍔�
+ */
+ fun gotoNextSubTask(): Boolean {
+ return if (subTaskIndex + 1 < (subTaskList.value?.size ?: 0)) {
+ clearSubtask()
+ subTaskIndex++
+ true
+ } else {
+ false
+ }
}
/**
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
index 384110f..894422a 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/AopEvaluation.kt
@@ -43,6 +43,11 @@
reScoreItem10: ReScoreItem10,
reScoreItem11: ReScoreItem11,
) {
+ //姝e湪杩涜璇勪及鐨勫贰鏌ヤ换鍔�
+ private val runningSubtask = mutableListOf<String>()
+
+ //姝e湪杩涜璇勪及鐨勬�诲贰鏌ヤ换鍔�
+ private val runningTopTask = mutableListOf<String>()
//鐗瑰畾璇勫垎椤癸紙闄や簡缁熶竴鐨勬牴鎹贰鏌ラ棶棰樼洿鎺ユ墸鍒嗗锛屾湁鐗瑰畾鐨勬墸鍒嗛�昏緫鐨勮瘎浼伴」锛�
private val itemList = mutableListOf<ScoreItem>()
@@ -73,9 +78,31 @@
/**
* 瀵圭壒瀹氱殑宸℃煡浠诲姟杩涜鍗曠嫭璇勫垎
*/
- fun executeBySubTask(subTask:Subtask) {
+ fun executeBySubTask(subTask: Subtask) {
+ if (checkSubtaskExist(subTask)) return
val source = setResource(subTask)
execute(source)
+ runningSubtask.remove(subTask.stguid)
+ }
+
+ @Synchronized
+ private fun checkTopTaskExist(topTaskGuid: String?): Boolean {
+ return if (runningTopTask.contains(topTaskGuid)) {
+ true
+ } else {
+ topTaskGuid?.let { runningTopTask.add(it) }
+ false
+ }
+ }
+
+ @Synchronized
+ private fun checkSubtaskExist(subTask: Subtask): Boolean {
+ return if (subTask.stguid == null || runningSubtask.contains(subTask.stguid)) {
+ true
+ } else {
+ runningSubtask.add(subTask.stguid!!)
+ false
+ }
}
private fun setResource(subTask: Subtask): AopDataSource {
@@ -101,7 +128,7 @@
private fun execute(source: AopDataSource) {
//鑾峰彇鏁版嵁婧愶紙寰呰瘎浼扮殑鍦烘櫙锛�
//寰幆澶勭悊姣忎釜鍦烘櫙
- source.loop {index, evaluationScene ->
+ source.loop { index, evaluationScene ->
if (evaluationScene.noRecord()) return@loop
itemGrade(index, evaluationScene)
@@ -166,7 +193,10 @@
/**
* 璁$畻鎬诲垎
*/
- private fun totalGrade(index: Int, evaluationScene: AopDataSource.EvaluationScene): Pair<Evaluation, List<Itemevaluation>>? {
+ 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
@@ -179,7 +209,7 @@
total += top.extension1?.toIntOrNull() ?: 0
}
val evaluation = Evaluation().apply {
- evaluationScene.baseRule.value?.let {
+ evaluationScene.baseRule.value?.let {
guid = UUIDGenerator.generate16ShortUUID()
iguid = inspection?.guid
stguid = subTask?.stguid
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrl.kt b/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrl.kt
index 5592fae..5c3c05a 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrl.kt
@@ -12,6 +12,7 @@
import cn.flightfeather.supervision.domain.ds1.repository.TaskRep
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import org.springframework.stereotype.Component
+import java.time.LocalDateTime
/**
* 鑷姩璇勪及浠诲姟绠$悊
@@ -37,6 +38,29 @@
dataAnalysisMap["310116"]?.put(Constant.SceneType.TYPE1.value.toInt(), jsCsDataAnalysis)
dataAnalysisMap["310116"]?.put(Constant.SceneType.TYPE2.value.toInt(), jsWhDataAnalysis)
dataAnalysisMap["310116"]?.put(Constant.SceneType.TYPE3.value.toInt(), jsMpDataAnalysis)
+ }
+
+ fun startAllEvaluation(time: LocalDateTime) {
+ startEvaluation(getArea(time, "310106", "闈欏畨鍖�", Constant.SceneType.TYPE1))
+ startEvaluation(getArea(time, "310104", "寰愭眹鍖�", Constant.SceneType.TYPE5))
+ startEvaluation(getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE1))
+ startEvaluation(getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE2))
+ startEvaluation(getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE3))
+ }
+
+ fun startEvaluation(areaVo: AreaVo) {
+ val task = taskRep.findOneTask(areaVo)
+ val taskId = task?.tguid
+ val sceneType = areaVo.scensetypeid?.toInt() ?: throw BizException("鍦烘櫙绫诲瀷鏈缃紝鏃犳硶璇勪及")
+ aopEvaluation.executeByTopTask(taskId, sceneType)
+ }
+
+ fun startAll(time: LocalDateTime) {
+ startNewTask(getArea(time, "310106", "闈欏畨鍖�", Constant.SceneType.TYPE1))
+ startNewTask(getArea(time, "310104", "寰愭眹鍖�", Constant.SceneType.TYPE5))
+ startNewTask(getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE1))
+ startNewTask(getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE2))
+ startNewTask(getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE3))
}
fun startNewTask(areaVo: AreaVo): BgTaskStatus {
@@ -78,4 +102,17 @@
aopDataAnalysis?.setResource(taskId, sceneType, year, month)
aopDataAnalysis?.execute()
}
+
+ fun getArea(time: LocalDateTime, dCode: String, dName: String, sceneType: Constant.SceneType): AreaVo {
+ return AreaVo().apply {
+ provincecode = "31"
+ provincename = "涓婃捣甯�"
+ citycode = "3100"
+ cityname = "涓婃捣甯�"
+ starttime = time
+ districtcode = dCode
+ districtname = dName
+ scensetypeid = sceneType.value
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishEvaluation.kt b/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishEvaluation.kt
new file mode 100644
index 0000000..eab40e7
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishEvaluation.kt
@@ -0,0 +1,29 @@
+package cn.flightfeather.supervision.business.bgtask
+
+import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation
+import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.domain.ds1.entity.Subtask
+import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRep
+import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
+import org.springframework.stereotype.Component
+import java.time.LocalDateTime
+import java.util.*
+
+/**
+ * 琛ュ厖瀹屾垚鎵�鏈夋鍦ㄦ墽琛岀殑宸℃煡浠诲姟锛屽苟涓斿鏈瘎鍒嗙殑浠诲姟杩涜鑷姩璇勫垎
+ */
+@Component
+class TaskFinishEvaluation(
+ private val subTaskRep: SubTaskRep,
+ private val evaluationRep: EvaluationRep,
+ private val aopEvaluation: AopEvaluation,
+) {
+
+ fun handle() {
+ val list = subTaskRep.findByTime(2024, 5)
+ list.forEach {
+ it ?: return@forEach
+ evaluationRep.findBySubtask(it.stguid) ?: aopEvaluation.executeBySubTask(it)
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishSubtask.kt b/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishSubtask.kt
new file mode 100644
index 0000000..cdd4246
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishSubtask.kt
@@ -0,0 +1,30 @@
+package cn.flightfeather.supervision.business.bgtask
+
+import cn.flightfeather.supervision.business.autooutput.score.AopEvaluation
+import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRep
+import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
+import org.springframework.stereotype.Component
+import java.util.*
+
+/**
+ * 缁撴潫鎵�鏈夋鍦ㄦ墽琛岀殑宸℃煡浠诲姟锛屽苟涓斿鏈瘎鍒嗙殑浠诲姟杩涜鑷姩璇勫垎
+ */
+@Component
+class TaskFinishSubtask(
+ private val subTaskRep: SubTaskRep,
+ private val evaluationRep: EvaluationRep,
+ private val aopEvaluation: AopEvaluation,
+) {
+
+ fun handle() {
+ val list = subTaskRep.findByStatus(Constant.TaskProgress.RUNINGSTATUS2)
+ list.forEach {
+ it ?: return@forEach
+ evaluationRep.findBySubtask(it.stguid) ?: aopEvaluation.executeBySubTask(it)
+ it.status = Constant.TaskProgress.RUNINGSTATUS3.text
+ it.executionendtime = Date()
+ subTaskRep.update(it)
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishTopTask.kt b/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishTopTask.kt
new file mode 100644
index 0000000..e619119
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/bgtask/TaskFinishTopTask.kt
@@ -0,0 +1,49 @@
+package cn.flightfeather.supervision.business.bgtask
+
+import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.domain.ds1.entity.Task
+import cn.flightfeather.supervision.domain.ds1.repository.TaskRep
+import org.springframework.stereotype.Component
+import java.time.LocalDateTime
+import java.time.ZoneId
+
+/**
+ * 缁撴潫鏈湀涔嬪墠鎵�鏈夊凡鍒涘缓鐨勬棩浠诲姟閮藉畬鎴愮殑鐨勯《灞備换鍔�
+ * @date 2024/7/2
+ * @author feiyu02
+ */
+@Component
+class TaskFinishTopTask(private val taskRep: TaskRep) {
+
+ fun handle() {
+ // 绛涢�夋墍鏈夋鍦ㄦ墽琛屼腑鐨勯《灞備换鍔�
+ val topTasks = taskRep.findTasks(Task().apply {
+ levelnum = 2
+ runingstatus = Constant.TaskProgress.RUNINGSTATUS2.text
+ })
+
+ // 鑾峰彇涓婃湀搴曟椂闂�
+ val lastMonth = LocalDateTime.now().withDayOfMonth(1).withHour(0)
+ .withMinute(0).withSecond(0).minusSeconds(1)
+ topTasks.forEach { tt ->
+ if (tt == null) return@forEach
+ val time = LocalDateTime.ofInstant(tt.starttime?.toInstant(), ZoneId.systemDefault())
+ // 绛涢�夋湰鏈堜箣鍓嶇殑椤跺眰浠诲姟
+ if (time.isBefore(lastMonth)) {
+ // 缁熻瀵瑰簲鐨勬墍鏈夋棩浠诲姟鏄惁閮藉凡缁撴潫锛岃嫢閮界粨鏉燂紝鍒欑粨鏉熻椤跺眰浠诲姟
+ val dayTasks = taskRep.findDayTasks(tt.tguid)
+ var finished = true
+ for (dt in dayTasks) {
+ if (dt?.runingstatus != Constant.TaskProgress.RUNINGSTATUS3.text) {
+ finished = false
+ break
+ }
+ }
+ if (finished) {
+ tt.runingstatus = Constant.TaskProgress.RUNINGSTATUS3.text
+ taskRep.update(tt)
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt b/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchController.kt
similarity index 97%
rename from src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt
rename to src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchController.kt
index 3fece28..0afb971 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchController.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.supervision.datafetch
+package cn.flightfeather.supervision.business.datafetch
import org.springframework.stereotype.Component
import java.util.*
diff --git a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchData.kt b/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchData.kt
similarity index 82%
rename from src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchData.kt
rename to src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchData.kt
index 29d6335..1376681 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchData.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchData.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.supervision.datafetch
+package cn.flightfeather.supervision.business.datafetch
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
diff --git a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt b/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt
similarity index 97%
rename from src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
rename to src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt
index 6c76816..85b4cc8 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstruction.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstruction.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.supervision.datafetch
+package cn.flightfeather.supervision.business.datafetch
import cn.flightfeather.supervision.common.net.NCHttpService
import cn.flightfeather.supervision.domain.ds1.entity.NightConstruction
@@ -11,7 +11,6 @@
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
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt b/src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt
index c8fb9bc..9b73da9 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearby.kt
@@ -53,7 +53,7 @@
}
utilFile.index = 1
}
- utilFile.outPutToFile()
+ utilFile.outPutToFile(distance)
}
/**
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt b/src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt
index f6aeb9c..04e78b4 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/location/UtilFile.kt
@@ -74,9 +74,10 @@
index++
}
- fun outPutToFile() {
+ fun outPutToFile(distance: Double? = null) {
val workbook = HSSFWorkbook()
- val fileName = "閲戝北鍖哄懆杈圭偣浣�-${DateUtil().DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
+ val tag = if (distance == null) "" else "${distance}绫�"
+ val fileName = "鍛ㄨ竟${tag}鐐逛綅-${DateUtil().DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
val filePath = "C:\\work\\宸ヤ綔\\绗笁鏂圭洃绠\鍛ㄨ竟鐐逛綅\\$fileName"
val out = FileOutputStream(File(filePath))
ExcelUtil.write(heads, contents, workbook)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/config/AsyncConfig.kt b/src/main/kotlin/cn/flightfeather/supervision/config/AsyncConfig.kt
new file mode 100644
index 0000000..e4ca469
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/config/AsyncConfig.kt
@@ -0,0 +1,28 @@
+package cn.flightfeather.supervision.config
+
+import org.springframework.context.annotation.Bean
+import org.springframework.context.annotation.Configuration
+import org.springframework.scheduling.annotation.EnableAsync
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
+import java.util.concurrent.Executor
+
+
+@Configuration
+@EnableAsync
+class AsyncConfig {
+ /*
+ *姝ゅ鎴愬憳鍙橀噺搴旇浣跨敤@Value浠庨厤缃腑璇诲彇
+ */
+ private val corePoolSize = 10
+ private val maxPoolSize = 200
+ private val queueCapacity = 10
+ @Bean
+ fun taskExecutor(): Executor {
+ val executor = ThreadPoolTaskExecutor()
+ executor.corePoolSize = corePoolSize
+ executor.maxPoolSize = maxPoolSize
+ executor.setQueueCapacity(queueCapacity)
+ executor.initialize()
+ return executor
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt
index 7b3bb4b..390cc08 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/SubtaskMapper.kt
@@ -3,10 +3,7 @@
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import cn.flightfeather.supervision.domain.util.MyMapper
-import cn.flightfeather.supervision.lightshare.vo.SubTaskSearchResultVo2
-import cn.flightfeather.supervision.lightshare.vo.SubTaskSummary
-import cn.flightfeather.supervision.lightshare.vo.SubtaskSearchResultVo
-import cn.flightfeather.supervision.lightshare.vo.SubtaskVo
+import cn.flightfeather.supervision.lightshare.vo.*
import org.apache.ibatis.annotations.Mapper
import java.time.LocalDateTime
import java.util.*
@@ -24,6 +21,9 @@
fun getSummary(topTaskId: String, sceneTypeId: Int?): List<SubTaskSummary>
+ // 鏍规嵁鍖哄煙鑼冨洿绛涢��
+ fun getSummaryByArea(areaVo: AreaVo): List<SubTaskSummary>
+
fun getSummaryByScene(sceneId: String, startTime: LocalDateTime?, endTime: LocalDateTime?): List<SubTaskSummary>
fun findSubTasksByProType(topTaskId: String, sceneTypeId: String, proType: String): List<Subtask>
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRep.kt
index b02ade6..c3ccd05 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRep.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRep.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.domain.ds1.repository
+import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationMapper
@@ -33,6 +34,14 @@
return if (res.isNotEmpty()) res[0] else null
}
+ fun findBySubtask(subTaskId: String?): Evaluation? {
+ try {
+ return evaluationMapper.selectOne(Evaluation().apply { stguid = subTaskId })
+ } catch (e: Exception) {
+ throw BizException("宸℃煡[${subTaskId}]瀵瑰簲浜嗗鏉¤瘎浼版�诲垎璁板綍锛岃妫�鏌ユ槸鍚︽湁绯荤粺閫昏緫閿欒")
+ }
+ }
+
/**
* 鏌ユ壘鑷姩璇勫垎缁撴灉
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt
index cec2e1a..d5f3c14 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt
@@ -5,7 +5,6 @@
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper
-import javafx.scene.Scene
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
import java.util.*
@@ -20,11 +19,11 @@
private val subTaskRep: SubTaskRep,
) {
- fun insert(scense: Scense?):Int {
- scense ?: return 0
- if (scense.guid == null) scense.guid = UUIDGenerator.generate16ShortUUID()
- scense.createdate = Date()
- return scenseMapper.insertSelective(scense)
+ fun insert(scene: Scense?):Int {
+ scene ?: return 0
+ if (scene.guid == null) scene.guid = UUIDGenerator.generate16ShortUUID()
+ scene.createdate = Date()
+ return scenseMapper.insertSelective(scene)
}
/**
@@ -53,7 +52,7 @@
}
fun findBySubTask(subTaskId: String): Scense? {
- val subtask = subTaskRep.find(subTaskId)
+ val subtask = subTaskRep.findOne(subTaskId)
return scenseMapper.selectByPrimaryKey(subtask?.scenseid)
}
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRep.kt
index feb9778..b541b19 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRep.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRep.kt
@@ -1,20 +1,60 @@
package cn.flightfeather.supervision.domain.ds1.repository
+import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import cn.flightfeather.supervision.domain.ds1.mapper.SubtaskMapper
+import cn.flightfeather.supervision.lightshare.vo.AreaVo
+import cn.flightfeather.supervision.lightshare.vo.SubTaskSummary
import org.springframework.stereotype.Repository
+import tk.mybatis.mapper.entity.Example
+import java.time.LocalDateTime
@Repository
class SubTaskRep(private val subtaskMapper: SubtaskMapper) {
+ fun update(subtask: Subtask): Int {
+ return subtaskMapper.updateByPrimaryKey(subtask)
+ }
- fun find(id:String): Subtask? {
+ fun findOne(id:String): Subtask? {
return subtaskMapper.selectByPrimaryKey(id)
}
+
+ fun findAll(subtask: Subtask): List<Subtask?> {
+ return subtaskMapper.select(subtask)
+ }
+
/**
* 鏍规嵁鎬讳换鍔°�佸満鏅被鍨嬨�侀棶棰樼被鍨嬶紝鑾峰彇鍙戠幇璇ョ绫婚棶棰樼殑鍦烘櫙淇℃伅
*/
fun findSubtasks(topTaskId: String, sceneTypeId:String, proType: String): List<Subtask?> {
return subtaskMapper.findSubTasksByProType(topTaskId, sceneTypeId, proType)
}
+
+ /**
+ * 鏌ユ壘姝e湪鎵ц鐨勫贰鏌ヤ换鍔�
+ */
+ fun findByStatus(status: Constant.TaskProgress): List<Subtask?> {
+ return subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
+ createCriteria().andEqualTo("status", status.text)
+ })
+ }
+
+ fun findByTime(sT: LocalDateTime, eT: LocalDateTime): List<Subtask?> {
+ return subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
+ createCriteria().andBetween("planstarttime", sT, eT)
+ })
+ }
+
+ fun findByTime(year: Int, month: Int): List<Subtask?> {
+ val sT = LocalDateTime.of(year, month, 1, 0, 0, 0)
+ val eT = sT.plusMonths(1).minusSeconds(1)
+ return findByTime(sT, eT)
+ }
+
+
+ // 宸℃煡浠诲姟闂鏁存敼璇︽儏缁熻鐩稿叧
+ fun findSummary(areaVo: AreaVo): List<SubTaskSummary> {
+ return subtaskMapper.getSummaryByArea(areaVo)
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt
index 58db4df..21133a7 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/TaskRep.kt
@@ -6,6 +6,7 @@
import cn.flightfeather.supervision.domain.ds1.mapper.TaskMapper
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import org.springframework.stereotype.Repository
+import tk.mybatis.mapper.entity.Example
import java.time.ZoneId
import java.util.*
@@ -24,6 +25,11 @@
endtime = Date.from(mEnd.atZone(ZoneId.systemDefault()).toInstant())
}
}
+
+ fun update(task: Task): Int {
+ return taskMapper.updateByPrimaryKeySelective(task)
+ }
+
/**
* 鏌ユ壘涓�涓�讳换鍔�
*/
@@ -37,6 +43,10 @@
return taskMapper.select(example)
}
+ fun findTasks(task: Task): List<Task?> {
+ return taskMapper.select(task)
+ }
+
/**
* 鑾峰彇鎬讳换鍔″搴旂殑鐩戠鐗堟湰
*/
@@ -44,4 +54,15 @@
val monitorList = monitorobjectversionMapper.findMonitorListByScene(taskId, sceneTypeId)
return monitorList.sortedBy { it.displayid }
}
+
+ /**
+ * 鑾峰彇鏃ヤ换鍔�
+ * @param taskId 椤跺眰浠诲姟id
+ */
+ fun findDayTasks(taskId: String?): List<Task?> {
+ return taskMapper.selectByExample(Example(Task::class.java).apply {
+ createCriteria().andEqualTo("tsguid", taskId)
+ orderBy("starttime").desc()
+ })
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt
index b8da107..19fe742 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/SubtaskService.kt
@@ -45,9 +45,11 @@
fun getByTopTaskAndDate(topTaskId: String, startTime: String?, endTime: String?, sceneTypeId: Int? = null): List<Subtask>
+ fun getTaskProgressByArea(areaVo: AreaVo): List<TaskProgressVo>
+
fun getSummary(topTaskId: String, sceneTypeId: Int? = null): List<SubTaskSummary>
- fun getSummaryByArea(areaVo: AreaVo): List<TaskProgressVo>
-
fun getByScene(sceneId: String, startTime: LocalDateTime?, endTime: LocalDateTime?): List<SubTaskSummary>
+
+ fun getSummaryByArea(areaVo: AreaVo): List<SubTaskSummary>
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
index 6a74971..4c5d8c6 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/MediafileServiceImpl.kt
@@ -50,8 +50,8 @@
//鏂板濯掍綋鏂囦欢
override fun addMedifile(mediafileVoList: String, files: Array<MultipartFile>) {
- logging.info("涓婁紶鏂囦欢鏂规硶璋冪敤")
- logging.info("mediafileVoList:" + mediafileVoList)
+// logging.info("涓婁紶鏂囦欢鏂规硶璋冪敤")
+// logging.info("mediafileVoList:" + mediafileVoList)
val mapper = ObjectMapper()
//json杞琽bject
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 c7be139..51c20ef 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
@@ -12,6 +12,7 @@
import cn.flightfeather.supervision.domain.ds1.mapper.*
import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRep
import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRuleRep
+import cn.flightfeather.supervision.domain.ds1.repository.SceneRep
import cn.flightfeather.supervision.domain.ds2.mapper.LedgerRecordMapper
import cn.flightfeather.supervision.domain.ds2.mapper.LedgerSubTypeMapper
import cn.flightfeather.supervision.domain.ds2.mapper.UserMapMapper
@@ -62,6 +63,7 @@
val taskService: TaskService,
private val evaluationRep: EvaluationRep,
private val evaluationRuleRep: EvaluationRuleRep,
+ private val sceneRep: SceneRep,
@Value("\${filePath}") var filePath: String,
@Value("\${imgPath}") var imgPath: String,
) : SearchService {
@@ -560,15 +562,22 @@
}
override fun getScoreDetail(subTaskId: String): ScoreDetail {
+ //鍦烘櫙淇℃伅
+ val scene = sceneRep.findBySubTask(subTaskId)
+ //鎬诲垎
+ val evaluation = evaluationRep.findBySubtask(subTaskId)
//瀛愯鍒欓�愭潯寰楀垎
val subRuleScores = evaluationRep.findItemEvaluation(subTaskId)
+ if (subRuleScores.isEmpty()) throw BizException("鏃犺瘎浼拌褰�")
//璇勫垎鎬昏鍒�
val rule = evaluationRuleRep.findAutoEvaluationRule(subTaskId) ?: throw BizException("鏈壘鍒扮浉鍏宠嚜鍔ㄨ瘎浼拌鍒�")
//鎬昏鍒欏搴旂殑璇勫垎瀛愯鍒�
val subRules = evaluationRuleRep.findSubRule(rule.guid)
//鏌ヨ缁撴灉
val result = ScoreDetail()
+ result.status = if (scene?.extension1.equals("1")) "鍦ㄥ缓" else "瀹屽伐"
+ result.updateTime = evaluation?.updatedate
subRules.forEach {
it.ertype ?: return@forEach
result.addDetail(result.details, it, it.ertype!! - 1, subRuleScores, true)
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 dafb0c5..37f67a2 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
@@ -7,6 +7,7 @@
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.common.utils.UUIDGenerator
+import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
import cn.flightfeather.supervision.domain.ds1.repository.TaskRep
import cn.flightfeather.supervision.lightshare.service.SubtaskService
import cn.flightfeather.supervision.lightshare.service.TaskService
@@ -27,6 +28,7 @@
private val subtaskMapper: SubtaskMapper,
private val aopEvaluation: AopEvaluation,
private val taskRep: TaskRep,
+ private val subTaskRep: SubTaskRep,
) : SubtaskService {
val dateUtil = DateUtil()
@@ -393,7 +395,7 @@
// //鏍规嵁鏃ユ湡鑾峰彇鏃ヤ换鍔�
// val daytaskVo = taskService.findByDate(dateUtil.getDate(subtask.planstarttime)!!)
- //2019.3.1 by Riku 搴旇鐩存帴鏍规嵁瀛愪换鍔$殑鏃ヤ换鍔d鏌ヨ鏃ヤ换鍔�
+ //搴旇鐩存帴鏍规嵁瀛愪换鍔$殑鏃ヤ换鍔d鏌ヨ鏃ヤ换鍔�
val daytaskVo = taskService.findByID(subtask.tsguid!!)
//鍒ゆ柇鏄惁鏈夋棩浠诲姟
@@ -442,28 +444,28 @@
}
//鍒ゆ柇瀵瑰簲椤跺眰浠诲姟鐨勬墽琛岀姸鎬�
- val daytaskVolist = taskService.getDayTaskByTaskID(toptaskVo.tguid!!)
- val iterator: Iterator<TaskVo> = daytaskVolist.iterator()
- if (daytaskVo.runingstatus == Constant.TaskProgress.RUNINGSTATUS3.text
- && toptaskVo.runingstatus == Constant.TaskProgress.RUNINGSTATUS2.text) {
- var bool = false
- while (iterator.hasNext()) {
- val tmp = iterator.next()
- if (tmp.runingstatus != Constant.TaskProgress.RUNINGSTATUS3.text) {
- bool = true
- break
- }
- }
- if (!bool){
- toptaskVo.runingstatus = Constant.TaskProgress.RUNINGSTATUS3.text
- }
- }
- else if (daytaskVo.runingstatus != toptaskVo.runingstatus){
- toptaskVo.runingstatus = Constant.TaskProgress.RUNINGSTATUS2.text
- }
- val toptask = Task()
- BeanUtils.copyProperties(toptaskVo, toptask)
- taskMapper.updateByPrimaryKeySelective(toptask)
+// val daytaskVolist = taskService.getDayTaskByTaskID(toptaskVo.tguid!!)
+// val iterator: Iterator<TaskVo> = daytaskVolist.iterator()
+// if (daytaskVo.runingstatus == Constant.TaskProgress.RUNINGSTATUS3.text
+// && toptaskVo.runingstatus == Constant.TaskProgress.RUNINGSTATUS2.text) {
+// var bool = false
+// while (iterator.hasNext()) {
+// val tmp = iterator.next()
+// if (tmp.runingstatus != Constant.TaskProgress.RUNINGSTATUS3.text) {
+// bool = true
+// break
+// }
+// }
+// if (!bool){
+// toptaskVo.runingstatus = Constant.TaskProgress.RUNINGSTATUS3.text
+// }
+// }
+// else if (daytaskVo.runingstatus != toptaskVo.runingstatus){
+// toptaskVo.runingstatus = Constant.TaskProgress.RUNINGSTATUS2.text
+// }
+// val toptask = Task()
+// BeanUtils.copyProperties(toptaskVo, toptask)
+// taskMapper.updateByPrimaryKeySelective(toptask)
//瀵瑰凡缁撴潫鐨勫瓙浠诲姟杩涜鑷姩璇勫垎
if (subtask.status == Constant.TaskProgress.RUNINGSTATUS3.text) {
@@ -946,8 +948,8 @@
return subtaskMapper.getSummary(topTaskId, sceneTypeId)
}
- override fun getSummaryByArea(areaVo: AreaVo): List<TaskProgressVo> {
- areaVo.scensetypeid ?: throw BizException("缂哄皯鍦烘櫙绫诲瀷鍙傛暟")
+ override fun getTaskProgressByArea(areaVo: AreaVo): List<TaskProgressVo> {
+// areaVo.scensetypeid ?: throw BizException("缂哄皯鍦烘櫙绫诲瀷鍙傛暟")
val res = mutableListOf<TaskProgressVo>()
taskRep.findTasks(areaVo).forEach {t->
if (t?.tguid == null) return@forEach
@@ -973,4 +975,8 @@
override fun getByScene(sceneId: String, startTime: LocalDateTime?, endTime: LocalDateTime?): List<SubTaskSummary> {
return subtaskMapper.getSummaryByScene(sceneId, startTime, endTime)
}
+
+ override fun getSummaryByArea(areaVo: AreaVo): List<SubTaskSummary> {
+ return subTaskRep.findSummary(areaVo)
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AutoScoreResultVo.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AutoScoreResultVo.kt
index 4ff51a7..f238900 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AutoScoreResultVo.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/AutoScoreResultVo.kt
@@ -12,6 +12,7 @@
var userId: String? = null
var userName: String? = null
var isEnable: Boolean = true
+ var sceneIndex: Int? = null
var sceneId: String? = null
var sceneName: String? = null
var pName: String? = null
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/EvaluationVo.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/EvaluationVo.kt
index efd7cec..ca80a1d 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/EvaluationVo.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/EvaluationVo.kt
@@ -3,17 +3,27 @@
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
import com.fasterxml.jackson.annotation.JsonInclude
+import java.util.*
/**
* 璇勫垎瑙勫垯鍙婂緱鍒�
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
class ScoreDetail {
+ // 宸ュ湴鐘舵�侊紙鍦ㄥ缓鎴栧畬宸ワ級
+ var status: String? = null
+
// 鎬诲垎
var totalScore: Int = 0
// 寰楀垎
var score: Int = 0
+
+ // 瑙勮寖鎬х瓑绾�
+ var grade: String? = null
+
+ // 鏇存柊鏃堕棿
+ var updateTime: Date? = null
// 寰楀垎缁嗗垯
var details = mutableListOf<ScoreItem>()
@@ -69,12 +79,27 @@
fun calScore() {
details.forEach {
totalScore += it.maxScore
- if (it.gradeMode == "minus_mode") {
- score += (it.score + it.maxScore)
- } else if (it.gradeMode == "add_mode") {
- score += it.score
+ score += when (it.gradeMode) {
+ "minus_mode" -> {
+ (it.score + it.maxScore)
+ }
+ "add_mode" -> {
+ it.score
+ }
+ else -> {
+ (it.score + it.maxScore)
+ }
}
}
+ grade = when {
+ score >= 95 -> "瑙勮寖"
+ // 鍩烘湰瑙勮寖(90..94)鍜岃鑼冿紙>=95锛�
+ score >= 90 -> "鍩烘湰瑙勮寖"
+ // 涓嶈鑼�
+ score >= 50 -> "涓嶈鑼�"
+ // 涓ラ噸涓嶈鑼�
+ else -> "涓ラ噸涓嶈鑼�"
+ }
}
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt
index d45b1fa..a89e990 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/SubTaskSummary.kt
@@ -1,20 +1,37 @@
package cn.flightfeather.supervision.lightshare.vo
+import cn.flightfeather.supervision.domain.ds1.entity.Inspection
+import cn.flightfeather.supervision.domain.ds1.entity.Scense
+import cn.flightfeather.supervision.domain.ds1.entity.Subtask
+import java.math.BigDecimal
import java.util.*
class SubTaskSummary {
+ // 宸℃煡浠诲姟
var stGuid: String? = null
var stName: String? = null
- var insGuid: String? = null
- var sceneId: String? = null
- var sceneName: String? = null
- var sceneType: String? = null
var stPlanTime: Date? = null
var stStatus:String? = null
+ var subtask: Subtask? = null
+ // 宸℃煡鎵ц璁板綍
+ var insGuid: String? = null
+ var inspection: Inspection? = null
+
+ // 瀵瑰簲鍦烘櫙淇℃伅
+ var sceneId: String? = null
+ var sceneName: String? = null
+ var sceneTypeId: Byte? = null
+ var sceneType: String? = null
+ var sceneIndex: Int? = null
+ var longitude: BigDecimal? = null
+ var latitude: BigDecimal? = null
+ var location: String? = null
+ var scene: Scense? = null
+
+ // 闂鏁存敼鍙婂叾瀵瑰簲瀹℃牳鐨勮鏁�
var proNum = 0
var changeNum = 0
-
var proCheckedNum: Int = 0
var changeCheckedNum: Int = 0
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
index 8bb3c96..dca0a62 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
@@ -4,7 +4,6 @@
import cn.flightfeather.supervision.lightshare.service.SubtaskService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.TaskVo
-import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.format.annotation.DateTimeFormat
@@ -76,9 +75,9 @@
@ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫贰鏌ヤ换鍔$粺璁′俊鎭�")
@PostMapping("/summary/area")
- fun getSummaryByArea(
+ fun getTaskProgressByArea(
@RequestBody areaVo: AreaVo,
- ) = subtaskService.getSummaryByArea(areaVo)
+ ) = resPack { subtaskService.getTaskProgressByArea(areaVo) }
@ApiOperation("鑾峰彇鏌愪釜鍦烘櫙鐨勫贰鏌ヤ换鍔�")
@GetMapping("/byScene")
@@ -87,4 +86,10 @@
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") startTime: LocalDateTime?,
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") endTime: LocalDateTime?,
) = subtaskService.getByScene(sceneId, startTime, endTime)
+
+ @ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫贰鏌ヤ换鍔$粺璁′俊鎭�")
+ @PostMapping("/summary/area/problem")
+ fun getSummaryByArea(
+ @RequestBody areaVo: AreaVo,
+ ) = resPack { subtaskService.getSummaryByArea(areaVo) }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/scheduler/ScheduleService.kt b/src/main/kotlin/cn/flightfeather/supervision/scheduler/ScheduleService.kt
new file mode 100644
index 0000000..45ebef0
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/scheduler/ScheduleService.kt
@@ -0,0 +1,59 @@
+package cn.flightfeather.supervision.scheduler
+
+import cn.flightfeather.supervision.business.bgtask.AopTaskCtrl
+import cn.flightfeather.supervision.business.bgtask.TaskFinishSubtask
+import cn.flightfeather.supervision.business.bgtask.TaskFinishTopTask
+import cn.flightfeather.supervision.lightshare.vo.AreaVo
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+import org.springframework.scheduling.annotation.Async
+import org.springframework.scheduling.annotation.Scheduled
+import org.springframework.stereotype.Component
+import java.time.LocalDateTime
+
+/**
+ * 瀹氭椂浠诲姟璋冨害
+ * 涓�涓猚ron琛ㄨ揪寮忔湁鑷冲皯6涓紙涔熷彲鑳�7涓級鏈夌┖鏍煎垎闅旂殑鏃堕棿鍏冪礌銆傛寜椤哄簭渚濇涓猴細
+ * 绉掞紙0~59锛�
+ * 鍒嗛挓锛�0~59锛�
+ * 灏忔椂锛�0~23锛�
+ * 澶╋紙1~31锛�
+ * 鏈堬紙1~12锛�
+ * 鏄熸湡锛�1~7 1=SUN 鎴� SUN锛孧ON锛孴UE锛學ED锛孴HU锛孎RI锛孲AT锛�
+ */
+@Component
+class ScheduleService(
+ private val taskFinishSubtask: TaskFinishSubtask,
+ private val taskFinishTopTask: TaskFinishTopTask,
+ private val aopTaskCtrl: AopTaskCtrl,
+) {
+ val logger: Logger = LoggerFactory.getLogger(ScheduleService::class.java)
+
+ @Async
+ @Scheduled(cron = "0 0 0 * * *")
+ fun eachDay() {
+ logger.info("=====>>>>>姣忔棩浠诲姟鎵ц {}", System.currentTimeMillis())
+ taskFinishSubtask.handle()
+ logger.info("=====>>>>>姣忔棩浠诲姟缁撴潫 {}", System.currentTimeMillis())
+ }
+
+ @Async
+ @Scheduled(cron = "0 0 0 * * MON")
+ fun eachWeek() {
+ logger.info("=====>>>>>姣忓懆浠诲姟鎵ц {}", System.currentTimeMillis())
+ // 鎵ц涓婂懆鐨勮嚜璇勪换鍔�
+ aopTaskCtrl.startAllEvaluation(LocalDateTime.now())
+ logger.info("=====>>>>>姣忓懆浠诲姟缁撴潫 {}", System.currentTimeMillis())
+ }
+
+ @Async
+ @Scheduled(cron = "0 0 0 2 * *")
+ fun eachMonth() {
+ logger.info("=====>>>>>姣忔湀浠诲姟鎵ц {}", System.currentTimeMillis())
+ // 鎵ц涓婁釜鏈堢殑瀹屾暣鑷瘎浠诲姟
+ aopTaskCtrl.startAll(LocalDateTime.now().minusMonths(1))
+ // 鎵ц椤跺眰浠诲姟鑷姩缁撴潫浠诲姟
+ taskFinishTopTask.handle()
+ logger.info("=====>>>>>姣忔湀浠诲姟缁撴潫 {}", System.currentTimeMillis())
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index fe97bae..3818bca 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -71,8 +71,12 @@
# mybatis 閰嶇疆
mybatis:
- type-aliases-package: cn.flightfeather.supervision.domain.ds1.entity, cn.flightfeather.supervision.domain.ds2.entity
+ type-aliases-package: cn.flightfeather.supervision.domain.ds1.entity, cn.flightfeather.supervision.domain.ds2.entity, cn.flightfeather.supervision.domain.ds3.entity
mapper-locations: classpath*:mapper/**/*.xml
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ # log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+ # map-underscore-to-camel-case: true
## 閫氱敤 Mapper 閰嶇疆
#mappers 澶氫釜鎺ュ彛鏃堕�楀彿闅斿紑
@@ -83,7 +87,9 @@
#logging璺緞璁剧疆
logging:
- config: classpath:log4j2.xml
+# config: classpath:log4j2.xml
+ level:
+ cn.flightfeather.supervision.domain: debug
springfox:
documentation:
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index b996538..281c647 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -59,24 +59,28 @@
<!--鐒跺悗瀹氫箟logger锛屽彧鏈夊畾涔変簡logger骞跺紩鍏ョ殑appender锛宎ppender鎵嶄細鐢熸晥-->
<Loggers>
<!--杩囨护鎺塻pring鍜宮ybatis鐨勪竴浜涙棤鐢ㄧ殑DEBUG淇℃伅-->
- <logger name="org.springframework" level="INFO">
+ <logger name="org.springframework" level="ERROR">
<appender-ref ref="Console"/>
</logger>
<logger name="org.mybatis" level="DEBUG">
-<!-- <appender-ref ref="Console"/>-->
+ <appender-ref ref="Console"/>
</logger>
<logger name="org.apache.ibatis" level="DEBUG">
-<!-- <appender-ref ref="Console"/>-->
+ <appender-ref ref="Console"/>
</logger>
+ <Logger name="java.sql.PreparedStatement" level="DEBUG" >
+ <appender-ref ref="Console"/>
+ </Logger>
<logger name="cn.flightfeather.supervision" level="INFO" includeLocation="true" additivity="false">
<appender-ref ref="Console"/>
+ <appender-ref ref="RollingFileInfo"/>
</logger>
<root level="all">
- <!--<appender-ref ref="Console"/>-->
-<!-- <appender-ref ref="RollingFileInfo"/>-->
-<!-- <appender-ref ref="RollingFileWarn"/>-->
+ <appender-ref ref="Console"/>
+ <appender-ref ref="RollingFileInfo"/>
+ <appender-ref ref="RollingFileWarn"/>
<appender-ref ref="RollingFileError"/>
</root>
</Loggers>
diff --git a/src/main/resources/mapper/ds1/EvaluationMapper.xml b/src/main/resources/mapper/ds1/EvaluationMapper.xml
index 2be5553..11fbaf9 100644
--- a/src/main/resources/mapper/ds1/EvaluationMapper.xml
+++ b/src/main/resources/mapper/ds1/EvaluationMapper.xml
@@ -57,6 +57,7 @@
<result column="userId" jdbcType="VARCHAR" property="userId"/>
<result column="userName" jdbcType="VARCHAR" property="userName"/>
<result column="isEnable" jdbcType="BIT" property="isEnable"/>
+ <result column="sceneIndex" property="sceneIndex" jdbcType="INTEGER" />
<result column="sceneId" jdbcType="VARCHAR" property="sceneId"/>
<result column="sceneName" jdbcType="VARCHAR" property="sceneName"/>
<result column="pName" jdbcType="VARCHAR" property="pName"/>
@@ -73,6 +74,7 @@
c.UI_GUID AS userId,
c.UI_RealName AS userName,
c.UI_IsEnable AS isEnable,
+ b.S_Index AS sceneIndex,
b.S_GUID AS sceneId,
b.S_Name AS sceneName,
b.S_ProvinceName AS pName,
diff --git a/src/main/resources/mapper/ds1/InspectionMapper.xml b/src/main/resources/mapper/ds1/InspectionMapper.xml
index 66fdc3c..c606054 100644
--- a/src/main/resources/mapper/ds1/InspectionMapper.xml
+++ b/src/main/resources/mapper/ds1/InspectionMapper.xml
@@ -8,34 +8,34 @@
<id column="I_GUID" property="guid" jdbcType="VARCHAR" />
<result column="ST_GUID" property="stguid" jdbcType="VARCHAR" />
<result column="S_GUID" property="sguid" jdbcType="VARCHAR" />
- <result column="I_ScenseName" property="iScensename" jdbcType="VARCHAR" />
- <result column="I_ScenseAddress" property="iScenseaddress" jdbcType="VARCHAR" />
- <result column="I_IsTogether" property="iIstogether" jdbcType="BIT" />
- <result column="I_EntourageT" property="iEntouraget" jdbcType="VARCHAR" />
- <result column="I_EntourageWX" property="iEntouragewx" jdbcType="VARCHAR" />
- <result column="I_Entourage" property="iEntourage" jdbcType="VARCHAR" />
- <result column="I_ExecutionStartTime" property="iExecutionstarttime" jdbcType="TIMESTAMP" />
- <result column="I_ExecutionEndTime" property="iExecutionendtime" jdbcType="TIMESTAMP" />
- <result column="I_ProblemCount" property="iProblemcount" jdbcType="INTEGER" />
- <result column="I_IsRechecked" property="iIsrechecked" jdbcType="BIT" />
- <result column="I_RecheckCount" property="iRecheckcount" jdbcType="INTEGER" />
- <result column="I_PromissedNum" property="iPromissednum" jdbcType="INTEGER" />
- <result column="I_ChangedNum" property="iChangednum" jdbcType="INTEGER" />
- <result column="I_IsChanged" property="iIschanged" jdbcType="BIT" />
- <result column="I_IsRvaluated" property="iIsrvaluated" jdbcType="BIT" />
- <result column="I_isPromissed" property="iIspromissed" jdbcType="BIT" />
- <result column="I_PromissedTime" property="iPromissedtime" jdbcType="TIMESTAMP" />
- <result column="I_PromissedUserGUID" property="iPromisseduserguid" jdbcType="VARCHAR" />
- <result column="I_PromissedUserName" property="iPromissedusername" jdbcType="VARCHAR" />
- <result column="I_PromissedUserRealName" property="iPromisseduserrealname" jdbcType="VARCHAR" />
- <result column="I_PromissedWay" property="iPromissedway" jdbcType="VARCHAR" />
- <result column="I_PromissedDeadline" property="iPromisseddeadline" jdbcType="TIMESTAMP" />
- <result column="I_PromissBookPath" property="iPromissbookpath" jdbcType="VARCHAR" />
- <result column="I_SignPath" property="iSignpath" jdbcType="VARCHAR" />
- <result column="I_Extension1" property="iExtension1" jdbcType="VARCHAR" />
- <result column="I_Extension2" property="iExtension2" jdbcType="VARCHAR" />
- <result column="I_Extension3" property="iExtension3" jdbcType="VARCHAR" />
- <result column="I_Remark" property="iRemark" jdbcType="VARCHAR" />
+ <result column="I_ScenseName" property="scensename" jdbcType="VARCHAR" />
+ <result column="I_ScenseAddress" property="scenseaddress" jdbcType="VARCHAR" />
+ <result column="I_IsTogether" property="istogether" jdbcType="BIT" />
+ <result column="I_EntourageT" property="entouraget" jdbcType="VARCHAR" />
+ <result column="I_EntourageWX" property="entouragewx" jdbcType="VARCHAR" />
+ <result column="I_Entourage" property="entourage" jdbcType="VARCHAR" />
+ <result column="I_ExecutionStartTime" property="executionstarttime" jdbcType="TIMESTAMP" />
+ <result column="I_ExecutionEndTime" property="executionendtime" jdbcType="TIMESTAMP" />
+ <result column="I_ProblemCount" property="problemcount" jdbcType="INTEGER" />
+ <result column="I_IsRechecked" property="isrechecked" jdbcType="BIT" />
+ <result column="I_RecheckCount" property="recheckcount" jdbcType="INTEGER" />
+ <result column="I_PromissedNum" property="promissednum" jdbcType="INTEGER" />
+ <result column="I_ChangedNum" property="changednum" jdbcType="INTEGER" />
+ <result column="I_IsChanged" property="ischanged" jdbcType="BIT" />
+ <result column="I_IsRvaluated" property="isrvaluated" jdbcType="BIT" />
+ <result column="I_isPromissed" property="ispromissed" jdbcType="BIT" />
+ <result column="I_PromissedTime" property="promissedtime" jdbcType="TIMESTAMP" />
+ <result column="I_PromissedUserGUID" property="promisseduserguid" jdbcType="VARCHAR" />
+ <result column="I_PromissedUserName" property="promissedusername" jdbcType="VARCHAR" />
+ <result column="I_PromissedUserRealName" property="promisseduserrealname" jdbcType="VARCHAR" />
+ <result column="I_PromissedWay" property="promissedway" jdbcType="VARCHAR" />
+ <result column="I_PromissedDeadline" property="promisseddeadline" jdbcType="TIMESTAMP" />
+ <result column="I_PromissBookPath" property="promissbookpath" jdbcType="VARCHAR" />
+ <result column="I_SignPath" property="signpath" jdbcType="VARCHAR" />
+ <result column="I_Extension1" property="extension1" jdbcType="VARCHAR" />
+ <result column="I_Extension2" property="extension2" jdbcType="VARCHAR" />
+ <result column="I_Extension3" property="extension3" jdbcType="VARCHAR" />
+ <result column="I_Remark" property="remark" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
diff --git a/src/main/resources/mapper/ds1/SubtaskMapper.xml b/src/main/resources/mapper/ds1/SubtaskMapper.xml
index e3ddd41..e3a8cfe 100644
--- a/src/main/resources/mapper/ds1/SubtaskMapper.xml
+++ b/src/main/resources/mapper/ds1/SubtaskMapper.xml
@@ -1,185 +1,247 @@
<?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.SubtaskMapper" >
- <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.Subtask" >
- <!--
- WARNING - @mbg.generated
- -->
- <id column="ST_GUID" property="stguid" jdbcType="VARCHAR" />
- <result column="T_GUID" property="tguid" jdbcType="VARCHAR" />
- <result column="TS_GUID" property="tsguid" jdbcType="VARCHAR" />
- <result column="ST_name" property="name" jdbcType="VARCHAR" />
- <result column="ST_Priority" property="priority" jdbcType="BIT" />
- <result column="ST_TypeNo" property="typeno" jdbcType="TINYINT" />
- <result column="ST_Type" property="type" jdbcType="VARCHAR" />
- <result column="ST_ProvinceCode" property="provincecode" jdbcType="VARCHAR" />
- <result column="ST_ProvinceName" property="provincename" jdbcType="VARCHAR" />
- <result column="ST_CityCode" property="citycode" jdbcType="VARCHAR" />
- <result column="ST_CityName" property="cityname" jdbcType="VARCHAR" />
- <result column="ST_DistrictCode" property="districtcode" jdbcType="VARCHAR" />
- <result column="ST_DistrictName" property="districtname" jdbcType="VARCHAR" />
- <result column="ST_TownCode" property="towncode" jdbcType="VARCHAR" />
- <result column="ST_TownName" property="townname" jdbcType="VARCHAR" />
- <result column="ST_ScenseName" property="scensename" jdbcType="VARCHAR" />
- <result column="ST_ScenseID" property="scenseid" jdbcType="VARCHAR" />
- <result column="ST_ScenseAddress" property="scenseaddress" jdbcType="VARCHAR" />
- <result column="ST_DeadLineType" property="deadlinetype" jdbcType="VARCHAR" />
- <result column="ST_PlanStartTime" property="planstarttime" jdbcType="TIMESTAMP" />
- <result column="ST_PlanEndTime" property="planendtime" jdbcType="TIMESTAMP" />
- <result column="ST_DeployerGUID" property="deployerguid" jdbcType="VARCHAR" />
- <result column="ST_DeployerUserName" property="deployerusername" jdbcType="VARCHAR" />
- <result column="ST_DeployerRealName" property="deployerrealname" jdbcType="VARCHAR" />
- <result column="ST_DeployTime" property="deploytime" jdbcType="TIMESTAMP" />
- <result column="ST_ExecutionStartTime" property="executionstarttime" jdbcType="TIMESTAMP" />
- <result column="ST_ExecutionEndTime" property="executionendtime" jdbcType="TIMESTAMP" />
- <result column="ST_ExecutorGUIDs" property="executorguids" jdbcType="VARCHAR" />
- <result column="ST_ExecutorUserNames" property="executorusernames" jdbcType="VARCHAR" />
- <result column="ST_ExecutorRealTimes" property="executorrealtimes" jdbcType="VARCHAR" />
- <result column="ST_Status" property="status" jdbcType="VARCHAR" />
- <result column="ST_NotifedCount" property="notifedcount" jdbcType="INTEGER" />
- <result column="ST_RuleList" property="rulelist" jdbcType="VARCHAR" />
- <result column="ST_AssessorGUID" property="stAssessorguid" jdbcType="VARCHAR" />
- <result column="ST_AssessorUserName" property="assessorusername" jdbcType="VARCHAR" />
- <result column="ST_AssessorRealName" property="assessorrealname" jdbcType="VARCHAR" />
- <result column="ST_AssessTime" property="assesstime" jdbcType="TIMESTAMP" />
- <result column="ST_AssessResult" property="assessresult" jdbcType="VARCHAR" />
- <result column="ST_ThirdAssessorGUID" property="thirdassessorguid" jdbcType="VARCHAR" />
- <result column="ST_ThirdAssessorUserName" property="thirdassessorusername" jdbcType="VARCHAR" />
- <result column="ST_ThirdAssessorRealName" property="thirdassessorrealname" jdbcType="VARCHAR" />
- <result column="ST_ThirdAssessTime" property="thirdassesstime" jdbcType="TIMESTAMP" />
- <result column="ST_ThirdAssessResult" property="thirdassessresult" jdbcType="VARCHAR" />
- <result column="ST_Extension1" property="extension1" jdbcType="VARCHAR" />
- <result column="ST_Extension2" property="extension2" jdbcType="VARCHAR" />
- <result column="ST_Extension3" property="extension3" jdbcType="VARCHAR" />
- <result column="ST_Remark" property="remark" jdbcType="VARCHAR" />
- </resultMap>
-
- <resultMap id="SubtaskSearchResultVo" type="cn.flightfeather.supervision.lightshare.vo.SubtaskSearchResultVo">
- <result column="subTaskId" property="subTaskId" jdbcType="VARCHAR" />
- <result column="districtName" property="districtName" jdbcType="VARCHAR" />
- <result column="townName" property="townName" jdbcType="VARCHAR" />
- <result column="sceneId" property="sceneId" jdbcType="VARCHAR" />
- <result column="sceneName" property="sceneName" jdbcType="VARCHAR" />
- <result column="sceneTypeId" property="sceneTypeId" jdbcType="TINYINT" />
- <result column="sceneType" property="sceneType" jdbcType="VARCHAR" />
- <result column="sceneAddress" property="sceneAddress" jdbcType="VARCHAR" />
- <result column="planStartTime" property="planStartTime" jdbcType="TIMESTAMP" />
- <result column="planEndTime" property="planEndTime" jdbcType="TIMESTAMP" />
- <result column="status" property="status" jdbcType="VARCHAR" />
- <result column="path" property="path" jdbcType="VARCHAR" />
- </resultMap>
-
- <resultMap id="SubTaskSearchResultVo2" type="cn.flightfeather.supervision.lightshare.vo.SubTaskSearchResultVo2">
- <result column="subTaskId" property="subTaskId" jdbcType="VARCHAR" />
- <result column="districtName" property="districtName" jdbcType="VARCHAR" />
- <result column="townName" property="townName" jdbcType="VARCHAR" />
- <result column="sceneId" property="sceneId" jdbcType="VARCHAR" />
- <result column="sceneName" property="sceneName" jdbcType="VARCHAR" />
- <result column="sceneTypeId" property="sceneTypeId" jdbcType="TINYINT" />
- <result column="sceneType" property="sceneType" jdbcType="VARCHAR" />
- <result column="sceneAddress" property="sceneAddress" jdbcType="VARCHAR" />
- <result column="planStartTime" property="planStartTime" jdbcType="TIMESTAMP" />
- <result column="planEndTime" property="planEndTime" jdbcType="TIMESTAMP" />
- <result column="status" property="status" jdbcType="VARCHAR" />
- <result column="path" property="path" jdbcType="VARCHAR" />
-
- <result column="problemId" property="problemId" jdbcType="VARCHAR" />
- <result column="problemName" property="problemName" jdbcType="VARCHAR" />
- <result column="problemCode" property="problemCode" jdbcType="VARCHAR" />
- <result column="longitude" property="longitude" jdbcType="DECIMAL" />
- <result column="latitude" property="latitude" jdbcType="DECIMAL" />
- <result column="location" property="location" jdbcType="VARCHAR" />
- <result column="rectification" property="rectification" jdbcType="BIT" />
- <result column="rectificationTime" property="rectificationTime" jdbcType="TIMESTAMP" />
- <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
-
- <result column="mGuid" property="mGuid" jdbcType="VARCHAR" />
- <result column="mExtension1" property="mExtension1" jdbcType="VARCHAR" />
- <result column="isChanged" property="isChanged" jdbcType="BIT" />
- </resultMap>
-
- <resultMap id="SubtaskVoMap" type="cn.flightfeather.supervision.lightshare.vo.SubtaskVo" >
- <id column="ST_GUID" property="stguid" jdbcType="VARCHAR" />
- <result column="T_GUID" property="tguid" jdbcType="VARCHAR" />
- <result column="TS_GUID" property="tsguid" jdbcType="VARCHAR" />
- <result column="ST_name" property="name" jdbcType="VARCHAR" />
- <result column="ST_Priority" property="priority" jdbcType="BIT" />
- <result column="ST_TypeNo" property="typeno" jdbcType="TINYINT" />
- <result column="ST_Type" property="type" jdbcType="VARCHAR" />
- <result column="ST_ProvinceCode" property="provincecode" jdbcType="VARCHAR" />
- <result column="ST_ProvinceName" property="provincename" jdbcType="VARCHAR" />
- <result column="ST_CityCode" property="citycode" jdbcType="VARCHAR" />
- <result column="ST_CityName" property="cityname" jdbcType="VARCHAR" />
- <result column="ST_DistrictCode" property="districtcode" jdbcType="VARCHAR" />
- <result column="ST_DistrictName" property="districtname" jdbcType="VARCHAR" />
- <result column="ST_TownCode" property="towncode" jdbcType="VARCHAR" />
- <result column="ST_TownName" property="townname" jdbcType="VARCHAR" />
- <result column="ST_ScenseName" property="scensename" jdbcType="VARCHAR" />
- <result column="S_TypeID" property="scenseTypeId" jdbcType="VARCHAR" />
- <result column="ST_ScenseID" property="scenseid" jdbcType="VARCHAR" />
- <result column="ST_ScenseAddress" property="scenseaddress" jdbcType="VARCHAR" />
- <result column="ST_DeadLineType" property="deadlinetype" jdbcType="VARCHAR" />
- <result column="ST_PlanStartTime" property="planstarttime" jdbcType="TIMESTAMP" />
- <result column="ST_PlanEndTime" property="planendtime" jdbcType="TIMESTAMP" />
- <result column="ST_DeployerGUID" property="deployerguid" jdbcType="VARCHAR" />
- <result column="ST_DeployerUserName" property="deployerusername" jdbcType="VARCHAR" />
- <result column="ST_DeployerRealName" property="deployerrealname" jdbcType="VARCHAR" />
- <result column="ST_DeployTime" property="deploytime" jdbcType="TIMESTAMP" />
- <result column="ST_ExecutionStartTime" property="executionstarttime" jdbcType="TIMESTAMP" />
- <result column="ST_ExecutionEndTime" property="executionendtime" jdbcType="TIMESTAMP" />
- <result column="ST_ExecutorGUIDs" property="executorguids" jdbcType="VARCHAR" />
- <result column="ST_ExecutorUserNames" property="executorusernames" jdbcType="VARCHAR" />
- <result column="ST_ExecutorRealTimes" property="executorrealtimes" jdbcType="VARCHAR" />
- <result column="ST_Status" property="status" jdbcType="VARCHAR" />
- <result column="ST_NotifedCount" property="notifedcount" jdbcType="INTEGER" />
- <result column="ST_RuleList" property="rulelist" jdbcType="VARCHAR" />
- <result column="ST_AssessorGUID" property="stAssessorguid" jdbcType="VARCHAR" />
- <result column="ST_AssessorUserName" property="assessorusername" jdbcType="VARCHAR" />
- <result column="ST_AssessorRealName" property="assessorrealname" jdbcType="VARCHAR" />
- <result column="ST_AssessTime" property="assesstime" jdbcType="TIMESTAMP" />
- <result column="ST_AssessResult" property="assessresult" jdbcType="VARCHAR" />
- <result column="ST_ThirdAssessorGUID" property="thirdassessorguid" jdbcType="VARCHAR" />
- <result column="ST_ThirdAssessorUserName" property="thirdassessorusername" jdbcType="VARCHAR" />
- <result column="ST_ThirdAssessorRealName" property="thirdassessorrealname" jdbcType="VARCHAR" />
- <result column="ST_ThirdAssessTime" property="thirdassesstime" jdbcType="TIMESTAMP" />
- <result column="ST_ThirdAssessResult" property="thirdassessresult" jdbcType="VARCHAR" />
- <result column="ST_Extension1" property="extension1" jdbcType="VARCHAR" />
- <result column="ST_Extension2" property="extension2" jdbcType="VARCHAR" />
- <result column="ST_Extension3" property="extension3" jdbcType="VARCHAR" />
- <result column="ST_Remark" property="remark" jdbcType="VARCHAR" />
+<mapper namespace="cn.flightfeather.supervision.domain.ds1.mapper.SubtaskMapper">
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.Subtask">
+ <!--
+ WARNING - @mbg.generated
+ -->
+ <id column="ST_GUID" property="stguid" jdbcType="VARCHAR"/>
+ <result column="T_GUID" property="tguid" jdbcType="VARCHAR"/>
+ <result column="TS_GUID" property="tsguid" jdbcType="VARCHAR"/>
+ <result column="ST_name" property="name" jdbcType="VARCHAR"/>
+ <result column="ST_Priority" property="priority" jdbcType="BIT"/>
+ <result column="ST_TypeNo" property="typeno" jdbcType="TINYINT"/>
+ <result column="ST_Type" property="type" jdbcType="VARCHAR"/>
+ <result column="ST_ProvinceCode" property="provincecode" jdbcType="VARCHAR"/>
+ <result column="ST_ProvinceName" property="provincename" jdbcType="VARCHAR"/>
+ <result column="ST_CityCode" property="citycode" jdbcType="VARCHAR"/>
+ <result column="ST_CityName" property="cityname" jdbcType="VARCHAR"/>
+ <result column="ST_DistrictCode" property="districtcode" jdbcType="VARCHAR"/>
+ <result column="ST_DistrictName" property="districtname" jdbcType="VARCHAR"/>
+ <result column="ST_TownCode" property="towncode" jdbcType="VARCHAR"/>
+ <result column="ST_TownName" property="townname" jdbcType="VARCHAR"/>
+ <result column="ST_ScenseName" property="scensename" jdbcType="VARCHAR"/>
+ <result column="ST_ScenseID" property="scenseid" jdbcType="VARCHAR"/>
+ <result column="ST_ScenseAddress" property="scenseaddress" jdbcType="VARCHAR"/>
+ <result column="ST_DeadLineType" property="deadlinetype" jdbcType="VARCHAR"/>
+ <result column="ST_PlanStartTime" property="planstarttime" jdbcType="TIMESTAMP"/>
+ <result column="ST_PlanEndTime" property="planendtime" jdbcType="TIMESTAMP"/>
+ <result column="ST_DeployerGUID" property="deployerguid" jdbcType="VARCHAR"/>
+ <result column="ST_DeployerUserName" property="deployerusername" jdbcType="VARCHAR"/>
+ <result column="ST_DeployerRealName" property="deployerrealname" jdbcType="VARCHAR"/>
+ <result column="ST_DeployTime" property="deploytime" jdbcType="TIMESTAMP"/>
+ <result column="ST_ExecutionStartTime" property="executionstarttime" jdbcType="TIMESTAMP"/>
+ <result column="ST_ExecutionEndTime" property="executionendtime" jdbcType="TIMESTAMP"/>
+ <result column="ST_ExecutorGUIDs" property="executorguids" jdbcType="VARCHAR"/>
+ <result column="ST_ExecutorUserNames" property="executorusernames" jdbcType="VARCHAR"/>
+ <result column="ST_ExecutorRealTimes" property="executorrealtimes" jdbcType="VARCHAR"/>
+ <result column="ST_Status" property="status" jdbcType="VARCHAR"/>
+ <result column="ST_NotifedCount" property="notifedcount" jdbcType="INTEGER"/>
+ <result column="ST_RuleList" property="rulelist" jdbcType="VARCHAR"/>
+ <result column="ST_AssessorGUID" property="stAssessorguid" jdbcType="VARCHAR"/>
+ <result column="ST_AssessorUserName" property="assessorusername" jdbcType="VARCHAR"/>
+ <result column="ST_AssessorRealName" property="assessorrealname" jdbcType="VARCHAR"/>
+ <result column="ST_AssessTime" property="assesstime" jdbcType="TIMESTAMP"/>
+ <result column="ST_AssessResult" property="assessresult" jdbcType="VARCHAR"/>
+ <result column="ST_ThirdAssessorGUID" property="thirdassessorguid" jdbcType="VARCHAR"/>
+ <result column="ST_ThirdAssessorUserName" property="thirdassessorusername" jdbcType="VARCHAR"/>
+ <result column="ST_ThirdAssessorRealName" property="thirdassessorrealname" jdbcType="VARCHAR"/>
+ <result column="ST_ThirdAssessTime" property="thirdassesstime" jdbcType="TIMESTAMP"/>
+ <result column="ST_ThirdAssessResult" property="thirdassessresult" jdbcType="VARCHAR"/>
+ <result column="ST_Extension1" property="extension1" jdbcType="VARCHAR"/>
+ <result column="ST_Extension2" property="extension2" jdbcType="VARCHAR"/>
+ <result column="ST_Extension3" property="extension3" jdbcType="VARCHAR"/>
+ <result column="ST_Remark" property="remark" jdbcType="VARCHAR"/>
</resultMap>
- <resultMap id="SubTaskSummary" type="cn.flightfeather.supervision.lightshare.vo.SubTaskSummary" >
- <result column="ST_GUID" property="stGuid" jdbcType="VARCHAR" />
- <result column="ST_name" property="stName" jdbcType="VARCHAR" />
- <result column="ST_PlanStartTime" property="stPlanTime" jdbcType="TIMESTAMP" />
- <result column="ST_Status" property="stStatus" jdbcType="VARCHAR" />
- <result column="S_GUID" property="sceneId" jdbcType="VARCHAR" />
- <result column="S_Name" property="sceneName" jdbcType="VARCHAR" />
- <result column="S_Type" property="sceneType" jdbcType="VARCHAR" />
- <result column="I_GUID" property="insGuid" jdbcType="VARCHAR" />
- <result column="proNum" property="proNum" jdbcType="INTEGER" />
- <result column="changeNum" property="changeNum" jdbcType="INTEGER" />
- <result column="proCheckedNum" property="proCheckedNum" jdbcType="INTEGER" />
- <result column="changeCheckedNum" property="changeCheckedNum" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- <!--
- WARNING - @mbg.generated
- -->
- ST_GUID, T_GUID, TS_GUID, ST_name, ST_Priority, ST_TypeNo, ST_Type, ST_ProvinceCode,
- ST_ProvinceName, ST_CityCode, ST_CityName, ST_DistrictCode, ST_DistrictName, ST_TownCode,
- ST_TownName, ST_ScenseName, ST_ScenseID, ST_ScenseAddress, ST_DeadLineType, ST_PlanStartTime,
- ST_PlanEndTime, ST_DeployerGUID, ST_DeployerUserName, ST_DeployerRealName, ST_DeployTime,
- ST_ExecutionStartTime, ST_ExecutionEndTime, ST_ExecutorGUIDs, ST_ExecutorUserNames,
- ST_ExecutorRealTimes, ST_Status, ST_NotifedCount, ST_RuleList, ST_AssessorGUID, ST_AssessorUserName,
- ST_AssessorRealName, ST_AssessTime, ST_AssessResult, ST_ThirdAssessorGUID, ST_ThirdAssessorUserName,
- ST_ThirdAssessorRealName, ST_ThirdAssessTime, ST_ThirdAssessResult, ST_Extension1,
- ST_Extension2, ST_Extension3, ST_Remark
- </sql>
+ <sql id="Base_Column_List">
+ <!--
+ WARNING - @mbg.generated
+ -->
+ ST_GUID, T_GUID, TS_GUID, ST_name, ST_Priority, ST_TypeNo, ST_Type, ST_ProvinceCode,
+ ST_ProvinceName, ST_CityCode, ST_CityName, ST_DistrictCode, ST_DistrictName, ST_TownCode,
+ ST_TownName, ST_ScenseName, ST_ScenseID, ST_ScenseAddress, ST_DeadLineType, ST_PlanStartTime,
+ ST_PlanEndTime, ST_DeployerGUID, ST_DeployerUserName, ST_DeployerRealName, ST_DeployTime,
+ ST_ExecutionStartTime, ST_ExecutionEndTime, ST_ExecutorGUIDs, ST_ExecutorUserNames,
+ ST_ExecutorRealTimes, ST_Status, ST_NotifedCount, ST_RuleList, ST_AssessorGUID, ST_AssessorUserName,
+ ST_AssessorRealName, ST_AssessTime, ST_AssessResult, ST_ThirdAssessorGUID, ST_ThirdAssessorUserName,
+ ST_ThirdAssessorRealName, ST_ThirdAssessTime, ST_ThirdAssessResult, ST_Extension1,
+ ST_Extension2, ST_Extension3, ST_Remark
+ </sql>
- <select id="getSubtask" resultMap="SubtaskSearchResultVo">
- SELECT
+ <resultMap id="SubtaskSearchResultVo" type="cn.flightfeather.supervision.lightshare.vo.SubtaskSearchResultVo">
+ <result column="subTaskId" property="subTaskId" jdbcType="VARCHAR"/>
+ <result column="districtName" property="districtName" jdbcType="VARCHAR"/>
+ <result column="townName" property="townName" jdbcType="VARCHAR"/>
+ <result column="sceneId" property="sceneId" jdbcType="VARCHAR"/>
+ <result column="sceneName" property="sceneName" jdbcType="VARCHAR"/>
+ <result column="sceneTypeId" property="sceneTypeId" jdbcType="TINYINT"/>
+ <result column="sceneType" property="sceneType" jdbcType="VARCHAR"/>
+ <result column="sceneAddress" property="sceneAddress" jdbcType="VARCHAR"/>
+ <result column="planStartTime" property="planStartTime" jdbcType="TIMESTAMP"/>
+ <result column="planEndTime" property="planEndTime" jdbcType="TIMESTAMP"/>
+ <result column="status" property="status" jdbcType="VARCHAR"/>
+ <result column="path" property="path" jdbcType="VARCHAR"/>
+ </resultMap>
+ <resultMap id="SubTaskSearchResultVo2" type="cn.flightfeather.supervision.lightshare.vo.SubTaskSearchResultVo2">
+ <result column="subTaskId" property="subTaskId" jdbcType="VARCHAR"/>
+ <result column="districtName" property="districtName" jdbcType="VARCHAR"/>
+ <result column="townName" property="townName" jdbcType="VARCHAR"/>
+ <result column="sceneId" property="sceneId" jdbcType="VARCHAR"/>
+ <result column="sceneName" property="sceneName" jdbcType="VARCHAR"/>
+ <result column="sceneTypeId" property="sceneTypeId" jdbcType="TINYINT"/>
+ <result column="sceneType" property="sceneType" jdbcType="VARCHAR"/>
+ <result column="sceneAddress" property="sceneAddress" jdbcType="VARCHAR"/>
+ <result column="planStartTime" property="planStartTime" jdbcType="TIMESTAMP"/>
+ <result column="planEndTime" property="planEndTime" jdbcType="TIMESTAMP"/>
+ <result column="status" property="status" jdbcType="VARCHAR"/>
+ <result column="path" property="path" jdbcType="VARCHAR"/>
+
+ <result column="problemId" property="problemId" jdbcType="VARCHAR"/>
+ <result column="problemName" property="problemName" jdbcType="VARCHAR"/>
+ <result column="problemCode" property="problemCode" jdbcType="VARCHAR"/>
+ <result column="longitude" property="longitude" jdbcType="DECIMAL"/>
+ <result column="latitude" property="latitude" jdbcType="DECIMAL"/>
+ <result column="location" property="location" jdbcType="VARCHAR"/>
+ <result column="rectification" property="rectification" jdbcType="BIT"/>
+ <result column="rectificationTime" property="rectificationTime" jdbcType="TIMESTAMP"/>
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP"/>
+
+ <result column="mGuid" property="mGuid" jdbcType="VARCHAR"/>
+ <result column="mExtension1" property="mExtension1" jdbcType="VARCHAR"/>
+ <result column="isChanged" property="isChanged" jdbcType="BIT"/>
+ </resultMap>
+ <resultMap id="SubtaskVoMap" type="cn.flightfeather.supervision.lightshare.vo.SubtaskVo">
+ <id column="ST_GUID" property="stguid" jdbcType="VARCHAR"/>
+ <result column="T_GUID" property="tguid" jdbcType="VARCHAR"/>
+ <result column="TS_GUID" property="tsguid" jdbcType="VARCHAR"/>
+ <result column="ST_name" property="name" jdbcType="VARCHAR"/>
+ <result column="ST_Priority" property="priority" jdbcType="BIT"/>
+ <result column="ST_TypeNo" property="typeno" jdbcType="TINYINT"/>
+ <result column="ST_Type" property="type" jdbcType="VARCHAR"/>
+ <result column="ST_ProvinceCode" property="provincecode" jdbcType="VARCHAR"/>
+ <result column="ST_ProvinceName" property="provincename" jdbcType="VARCHAR"/>
+ <result column="ST_CityCode" property="citycode" jdbcType="VARCHAR"/>
+ <result column="ST_CityName" property="cityname" jdbcType="VARCHAR"/>
+ <result column="ST_DistrictCode" property="districtcode" jdbcType="VARCHAR"/>
+ <result column="ST_DistrictName" property="districtname" jdbcType="VARCHAR"/>
+ <result column="ST_TownCode" property="towncode" jdbcType="VARCHAR"/>
+ <result column="ST_TownName" property="townname" jdbcType="VARCHAR"/>
+ <result column="ST_ScenseName" property="scensename" jdbcType="VARCHAR"/>
+ <result column="S_TypeID" property="scenseTypeId" jdbcType="VARCHAR"/>
+ <result column="ST_ScenseID" property="scenseid" jdbcType="VARCHAR"/>
+ <result column="ST_ScenseAddress" property="scenseaddress" jdbcType="VARCHAR"/>
+ <result column="ST_DeadLineType" property="deadlinetype" jdbcType="VARCHAR"/>
+ <result column="ST_PlanStartTime" property="planstarttime" jdbcType="TIMESTAMP"/>
+ <result column="ST_PlanEndTime" property="planendtime" jdbcType="TIMESTAMP"/>
+ <result column="ST_DeployerGUID" property="deployerguid" jdbcType="VARCHAR"/>
+ <result column="ST_DeployerUserName" property="deployerusername" jdbcType="VARCHAR"/>
+ <result column="ST_DeployerRealName" property="deployerrealname" jdbcType="VARCHAR"/>
+ <result column="ST_DeployTime" property="deploytime" jdbcType="TIMESTAMP"/>
+ <result column="ST_ExecutionStartTime" property="executionstarttime" jdbcType="TIMESTAMP"/>
+ <result column="ST_ExecutionEndTime" property="executionendtime" jdbcType="TIMESTAMP"/>
+ <result column="ST_ExecutorGUIDs" property="executorguids" jdbcType="VARCHAR"/>
+ <result column="ST_ExecutorUserNames" property="executorusernames" jdbcType="VARCHAR"/>
+ <result column="ST_ExecutorRealTimes" property="executorrealtimes" jdbcType="VARCHAR"/>
+ <result column="ST_Status" property="status" jdbcType="VARCHAR"/>
+ <result column="ST_NotifedCount" property="notifedcount" jdbcType="INTEGER"/>
+ <result column="ST_RuleList" property="rulelist" jdbcType="VARCHAR"/>
+ <result column="ST_AssessorGUID" property="stAssessorguid" jdbcType="VARCHAR"/>
+ <result column="ST_AssessorUserName" property="assessorusername" jdbcType="VARCHAR"/>
+ <result column="ST_AssessorRealName" property="assessorrealname" jdbcType="VARCHAR"/>
+ <result column="ST_AssessTime" property="assesstime" jdbcType="TIMESTAMP"/>
+ <result column="ST_AssessResult" property="assessresult" jdbcType="VARCHAR"/>
+ <result column="ST_ThirdAssessorGUID" property="thirdassessorguid" jdbcType="VARCHAR"/>
+ <result column="ST_ThirdAssessorUserName" property="thirdassessorusername" jdbcType="VARCHAR"/>
+ <result column="ST_ThirdAssessorRealName" property="thirdassessorrealname" jdbcType="VARCHAR"/>
+ <result column="ST_ThirdAssessTime" property="thirdassesstime" jdbcType="TIMESTAMP"/>
+ <result column="ST_ThirdAssessResult" property="thirdassessresult" jdbcType="VARCHAR"/>
+ <result column="ST_Extension1" property="extension1" jdbcType="VARCHAR"/>
+ <result column="ST_Extension2" property="extension2" jdbcType="VARCHAR"/>
+ <result column="ST_Extension3" property="extension3" jdbcType="VARCHAR"/>
+ <result column="ST_Remark" property="remark" jdbcType="VARCHAR"/>
+ </resultMap>
+ <resultMap id="SubTaskSummary" type="cn.flightfeather.supervision.lightshare.vo.SubTaskSummary">
+ <result column="ST_GUID" property="stGuid" jdbcType="VARCHAR"/>
+ <result column="ST_name" property="stName" jdbcType="VARCHAR"/>
+ <result column="ST_PlanStartTime" property="stPlanTime" jdbcType="TIMESTAMP"/>
+ <result column="ST_Status" property="stStatus" jdbcType="VARCHAR"/>
+ <result column="S_GUID" property="sceneId" jdbcType="VARCHAR"/>
+ <result column="S_Name" property="sceneName" jdbcType="VARCHAR"/>
+ <result column="S_TypeID" property="sceneTypeId" jdbcType="TINYINT"/>
+ <result column="S_Type" property="sceneType" jdbcType="VARCHAR"/>
+ <result column="S_Location" property="location" jdbcType="VARCHAR"/>
+ <result column="S_Longitude" property="longitude" jdbcType="DECIMAL"/>
+ <result column="S_Latitude" property="latitude" jdbcType="DECIMAL"/>
+ <result column="S_Index" property="sceneIndex" jdbcType="INTEGER"/>
+ <result column="I_GUID" property="insGuid" jdbcType="VARCHAR"/>
+ <result column="proNum" property="proNum" jdbcType="INTEGER"/>
+ <result column="changeNum" property="changeNum" jdbcType="INTEGER"/>
+ <result column="proCheckedNum" property="proCheckedNum" jdbcType="INTEGER"/>
+ <result column="changeCheckedNum" property="changeCheckedNum" jdbcType="INTEGER"/>
+ <association property="subtask" resultMap="BaseResultMap"/>
+ <association property="inspection"
+ resultMap="cn.flightfeather.supervision.domain.ds1.mapper.InspectionMapper.BaseResultMap"/>
+ <association property="scene"
+ resultMap="cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper.BaseResultMap"/>
+ </resultMap>
+
+ <sql id="Sub_Task_Summary_Column_List">
+ SELECT
+ a.*,
+ b.*,
+ c.*,
+ SUM(d.PL_GUID is NOT null) AS proNum,
+ SUM(d.PL_IsChanged = TRUE) AS changeNum,
+ SUM(d.PL_Extension3 != 'unCheck') AS proCheckedNum,
+ SUM(
+ d.PL_Extension3 = 'change_pass' || d.PL_Extension3 = 'change_fail'
+ ) AS changeCheckedNum
+ FROM
+ tm_t_subtask AS a
+ LEFT JOIN sm_t_scense AS b ON a.ST_ScenseID = b.S_GUID
+ LEFT JOIN im_t_inspection AS c ON a.ST_GUID = c.ST_GUID
+ LEFT JOIN im_t_problemlist AS d ON a.ST_GUID = d.ST_GUID
+ </sql>
+ <!-- 琛屾斂鍖哄垝鏉′欢 -->
+ <sql id="Where_Area">
+ <if test="provincecode != null">
+ AND ${tableAlias}.ST_ProvinceCode = #{provincecode}
+ </if>
+ <if test="provincename != null">
+ AND ${tableAlias}.ST_ProvinceName = #{provincename}
+ </if>
+ <if test="citycode != null">
+ AND ${tableAlias}.ST_CityCode = #{citycode}
+ </if>
+ <if test="cityname != null">
+ AND ${tableAlias}.ST_CityName = #{cityname}
+ </if>
+ <if test="districtcode != null">
+ AND ${tableAlias}.ST_DistrictCode = #{districtcode}
+ </if>
+ <if test="districtname != null">
+ AND ${tableAlias}.ST_DistrictName = #{districtname}
+ </if>
+ <if test="towncode != null">
+ AND ${tableAlias}.ST_TownCode = #{towncode}
+ </if>
+ <if test="townname != null">
+ AND ${tableAlias}.ST_TownName = #{townname}
+ </if>
+ </sql>
+ <!-- 浠诲姟璁″垝鏃堕棿鏉′欢 -->
+ <sql id="Where_Plan_Time">
+ <if test="starttime != null">
+ AND ${tableAlias}.ST_PlanStartTime >= #{starttime}
+ </if>
+ <if test="endtime != null">
+ AND ${tableAlias}.ST_PlanStartTime <= #{endtime}
+ </if>
+ </sql>
+
+ <select id="getSubtask" resultMap="SubtaskSearchResultVo">
+ SELECT
a.ST_GUID as 'subTaskId',
a.ST_DistrictName as 'districtName',
b.S_TownName as 'townName',
@@ -192,19 +254,19 @@
a.ST_PlanEndTime as 'planEndTime',
a.ST_Status as 'status',
c.I_Extension1 as 'path'
- FROM
+ FROM
tm_t_subtask AS a
LEFT JOIN sm_t_scense AS b ON a.ST_ScenseID = b.S_GUID
LEFT JOIN im_t_inspection AS c ON a.ST_GUID = c.ST_GUID
LEFT JOIN ea_t_evaluation AS d ON a.ST_GUID = d.ST_GUID
- WHERE
+ WHERE
a.ST_DistrictCode = #{param1}
AND a.ST_PlanStartTime >= #{param2}
- AND a.ST_PlanEndTime <= #{param3}
- <if test="param4 != null">
- AND b.S_TypeID = #{param4}
- </if>
- </select>
+ AND a.ST_PlanEndTime <= #{param3}
+ <if test="param4 != null">
+ AND b.S_TypeID = #{param4}
+ </if>
+ </select>
<select id="getSubtask2" resultMap="SubTaskSearchResultVo2">
SELECT
a.ST_GUID as 'subTaskId',
@@ -228,8 +290,8 @@
d.PL_IsChanged as 'rectification',
d.PL_ChangedTime as 'rectificationTime',
(CASE WHEN d.PL_IsChanged IS FALSE THEN d.PL_Time
- WHEN d.PL_ChangedTime IS NULL THEN d.PL_Time
- ELSE d.PL_ChangedTime END ) as 'updateTime',
+ WHEN d.PL_ChangedTime IS NULL THEN d.PL_Time
+ ELSE d.PL_ChangedTime END ) as 'updateTime',
e.MF_GUID as 'mGuid',
e.MF_Extension1 as 'mExtension1',
e.MF_IsChanged as 'isChanged'
@@ -258,7 +320,6 @@
AND d.PL_Extension3 IS NOT NULL
ORDER BY updateTime
</select>
-
<select id="selectByTopTask" resultMap="SubtaskVoMap"><![CDATA[
select * from tm_t_subtask as a left join sm_t_scense as b on a.ST_ScenseID = b.S_GUID
where a.ST_PlanStartTime >=#{param2} and a.ST_PlanEndTime <= #{param3} and a.T_GUID = #{param1}]]>
@@ -266,7 +327,6 @@
and b.S_TypeID = #{param4}
</if>
</select>
-
<select id="selectByTopTask2" resultMap="BaseResultMap">
select * from tm_t_subtask as a left join sm_t_scense as b on a.ST_ScenseID = b.S_GUID
where a.T_GUID = #{param1}
@@ -274,7 +334,6 @@
and b.S_TypeID = #{param2}
</if>
</select>
-
<select id="getSummary" resultMap="SubTaskSummary">
SELECT
a.ST_GUID,
@@ -283,7 +342,12 @@
a.ST_Status,
b.S_GUID,
b.S_Name,
+ b.S_TypeID,
b.S_Type,
+ b.S_Location,
+ b.S_Longitude,
+ b.S_Latitude,
+ b.S_Index,
c.I_GUID,
SUM(d.PL_GUID is NOT null) AS proNum,
SUM(d.PL_IsChanged = TRUE) AS changeNum,
@@ -305,7 +369,6 @@
GROUP BY
a.ST_GUID
</select>
-
<select id="getSummaryByScene" resultMap="SubTaskSummary">
SELECT
a.ST_GUID,
@@ -337,7 +400,20 @@
a.ST_GUID
ORDER BY a.ST_PlanStartTime DESC
</select>
-
+ <select id="getSummaryByArea" resultMap="SubTaskSummary">
+ <include refid="Sub_Task_Summary_Column_List"/>
+ <where>
+ <include refid="Where_Area">
+ <property name="tableAlias" value="a"/>
+ </include>
+ <include refid="Where_Plan_Time">
+ <property name="tableAlias" value="a"/>
+ </include>
+ </where>
+ GROUP BY
+ a.ST_GUID
+ ORDER BY a.ST_PlanStartTime DESC
+ </select>
<select id="findSubTasksByProType" resultMap="BaseResultMap">
SELECT
a.*
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
index 07b51cc..4a2d87a 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
@@ -9,6 +9,7 @@
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataConfig
import cn.flightfeather.supervision.business.autooutput.score.AopCreditCode
import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
import cn.flightfeather.supervision.lightshare.service.SearchService
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
import org.junit.Test
@@ -48,18 +49,21 @@
@Autowired
lateinit var jsWhDataAnalysis: JSWhDataAnalysis
+ @Autowired
+ lateinit var subTaskRep: SubTaskRep
+
/**
* 闈欏畨宸ュ湴鑷瘎
*/
@Test
fun test1() {
- val taskId = "tTbZIUg7nQJ1MRgE"
+ val taskId = "P7hsgDedyN9XLrbt"
val districtCode = "310106"
- val year = 2023
- val month = 12
+ val year = 2024
+ val month = 6
val sceneType = Constant.SceneType.TYPE1.value.toInt()
jaCsDataAnalysis.setResource(taskId, sceneType, year, month)
- jaCsDataAnalysis.execute(0.124)
+ jaCsDataAnalysis.execute()
aopEvaluation.executeByTopTask(taskId, sceneType)
@@ -78,19 +82,19 @@
val taskId = "88wgq9l5gm9cUMg1"
val districtCode = "310104"
val districtName = "寰愭眹鍖�"
- val year = 2023
- val month = 11
+ val year = 2024
+ val month = 5
val sceneType = Constant.SceneType.TYPE5.value.toInt()
- xhFuDataAnalysis.setResource(taskId, sceneType, year, month)
- xhFuDataAnalysis.execute()
-
- aopEvaluation.executeByTopTask(taskId, sceneType)
-
- val mode = 9
- searchService.writeToFile(ExcelConfigVo(
- taskId,
- districtCode = districtCode,
- sceneType = sceneType), mode)
+// xhFuDataAnalysis.setResource(taskId, sceneType, year, month)
+// xhFuDataAnalysis.execute()
+//
+// aopEvaluation.executeByTopTask(taskId, sceneType)
+//
+// val mode = 9
+// searchService.writeToFile(ExcelConfigVo(
+// taskId,
+// districtCode = districtCode,
+// sceneType = sceneType), mode)
aopCreditCode.execute(AopDataConfig(
year = year,
month = month,
@@ -137,4 +141,10 @@
districtCode = districtCode,
sceneType = sceneType), mode)
}
+
+ @Test
+ fun aopSubtask() {
+ val s = subTaskRep.findOne("yMRHdPg7e4i8M6aB")
+ aopEvaluation.executeBySubTask(s!!)
+ }
}
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt
new file mode 100644
index 0000000..d8b9149
--- /dev/null
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt
@@ -0,0 +1,53 @@
+package cn.flightfeather.supervision.business.bgtask
+
+import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.domain.ds1.repository.TaskRep
+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
+import java.io.BufferedReader
+import java.io.InputStreamReader
+import java.time.LocalDate
+
+
+@RunWith(SpringRunner::class)
+@ExtendWith(SpringExtension::class)
+@SpringBootTest
+class AopTaskCtrlTest {
+
+ @Autowired
+ lateinit var aopTaskCtrl: AopTaskCtrl
+
+ @Autowired
+ lateinit var taskRep: TaskRep
+
+ @Test
+ fun startEvaluation() {
+ val time = LocalDate.of(2024, 6, 23).atStartOfDay()
+ aopTaskCtrl.startEvaluation(aopTaskCtrl.getArea(time, "310106", "闈欏畨鍖�", Constant.SceneType.TYPE1))
+ }
+
+ @Test
+ fun startNewTask(){
+ val time = LocalDate.of(2024, 6, 23).atStartOfDay()
+ aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310106", "闈欏畨鍖�", Constant.SceneType.TYPE1))
+ val reader = BufferedReader(InputStreamReader(System.`in`))
+ reader.readLine()
+ }
+
+ @Test
+ fun foo1() {
+ val time = LocalDate.of(2024, 6, 23).atStartOfDay()
+ val t1 = taskRep.findOneTask(aopTaskCtrl.getArea(time, "310106", "闈欏畨鍖�", Constant.SceneType.TYPE1))
+ val t2 = taskRep.findOneTask(aopTaskCtrl.getArea(time, "310104", "寰愭眹鍖�", Constant.SceneType.TYPE5))
+ val t3 = taskRep.findOneTask(aopTaskCtrl.getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE1))
+ val t4 = taskRep.findOneTask(aopTaskCtrl.getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE2))
+ val t5 = taskRep.findOneTask(aopTaskCtrl.getArea(time, "310116", "閲戝北鍖�", Constant.SceneType.TYPE3))
+ println(t5)
+ }
+
+}
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/JinAnScoreTaskCtrlTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/JinAnScoreTaskCtrlTest.kt
index 1a6a96a..d5680fb 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/JinAnScoreTaskCtrlTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/JinAnScoreTaskCtrlTest.kt
@@ -18,8 +18,8 @@
@Test
fun startTask() {
- var time = LocalDateTime.of(2024, 2, 1, 0, 0, 0)
- repeat(3) {
+ var time = LocalDateTime.of(2024, 5, 1, 0, 0, 0)
+ repeat(1) {
jinAnScoreTaskCtrl.startTaskJinAn(time)
time = time.plusMonths(1)
}
diff --git a/src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstructionTest.kt
similarity index 86%
rename from src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt
rename to src/test/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstructionTest.kt
index 2878288..3f5cb1f 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/datafetch/FetchNightConstructionTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/datafetch/FetchNightConstructionTest.kt
@@ -1,8 +1,7 @@
-package cn.flightfeather.supervision.datafetch
+package cn.flightfeather.supervision.business.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
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt
index a45e020..e159369 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/location/LocationRoadNearbyTest.kt
@@ -45,8 +45,13 @@
// 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.BasePlace("寰愭眹涓婂笀澶�", Pair(121.416643,31.163531), Pair(121.416643,31.163531)),
+ LocationRoadNearby.BasePlace("寰愭眹涓婂笀澶�", Pair(121.419384,31.161433), Pair(121.419384,31.161433)),
+ LocationRoadNearby.BasePlace("闈欏畨鐩戞祴绔欏浗鎺х偣", Pair(121.429439, 31.223632), Pair(121.429439, 31.223632)),
+ LocationRoadNearby.BasePlace("閲戝北澶ч亾2000鍙�", Pair(121.3404, 30.744262), Pair(121.3404, 30.744262)),
+ LocationRoadNearby.BasePlace("浠欓湠绔�", Pair(121.394775, 31.203982), Pair(121.419384,31.161433)),
)
- locationRoadNearby.searchList(bList, 2000.0)
+ listOf(500.0, 1000.0, 2000.0, 3000.0).forEach {
+ locationRoadNearby.searchList(bList, it)
+ }
}
}
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/subtask/TaskTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/subtask/TaskTest.kt
new file mode 100644
index 0000000..4dfe6b2
--- /dev/null
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/subtask/TaskTest.kt
@@ -0,0 +1,33 @@
+package cn.flightfeather.supervision.business.subtask
+
+import cn.flightfeather.supervision.business.bgtask.TaskFinishEvaluation
+import cn.flightfeather.supervision.business.bgtask.TaskFinishSubtask
+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 TaskTest {
+
+ @Autowired
+ lateinit var taskFinishSubtask: TaskFinishSubtask
+
+ @Autowired
+ lateinit var taskFinishEvaluation: TaskFinishEvaluation
+
+ @Test
+ fun handle() {
+ taskFinishSubtask.handle()
+ }
+
+ @Test
+ fun handle2() {
+ taskFinishEvaluation.handle()
+ }
+}
\ No newline at end of file
diff --git a/src/test/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRepTest.kt b/src/test/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRepTest.kt
new file mode 100644
index 0000000..d248257
--- /dev/null
+++ b/src/test/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SubTaskRepTest.kt
@@ -0,0 +1,35 @@
+package cn.flightfeather.supervision.domain.ds1.repository
+
+import cn.flightfeather.supervision.lightshare.vo.AreaVo
+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
+import java.time.LocalDateTime
+
+@RunWith(SpringRunner::class)
+@ExtendWith(SpringExtension::class)
+@SpringBootTest
+class SubTaskRepTest {
+
+ @Autowired
+ lateinit var subTaskRep: SubTaskRep
+
+ @Test
+ fun findSummary() {
+ val res = subTaskRep.findSummary(AreaVo().apply {
+ provincecode = "31"
+ provincename = "涓婃捣甯�"
+ citycode = "3100"
+ cityname = "涓婃捣甯�"
+ districtcode = "310116"
+ districtname = "閲戝北鍖�"
+ starttime = LocalDateTime.of(2024, 7, 5, 0, 0, 0, 0)
+ endtime = LocalDateTime.of(2024, 7, 6, 0, 0, 0, 0)
+ })
+ println(res)
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.3