From aed297a5fbc8df9dab01b28da21f872ee546b43c Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 13 十月 2025 16:15:11 +0800
Subject: [PATCH] 2025.10.13 1. 统一调整controller层的返回类型,通过添加全局响应增强器GlobalResponseAdvice来管理返回结果; 2. 新增mybatis-generator自定义插件,实现给数据库实体entity自动添加swagger注解@ApiModel和@ApiModelProperty
---
src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskType.kt | 10
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ComplaintController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/OpenApiWordController.java | 3
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/MonitorDeviceInfo.java | 60 +++
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/CityController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BgTaskController.kt | 12
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProvinceController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt | 10
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt | 75 ++--
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TableController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DistrictController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt | 8
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeEffectController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TownController.kt | 2
src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt | 8
src/main/resources/mapper/ds1/MonitorDeviceInfoMapper.xml | 52 +-
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorDeviceInfoMapper.kt | 11
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SearchController.kt | 7
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SiteController.kt | 4
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MenuController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationruleController.kt | 6
src/main/kotlin/cn/flightfeather/supervision/domain/generatePlugin/CustomAnnotationPlugin.kt | 61 ++++
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskController.kt | 13
src/main/kotlin/cn/flightfeather/supervision/config/IgnoreResponseAdvice.kt | 7
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt | 6
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskvertionController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomaincatalogController.kt | 2
src/main/resources/generator/generatorConfig4ds1.xml | 61 ++-
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColTotalGrade.kt | 8
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ItemevaluationController.kt | 9
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseResponse.kt | 29 +
src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt | 27 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt | 16 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeAdviceController.kt | 4
pom.xml | 8
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GittypeController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt | 54 ++
src/main/kotlin/cn/flightfeather/supervision/config/Swagger2Configuration.kt | 29 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LedgerController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/config/GlobalResponseAdvice.kt | 50 +++
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt | 16
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemtypeController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt | 12
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GitlistController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskConditionVo.kt | 6
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorobjectversionController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserinfoController.kt | 10
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserMapController.kt | 3
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/InspectionController.kt | 27 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt | 22 +
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt | 7
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomainitemController.kt | 2
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/TreatmentDeviceInfo.java | 68 +++
54 files changed, 660 insertions(+), 193 deletions(-)
diff --git a/pom.xml b/pom.xml
index e7723c6..d60f5ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,6 +27,7 @@
<kotlin.version>1.4.32</kotlin.version>
<!-- tk.mybatis -->
<mapper.plugin>tk.mybatis.mapper.generator.MapperPlugin</mapper.plugin>
+<!-- <mapper.plugin>cn.flight.feather.mybatis.plugin.CustomAnnotationPlugin</mapper.plugin>-->
<mapper.Mapper>tk.mybatis.mapper.common.Mapper</mapper.Mapper>
<resource.delimiters>@</resource.delimiters>
</properties>
@@ -467,6 +468,13 @@
<artifactId>mapper</artifactId>
<version>3.3.9</version>
</dependency>
+ <dependency>
+ <groupId>cn.flight.feather.devtool</groupId>
+ <artifactId>mybatis-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <scope>system</scope>
+ <systemPath>C:/work/ideaProject/java-repository/mybatis-plugin-1.0-SNAPSHOT.jar</systemPath>
+ </dependency>
</dependencies>
</plugin>
<!-- <plugin>-->
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 8838bee..bf5e921 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
@@ -70,58 +70,55 @@
//鑾峰彇鍘熷鐩戞祴鏁版嵁
val dataList = fetchDataResources(evaluationScene)
//璁$畻缁熻缁撴灉
-// var tempExceedTimes = TempResult()
-// var tempAvg = TempResult()
-// var tempMax = TempResult()
-// var tempMin = TempResult()
+ var tempExceedTimes = TempResult()
+ var tempAvg = TempResult()
+ var tempMax = TempResult()
+ var tempMin = TempResult()
+ var deviceCode: String? = null
dataList.forEach {
// 鐩戞祴鐐规湁澶氬彴璁惧鏃讹紝姣忓彴璁惧鍗曠嫭璁板綍
- val deviceCode = if (it.isNotEmpty()) {
+ deviceCode = if (it.isNotEmpty()) {
getDeviceCode(it[0])
} else {
null
}
- val tempExceedTimes = TempResult()
- val tempAvg = TempResult()
- val tempMax = TempResult()
- val tempMin = TempResult()
-// val _tempExceedTimes = TempResult()
-// val _tempAvg = TempResult()
-// val _tempMax = TempResult()
-// val _tempMin = TempResult()
+ val _tempExceedTimes = TempResult()
+ val _tempAvg = TempResult()
+ val _tempMax = TempResult()
+ val _tempMin = TempResult()
it.forEach { t ->
t?.let {
- exceedTimes(t, tempExceedTimes)
- avg(t, tempAvg)
- max(t, tempMax)
- min(t, tempMin)
+ exceedTimes(t, _tempExceedTimes)
+ avg(t, _tempAvg)
+ max(t, _tempMax)
+ min(t, _tempMin)
}
}
// 淇濈暀鍧囧�兼渶楂樼殑涓�鍙拌澶�
-// if (_tempAvg.avg > tempAvg.avg) {
-// tempExceedTimes = _tempExceedTimes
-// tempAvg = _tempAvg
-// tempMax = _tempMax
-// tempMin = _tempMin
-// }
- val dustDataResult = DustDataResult().apply {
- drSceneId = evaluationScene.scene.value?.guid
- drSceneName = evaluationScene.scene.value?.name
- drDeviceCode = deviceCode
- drTime = source?.config?.startTime
- drExceedTimes = tempExceedTimes.count
- drAvg = tempAvg.avg
- drMax = tempMax.total
- drMin = tempMin.total
- drOverAvgPer = overAvgRate(drAvg, dAvg)
- drDataNum = count(dataList)
- // 褰撴暟鎹噺涓�0鏃讹紝瓒呮湀搴﹀尯鍧囧�肩櫨鍒嗘瘮鍙樹负0
- if (drDataNum == 0) drOverAvgPer = .0
- drEffectiveRate = effectiveRate(dataList, evaluationScene)
+ if (_tempAvg.avg > tempAvg.avg) {
+ tempExceedTimes = _tempExceedTimes
+ tempAvg = _tempAvg
+ tempMax = _tempMax
+ tempMin = _tempMin
}
- //鏇存柊鍏ュ簱
- aopOutput.toDbDataResult(dustDataResult)
}
+ val dustDataResult = DustDataResult().apply {
+ drSceneId = evaluationScene.scene.value?.guid
+ drSceneName = evaluationScene.scene.value?.name
+ drDeviceCode = deviceCode
+ drTime = source?.config?.startTime
+ drExceedTimes = tempExceedTimes.count
+ drAvg = tempAvg.avg
+ drMax = tempMax.total
+ drMin = tempMin.total
+ drOverAvgPer = overAvgRate(drAvg, dAvg)
+ drDataNum = count(dataList)
+ // 褰撴暟鎹噺涓�0鏃讹紝瓒呮湀搴﹀尯鍧囧�肩櫨鍒嗘瘮鍙樹负0
+ if (drDataNum == 0) drOverAvgPer = .0
+ drEffectiveRate = effectiveRate(dataList, evaluationScene)
+ }
+ //鏇存柊鍏ュ簱
+ aopOutput.toDbDataResult(dustDataResult)
}
}
diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColTotalGrade.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColTotalGrade.kt
index f39c6d4..9ea5166 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColTotalGrade.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColTotalGrade.kt
@@ -34,10 +34,10 @@
else -> ExcelUtil.MyCell("", fontColor = HSSFColor.HSSFColorPredefined.BLACK.index)
}
val normalization = when {
- s in 0..39 -> ExcelUtil.MyCell("涓ラ噸涓嶈鑼�", fontColor = HSSFColor.HSSFColorPredefined.RED.index)
- s in 40..89 -> ExcelUtil.MyCell("涓嶈鑼�", fontColor = HSSFColor.HSSFColorPredefined.ROSE.index)
- s in 90..99 -> ExcelUtil.MyCell("鍩烘湰瑙勮寖", fontColor = HSSFColor.HSSFColorPredefined.GOLD.index)
- s >= 100 -> ExcelUtil.MyCell("瑙勮寖", fontColor = HSSFColor.HSSFColorPredefined.BRIGHT_GREEN.index)
+ s in 0..49 -> ExcelUtil.MyCell("涓ラ噸涓嶈鑼�", fontColor = HSSFColor.HSSFColorPredefined.RED.index)
+ s in 50..89 -> ExcelUtil.MyCell("涓嶈鑼�", fontColor = HSSFColor.HSSFColorPredefined.ROSE.index)
+ s in 90..94 -> ExcelUtil.MyCell("鍩烘湰瑙勮寖", fontColor = HSSFColor.HSSFColorPredefined.GOLD.index)
+ s >= 95 -> ExcelUtil.MyCell("瑙勮寖", fontColor = HSSFColor.HSSFColorPredefined.BRIGHT_GREEN.index)
else -> ExcelUtil.MyCell("", fontColor = HSSFColor.HSSFColorPredefined.BLACK.index)
}
add(code)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskConditionVo.kt b/src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskConditionVo.kt
index 26d3fff..2b6c6b0 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskConditionVo.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskConditionVo.kt
@@ -1,10 +1,16 @@
package cn.flightfeather.supervision.common.executor
+import io.swagger.annotations.ApiModel
+import io.swagger.annotations.ApiModelProperty
+
/**
* 鍚庡彴浠诲姟鏌ヨ鏉′欢
*/
+@ApiModel("鍚庡彴浠诲姟鏌ヨ鏉′欢")
class BgTaskConditionVo {
+ @ApiModelProperty("浠诲姟绫诲瀷")
var type: BgTaskType? = null
+ @ApiModelProperty("浠诲姟id")
var id: String? = null
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskType.kt b/src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskType.kt
index 85b0bf5..05e56c8 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskType.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskType.kt
@@ -1,11 +1,15 @@
package cn.flightfeather.supervision.common.executor
+import io.swagger.annotations.ApiModel
+import io.swagger.annotations.ApiModelProperty
+
+@ApiModel("浠诲姟绫诲瀷")
enum class BgTaskType(val index: Int, val des: String) {
- //娴嬭瘯浠诲姟
+ @ApiModelProperty("娴嬭瘯浠诲姟")
TEST(0, "娴嬭瘯浠诲姟"),
- //鑷姩璇勫垎
+ @ApiModelProperty("鑷姩璇勪及浠诲姟")
AUTO_SCORE(1, "鑷姩璇勪及浠诲姟"),
- //鏂囨。鐢熸垚
+ @ApiModelProperty("鐢熸垚鏂囨。浠诲姟")
DOCUMENT(2, "鐢熸垚鏂囨。浠诲姟");
diff --git a/src/main/kotlin/cn/flightfeather/supervision/config/GlobalResponseAdvice.kt b/src/main/kotlin/cn/flightfeather/supervision/config/GlobalResponseAdvice.kt
new file mode 100644
index 0000000..e591921
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/config/GlobalResponseAdvice.kt
@@ -0,0 +1,50 @@
+package cn.flightfeather.supervision.config
+
+import cn.flightfeather.supervision.lightshare.vo.BaseResponse
+import cn.flightfeather.supervision.lightshare.vo.DataHead
+import com.fasterxml.jackson.databind.ObjectMapper
+import org.springframework.core.MethodParameter
+import org.springframework.http.MediaType
+import org.springframework.http.converter.HttpMessageConverter
+import org.springframework.http.server.ServerHttpRequest
+import org.springframework.http.server.ServerHttpResponse
+import org.springframework.web.bind.annotation.RestControllerAdvice
+import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice
+
+/**
+ * 鍏ㄥ眬鍝嶅簲浣撳寮哄櫒
+ * @date 2025/10/11
+ * @author feiyu02
+ */
+@RestControllerAdvice(basePackages = ["cn.flightfeather.supervision.lightshare.web"])
+class GlobalResponseAdvice : ResponseBodyAdvice<Any?> {
+
+ /**
+ * 鏄惁鏀寔澧炲己
+ * 閫氳繃妫�鏌ユ柟娉曟垨绫讳笂鏈堾IgnoreResponseAdvice娉ㄨВ鐨勶紝鎵嶄笉杩涜澧炲己
+ * @param returnType 鏂规硶鍙傛暟
+ * @param converterType 娑堟伅杞崲鍣ㄧ被鍨�
+ * @return 鏄惁鏀寔澧炲己
+ */
+ override fun supports(returnType: MethodParameter, converterType: Class<out HttpMessageConverter<*>>): Boolean {
+ return !(returnType.method?.isAnnotationPresent(IgnoreResponseAdvice::class.java) == true ||
+ returnType.containingClass.isAnnotationPresent(IgnoreResponseAdvice::class.java))
+ }
+
+ override fun beforeBodyWrite(
+ body: Any?,
+ returnType: MethodParameter,
+ selectedContentType: MediaType,
+ selectedConverterType: Class<out HttpMessageConverter<*>>,
+ request: ServerHttpRequest,
+ response: ServerHttpResponse,
+ ): Any? {
+ if (body is BaseResponse<*>) {
+ return body
+ }
+ if (body is String) {
+ return ObjectMapper().writeValueAsString(BaseResponse.success(body))
+ }
+ return BaseResponse.success(body)
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/config/IgnoreResponseAdvice.kt b/src/main/kotlin/cn/flightfeather/supervision/config/IgnoreResponseAdvice.kt
new file mode 100644
index 0000000..c259611
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/config/IgnoreResponseAdvice.kt
@@ -0,0 +1,7 @@
+package cn.flightfeather.supervision.config
+
+/**
+ * 蹇界暐鍏ㄥ眬鍝嶅簲澧炲己娉ㄨВ
+ * 鐢ㄤ簬鏍囨敞鍦–ontroller鐨勬柟娉曚笂锛屾爣璇嗚鏂规硶涓嶈繘琛屽叏灞�鍝嶅簲澧炲己
+ */
+annotation class IgnoreResponseAdvice
diff --git a/src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt b/src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt
new file mode 100644
index 0000000..2d016a5
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt
@@ -0,0 +1,27 @@
+package cn.flightfeather.supervision.config
+
+import cn.flightfeather.supervision.lightshare.vo.BaseResponse
+import org.springframework.http.HttpStatus
+import org.springframework.web.bind.annotation.ExceptionHandler
+import org.springframework.web.bind.annotation.ResponseStatus
+import org.springframework.web.bind.annotation.RestControllerAdvice
+
+/**
+ * 鍏ㄥ眬寮傚父澶勭悊鍣�
+ * @date 2025/10/11
+ * @author feiyu02
+ */
+@RestControllerAdvice
+class RestExceptionHandler {
+
+ /**
+ * 榛樿鍏ㄥ眬寮傚父澶勭悊銆�
+ * @param e the e
+ * @return ResultData
+ */
+ @ExceptionHandler(Exception::class)
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ fun exception(e: Exception): BaseResponse<String> {
+ return BaseResponse.fail("500", e)
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/config/Swagger2Configuration.kt b/src/main/kotlin/cn/flightfeather/supervision/config/Swagger2Configuration.kt
index 7a159fe..372623a 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/config/Swagger2Configuration.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/config/Swagger2Configuration.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.config
+import io.swagger.annotations.Api
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -13,12 +14,13 @@
/**
* @author riku
* Date: 2020/8/28
+ * 璁块棶鍦板潃锛歨ttp://localhost:8080/swagger-ui/index.html
*/
@Configuration
@EnableSwagger2
class Swagger2Configuration(
@Value("\${springfox.documentation.swagger.v2.enabled}")
- var swagger2Enable: Boolean
+ var swagger2Enable: Boolean,
) {
companion object {
@@ -29,19 +31,20 @@
@Bean
fun createRestApi(): Docket =
- Docket(DocumentationType.SWAGGER_2)
- .enable(swagger2Enable)
- .apiInfo(apiInfo())
- .select()
- .apis(RequestHandlerSelectors.basePackage(SWAGGER_SCAN_BASE_PACKAGE))
- .paths(PathSelectors.any())
- .build()
+ Docket(DocumentationType.SWAGGER_2)
+ .enable(swagger2Enable)
+ .apiInfo(apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.basePackage(SWAGGER_SCAN_BASE_PACKAGE))
+ .apis(RequestHandlerSelectors.withClassAnnotation(Api::class.java))
+ .paths(PathSelectors.any())
+ .build()
private fun apiInfo() =
- ApiInfoBuilder()
- .title("绗笁鏂圭洃绠℃湇鍔�")
- .description("绗笁鏂圭洃绠℃湇鍔� API 鎺ュ彛鏂囨。")
- .version(VERSION)
- .build()
+ ApiInfoBuilder()
+ .title("绗笁鏂圭洃绠℃湇鍔�")
+ .description("绗笁鏂圭洃绠℃湇鍔� API 鎺ュ彛鏂囨。")
+ .version(VERSION)
+ .build()
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/MonitorDeviceInfo.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/MonitorDeviceInfo.java
index 9c6c692..330c355 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/MonitorDeviceInfo.java
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/MonitorDeviceInfo.java
@@ -1,131 +1,167 @@
package cn.flightfeather.supervision.domain.ds1.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.*;
+@ApiModel(value = "MonitorDeviceInfo")
@Table(name = "di_t_monitor_device_info")
-public class MonitorDeviceInfo implements BaseDevice {
+public class MonitorDeviceInfo {
+ /**
+ * 涓婚敭鑷id
+ */
@Id
@Column(name = "DI_ID")
+ @ApiModelProperty(value = "涓婚敭鑷id")
private Integer diId;
/**
* 鐩戞祴璁惧缂栧彿
*/
@Column(name = "DI_Device_Code")
+ @ApiModelProperty(value = "鐩戞祴璁惧缂栧彿")
private String diDeviceCode;
/**
* 绔欑偣鍚嶇О
*/
@Column(name = "DI_Name")
+ @ApiModelProperty(value = "绔欑偣鍚嶇О")
private String diName;
/**
* 鎵�灞炲満鏅痠d
*/
@Column(name = "DI_Scene_GUID")
+ @ApiModelProperty(value = "鎵�灞炲満鏅痠d")
private String diSceneGuid;
/**
* 鍦烘櫙绫诲瀷id
*/
@Column(name = "DI_Scene_Type_Id")
+ @ApiModelProperty(value = "鍦烘櫙绫诲瀷id")
private Byte diSceneTypeId;
/**
* 璁惧绫诲瀷(0:鎵皹鐩戞祴锛�1:娌圭儫鐩戞祴;2:VOC鐩戞祴)
*/
@Column(name = "DI_Type_Id")
+ @ApiModelProperty(value = "璁惧绫诲瀷(0:鎵皹鐩戞祴锛�1:娌圭儫鐩戞祴;2:VOC鐩戞祴)")
private Byte diTypeId;
/**
* 璁惧瀛愮被鍨�
*/
@Column(name = "DI_Subtype_Id")
+ @ApiModelProperty(value = "璁惧瀛愮被鍨�")
private Byte diSubtypeId;
/**
* 璁惧渚涘簲鍟�
*/
@Column(name = "DI_Supplier")
+ @ApiModelProperty(value = "璁惧渚涘簲鍟�")
private String diSupplier;
/**
* 杩愮淮鍟�
*/
@Column(name = "DI_Maintainer")
+ @ApiModelProperty(value = "杩愮淮鍟�")
private String diMaintainer;
/**
* 杩愮淮棰戞(0:姣忓懆涓�娆�;1:姣忔湀涓�娆�;2:姣忓搴︿竴娆�;3:鍗婂勾涓�娆�)
*/
@Column(name = "DI_Maintain_Frequency")
+ @ApiModelProperty(value = "杩愮淮棰戞(0:姣忓懆涓�娆�;1:姣忔湀涓�娆�;2:姣忓搴︿竴娆�;3:鍗婂勾涓�娆�)")
private Byte diMaintainFrequency;
/**
* 杩愮淮浜哄憳
*/
@Column(name = "DI_Maintain_Staff")
+ @ApiModelProperty(value = "杩愮淮浜哄憳")
private String diMaintainStaff;
/**
* 杩愮淮鑱旂郴鏂瑰紡
*/
@Column(name = "DI_Maintain_Tel")
+ @ApiModelProperty(value = "杩愮淮鑱旂郴鏂瑰紡")
private String diMaintainTel;
/**
* 杩愯鐘舵��(0:鏈仈缃�;1:涓婄嚎涓�;2:涓嬬嚎;3:鎷嗛櫎)
*/
@Column(name = "DI_Running_Status")
+ @ApiModelProperty(value = "杩愯鐘舵��(0:鏈仈缃�;1:涓婄嚎涓�;2:涓嬬嚎;3:鎷嗛櫎)")
private Byte diRunningStatus;
/**
* 鍝佺墝鍨嬪彿
*/
@Column(name = "DI_Brand_Model")
+ @ApiModelProperty(value = "鍝佺墝鍨嬪彿")
private String diBrandModel;
/**
* 璁惧鍙傛暟
*/
@Column(name = "DI_Device_Param")
+ @ApiModelProperty(value = "璁惧鍙傛暟")
private String diDeviceParam;
/**
* 鎵�鏈夋潈锛�0:璐拱;1:绉熻祦锛�
*/
@Column(name = "DI_Ownership")
+ @ApiModelProperty(value = "鎵�鏈夋潈锛�0:璐拱;1:绉熻祦锛�")
private Byte diOwnership;
/**
* 鏍囪瘑浜岀淮鐮�
*/
@Column(name = "DI_QR_Code")
+ @ApiModelProperty(value = "鏍囪瘑浜岀淮鐮�")
private String diQrCode;
/**
* 鍏朵粬绗笁鏂规垨璁惧鑷甫浜岀淮鐮�
*/
@Column(name = "DI_Other_QR_Code")
+ @ApiModelProperty(value = "鍏朵粬绗笁鏂规垨璁惧鑷甫浜岀淮鐮�")
private String diOtherQrCode;
+ /**
+ * 璁板綍鍒涘缓鏃堕棿
+ */
@Column(name = "DI_Create_Time")
+ @ApiModelProperty(value = "璁板綍鍒涘缓鏃堕棿")
private Date diCreateTime;
+ /**
+ * 璁板綍鏇存柊鏃堕棿
+ */
@Column(name = "DI_Update_Time")
+ @ApiModelProperty(value = "璁板綍鏇存柊鏃堕棿")
private Date diUpdateTime;
/**
- * @return DI_ID
+ * 鑾峰彇涓婚敭鑷id
+ *
+ * @return DI_ID - 涓婚敭鑷id
*/
public Integer getDiId() {
return diId;
}
/**
- * @param diId
+ * 璁剧疆涓婚敭鑷id
+ *
+ * @param diId 涓婚敭鑷id
*/
public void setDiId(Integer diId) {
this.diId = diId;
@@ -188,7 +224,7 @@
/**
* 鑾峰彇鍦烘櫙绫诲瀷id
*
- * @return PI_Scene_Type_Id - 鍦烘櫙绫诲瀷id
+ * @return DI_Scene_Type_Id - 鍦烘櫙绫诲瀷id
*/
public Byte getDiSceneTypeId() {
return diSceneTypeId;
@@ -438,28 +474,36 @@
}
/**
- * @return DI_Create_Time
+ * 鑾峰彇璁板綍鍒涘缓鏃堕棿
+ *
+ * @return DI_Create_Time - 璁板綍鍒涘缓鏃堕棿
*/
public Date getDiCreateTime() {
return diCreateTime;
}
/**
- * @param diCreateTime
+ * 璁剧疆璁板綍鍒涘缓鏃堕棿
+ *
+ * @param diCreateTime 璁板綍鍒涘缓鏃堕棿
*/
public void setDiCreateTime(Date diCreateTime) {
this.diCreateTime = diCreateTime;
}
/**
- * @return DI_Update_Time
+ * 鑾峰彇璁板綍鏇存柊鏃堕棿
+ *
+ * @return DI_Update_Time - 璁板綍鏇存柊鏃堕棿
*/
public Date getDiUpdateTime() {
return diUpdateTime;
}
/**
- * @param diUpdateTime
+ * 璁剧疆璁板綍鏇存柊鏃堕棿
+ *
+ * @param diUpdateTime 璁板綍鏇存柊鏃堕棿
*/
public void setDiUpdateTime(Date diUpdateTime) {
this.diUpdateTime = diUpdateTime;
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/TreatmentDeviceInfo.java b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/TreatmentDeviceInfo.java
index b27c3cc..0cc5798 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/TreatmentDeviceInfo.java
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/TreatmentDeviceInfo.java
@@ -1,117 +1,149 @@
package cn.flightfeather.supervision.domain.ds1.entity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.*;
+@ApiModel(value = "TreatmentDeviceInfo")
@Table(name = "di_t_treatment_device_info")
-public class TreatmentDeviceInfo implements BaseDevice {
+public class TreatmentDeviceInfo {
@Id
@Column(name = "PI_ID")
+ @ApiModelProperty(value = "PI_ID")
private Integer piId;
/**
* 娌荤悊璁惧缂栧彿
*/
@Column(name = "PI_Device_Code")
+ @ApiModelProperty(value = "娌荤悊璁惧缂栧彿")
private String piDeviceCode;
/**
- * 鍑�鍖栬鏂藉悕绉�
+ * 娌荤悊璁惧鍚嶇О
*/
@Column(name = "PI_Name")
+ @ApiModelProperty(value = "娌荤悊璁惧鍚嶇О")
private String piName;
/**
* 鎵�灞炲満鏅痠d
*/
@Column(name = "PI_Scene_GUID")
+ @ApiModelProperty(value = "鎵�灞炲満鏅痠d")
private String piSceneGuid;
/**
* 鍦烘櫙绫诲瀷id
*/
@Column(name = "PI_Scene_Type_Id")
+ @ApiModelProperty(value = "鍦烘櫙绫诲瀷id")
private Byte piSceneTypeId;
/**
* 璁炬柦绫诲瀷id锛屾牴鎹満鏅被鍨嬩笉鍚岄�夐」涓嶅悓
*/
@Column(name = "PI_Type_Id")
+ @ApiModelProperty(value = "璁炬柦绫诲瀷id锛屾牴鎹満鏅被鍨嬩笉鍚岄�夐」涓嶅悓")
private Byte piTypeId;
/**
* 璁惧瀛愮被鍨�
*/
@Column(name = "PI_Subtype_Id")
+ @ApiModelProperty(value = "璁惧瀛愮被鍨�")
private Byte piSubtypeId;
/**
* 璁惧渚涘簲鍟�
*/
@Column(name = "PI_Supplier")
+ @ApiModelProperty(value = "璁惧渚涘簲鍟�")
private String piSupplier;
/**
* 杩愮淮鍟�
*/
@Column(name = "PI_Maintainer")
+ @ApiModelProperty(value = "杩愮淮鍟�")
private String piMaintainer;
/**
* 杩愮淮棰戞(0:姣忓懆涓�娆�;1:姣忔湀涓�娆�;2:姣忓搴︿竴娆�;3:鍗婂勾涓�娆�)
*/
@Column(name = "PI_Maintain_Frequency")
+ @ApiModelProperty(value = "杩愮淮棰戞(0:姣忓懆涓�娆�;1:姣忔湀涓�娆�;2:姣忓搴︿竴娆�;3:鍗婂勾涓�娆�)")
private Byte piMaintainFrequency;
/**
* 杩愮淮浜哄憳
*/
@Column(name = "PI_Maintain_Staff")
+ @ApiModelProperty(value = "杩愮淮浜哄憳")
private String piMaintainStaff;
/**
* 杩愮淮鑱旂郴鏂瑰紡
*/
@Column(name = "PI_Maintain_Tel")
+ @ApiModelProperty(value = "杩愮淮鑱旂郴鏂瑰紡")
private String piMaintainTel;
/**
* 杩愯鐘舵��(0:鏈仈缃�;1:涓婄嚎涓�;2:涓嬬嚎;3:鎷嗛櫎)
*/
@Column(name = "PI_Running_Status")
+ @ApiModelProperty(value = "杩愯鐘舵��(0:鏈仈缃�;1:涓婄嚎涓�;2:涓嬬嚎;3:鎷嗛櫎)")
private Byte piRunningStatus;
/**
* 鍝佺墝鍨嬪彿
*/
@Column(name = "PI_Brand_Model")
+ @ApiModelProperty(value = "鍝佺墝鍨嬪彿")
private String piBrandModel;
/**
* 璁惧鍙傛暟
*/
@Column(name = "PI_Device_Param")
+ @ApiModelProperty(value = "璁惧鍙傛暟")
private String piDeviceParam;
/**
* 鎵�鏈夋潈锛�0:璐拱;1:绉熻祦锛�
*/
@Column(name = "PI_Ownership")
+ @ApiModelProperty(value = "鎵�鏈夋潈锛�0:璐拱;1:绉熻祦锛�")
private Byte piOwnership;
+ /**
+ * 璁惧绯荤粺淇℃伅浜岀淮鐮�
+ */
@Column(name = "PI_QR_Code")
+ @ApiModelProperty(value = "璁惧绯荤粺淇℃伅浜岀淮鐮�")
private String piQrCode;
/**
* 鍏朵粬绗笁鏂规垨璁惧鑷甫浜岀淮鐮�
*/
@Column(name = "PI_Other_QR_Code")
+ @ApiModelProperty(value = "鍏朵粬绗笁鏂规垨璁惧鑷甫浜岀淮鐮�")
private String piOtherQrCode;
+ /**
+ * 鍒涘缓鏃堕棿
+ */
@Column(name = "PI_Create_Time")
+ @ApiModelProperty(value = "鍒涘缓鏃堕棿")
private Date piCreateTime;
+ /**
+ * 鏇存柊鏃堕棿
+ */
@Column(name = "PI_Update_Time")
+ @ApiModelProperty(value = "鏇存柊鏃堕棿")
private Date piUpdateTime;
/**
@@ -147,18 +179,18 @@
}
/**
- * 鑾峰彇鍑�鍖栬鏂藉悕绉�
+ * 鑾峰彇娌荤悊璁惧鍚嶇О
*
- * @return PI_Name - 鍑�鍖栬鏂藉悕绉�
+ * @return PI_Name - 娌荤悊璁惧鍚嶇О
*/
public String getPiName() {
return piName;
}
/**
- * 璁剧疆鍑�鍖栬鏂藉悕绉�
+ * 璁剧疆娌荤悊璁惧鍚嶇О
*
- * @param piName 鍑�鍖栬鏂藉悕绉�
+ * @param piName 娌荤悊璁惧鍚嶇О
*/
public void setPiName(String piName) {
this.piName = piName == null ? null : piName.trim();
@@ -399,14 +431,18 @@
}
/**
- * @return PI_QR_Code
+ * 鑾峰彇璁惧绯荤粺淇℃伅浜岀淮鐮�
+ *
+ * @return PI_QR_Code - 璁惧绯荤粺淇℃伅浜岀淮鐮�
*/
public String getPiQrCode() {
return piQrCode;
}
/**
- * @param piQrCode
+ * 璁剧疆璁惧绯荤粺淇℃伅浜岀淮鐮�
+ *
+ * @param piQrCode 璁惧绯荤粺淇℃伅浜岀淮鐮�
*/
public void setPiQrCode(String piQrCode) {
this.piQrCode = piQrCode == null ? null : piQrCode.trim();
@@ -431,28 +467,36 @@
}
/**
- * @return PI_Create_Time
+ * 鑾峰彇鍒涘缓鏃堕棿
+ *
+ * @return PI_Create_Time - 鍒涘缓鏃堕棿
*/
public Date getPiCreateTime() {
return piCreateTime;
}
/**
- * @param piCreateTime
+ * 璁剧疆鍒涘缓鏃堕棿
+ *
+ * @param piCreateTime 鍒涘缓鏃堕棿
*/
public void setPiCreateTime(Date piCreateTime) {
this.piCreateTime = piCreateTime;
}
/**
- * @return PI_Update_Time
+ * 鑾峰彇鏇存柊鏃堕棿
+ *
+ * @return PI_Update_Time - 鏇存柊鏃堕棿
*/
public Date getPiUpdateTime() {
return piUpdateTime;
}
/**
- * @param piUpdateTime
+ * 璁剧疆鏇存柊鏃堕棿
+ *
+ * @param piUpdateTime 鏇存柊鏃堕棿
*/
public void setPiUpdateTime(Date piUpdateTime) {
this.piUpdateTime = piUpdateTime;
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorDeviceInfoMapper.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorDeviceInfoMapper.kt
index eaf5963..45393b2 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorDeviceInfoMapper.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorDeviceInfoMapper.kt
@@ -1,9 +1,8 @@
-package cn.flightfeather.supervision.domain.ds1.mapper;
+package cn.flightfeather.supervision.domain.ds1.mapper
-import cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo;
-import cn.flightfeather.supervision.domain.util.MyMapper;
-import org.apache.ibatis.annotations.Mapper;
+import cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo
+import cn.flightfeather.supervision.domain.util.MyMapper
+import org.apache.ibatis.annotations.Mapper
@Mapper
-public interface MonitorDeviceInfoMapper extends MyMapper<MonitorDeviceInfo> {
-}
\ No newline at end of file
+interface MonitorDeviceInfoMapper : MyMapper<MonitorDeviceInfo?>
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/generatePlugin/CustomAnnotationPlugin.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/generatePlugin/CustomAnnotationPlugin.kt
new file mode 100644
index 0000000..410afaa
--- /dev/null
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/generatePlugin/CustomAnnotationPlugin.kt
@@ -0,0 +1,61 @@
+package cn.flightfeather.supervision.domain.generatePlugin
+
+import org.mybatis.generator.api.IntrospectedColumn
+import org.mybatis.generator.api.IntrospectedTable
+import org.mybatis.generator.api.Plugin
+import org.mybatis.generator.api.PluginAdapter
+import org.mybatis.generator.api.dom.java.Field
+import org.mybatis.generator.api.dom.java.TopLevelClass
+import tk.mybatis.mapper.generator.MapperPlugin
+
+/**
+ * MyBatis Generator鑷畾涔夋敞瑙f彃浠�
+ * 鐢ㄤ簬涓虹敓鎴愮殑瀹炰綋绫绘坊鍔犺嚜瀹氫箟娉ㄨВ
+ * @date 2025/10/13
+ * @author feiyu02
+ */
+class CustomAnnotationPlugin : MapperPlugin() {
+
+ override fun validate(warnings: MutableList<String>?): Boolean {
+ return true
+ }
+
+ override fun modelBaseRecordClassGenerated(topLevelClass: TopLevelClass?, introspectedTable: IntrospectedTable?): Boolean {
+ // 娣诲姞绫荤骇娉ㄨВ
+ topLevelClass?.addImportedType("io.swagger.annotations.ApiModel");
+ topLevelClass?.addAnnotation(
+ String.format(
+ "@ApiModel(value = \"%s\")", introspectedTable?.tableConfiguration
+ ?.domainObjectName
+ )
+ )
+ return super.modelBaseRecordClassGenerated(topLevelClass, introspectedTable)
+ }
+
+ /**
+ * 涓哄瓧娈垫坊鍔犳敞瑙�
+ */
+ override fun modelFieldGenerated(
+ field: Field?,
+ topLevelClass: TopLevelClass?,
+ introspectedColumn: IntrospectedColumn?,
+ introspectedTable: IntrospectedTable?,
+ modelClassType: Plugin.ModelClassType?,
+ ): Boolean {
+ // 涓烘瘡涓瓧娈靛皢鍏舵敞閲�(鑻ユ敞閲婁负null锛屼娇鐢ㄥ瓧娈靛悕)娣诲姞涓篠wagger娉ㄨВ锛岀敤浜嶢PI鏂囨。鐢熸垚
+ introspectedColumn ?: return true
+ topLevelClass?.addImportedType("io.swagger.annotations.ApiModelProperty");
+ if (introspectedColumn.remarks != null) {
+ field?.addAnnotation(String.format("@ApiModelProperty(value = \"%s\")", introspectedColumn.remarks));
+ } else {
+ field?.addAnnotation(
+ String.format(
+ "@ApiModelProperty(value = \"%s\")",
+ introspectedColumn.actualColumnName
+ )
+ );
+ }
+
+ return super.modelFieldGenerated(field, topLevelClass, introspectedColumn, introspectedTable, modelClassType)
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt
index d13bfe1..fe6a7c7 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt
@@ -139,10 +139,10 @@
evaluate = it
val score = it.resultscorebef?.toIntOrNull() ?: -1
scoreLevel = when {
- score in 0..39 -> Constant.EvaluationLevel.D.text
- score in 40..89 -> Constant.EvaluationLevel.C.text
- score in 90..99 -> Constant.EvaluationLevel.B.text
- score >= 100 -> Constant.EvaluationLevel.A.text
+ score in 0..49 -> Constant.EvaluationLevel.D.text
+ score in 50..89 -> Constant.EvaluationLevel.C.text
+ score in 90..94 -> Constant.EvaluationLevel.B.text
+ score >= 95 -> Constant.EvaluationLevel.A.text
else -> ""
}
})
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseResponse.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseResponse.kt
index cd80b71..7672db8 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseResponse.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseResponse.kt
@@ -14,12 +14,16 @@
data class BaseResponse<T>(
@ApiModelProperty("璇锋眰鏄惁鎴愬姛")
var success: Boolean,
+ @ApiModelProperty("璇锋眰杩斿洖鐘舵�佺爜")
+ var code: String = "200",
@ApiModelProperty("璇锋眰杩斿洖娑堟伅")
var message: String = "",
+ @ApiModelProperty("璇锋眰杩斿洖鏁版嵁澶�")
val head: DataHead? = null,
@ApiModelProperty("璇锋眰杩斿洖鏁版嵁")
val data: T? = null,
- var stackTrace: String = ""
+ @ApiModelProperty("璇锋眰杩斿洖寮傚父鏍堜俊鎭�")
+ var stackTrace: String = "",
) {
init {
if (message.isBlank()) {
@@ -30,4 +34,27 @@
}
}
}
+
+ companion object {
+ fun success(res: Any?): BaseResponse<Any> {
+ return if (res is Pair<*, *>) {
+ val head = res.first
+ if (head is DataHead) {
+ BaseResponse(true, head = head, data = res.second)
+ } else {
+ BaseResponse(true, data = res)
+ }
+ } else {
+ BaseResponse(true, data = res)
+ }
+ }
+
+ fun <T> fail(code: String = "500", message: String = "璇锋眰澶辫触"): BaseResponse<T> {
+ return BaseResponse(false, code, message)
+ }
+
+ fun <T> fail(code: String = "500", e: Exception): BaseResponse<T> {
+ return BaseResponse(false, code, e.message ?: "", stackTrace = e.stackTraceToString())
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt
index 9dea88e..97acfa6 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt
@@ -1,6 +1,8 @@
package cn.flightfeather.supervision.lightshare.vo
import com.fasterxml.jackson.annotation.JsonInclude
+import io.swagger.annotations.ApiModel
+import io.swagger.annotations.ApiModelProperty
/**
* @author riku
@@ -12,9 +14,13 @@
var data: MutableList<Any> = mutableListOf()
}
+@ApiModel("璇锋眰杩斿洖鏁版嵁澶�")
data class DataHead(
+ @ApiModelProperty("褰撳墠椤电爜")
var page: Int = 1,
+ @ApiModelProperty("鎬婚〉鏁�")
var totalPage: Int = 1,
+ @ApiModelProperty("鎬昏褰曟暟")
var totalCount:Long = 0
)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BgTaskController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BgTaskController.kt
index d4727e9..504795b 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BgTaskController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BgTaskController.kt
@@ -5,16 +5,19 @@
import cn.flightfeather.supervision.lightshare.service.BgTaskService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
+import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
-@Api(tags = ["BgTaskController"], description = "鍚庡彴鑰楁椂浠诲姟API鎺ュ彛")
+@Api(tags = ["鍚庡彴浠诲姟绠$悊"], description = "鍚庡彴鑰楁椂浠诲姟API鎺ュ彛")
@RestController
@RequestMapping("/bgTask")
-class BgTaskController(val bgTaskService: BgTaskService){
+class BgTaskController(val bgTaskService: BgTaskService) {
@ApiOperation(value = "鑾峰彇鍚庡彴浠诲姟鐘舵��")
@PostMapping("/status")
- fun getTaskStatus(@RequestBody condition: BgTaskConditionVo) = resPack { bgTaskService.getTaskStatus(condition) }
+ fun getTaskStatus(
+ @RequestBody condition: BgTaskConditionVo
+ ) = resPack { bgTaskService.getTaskStatus(condition) }
@ApiOperation(value = "杩愯涓�涓换鍔�")
@PutMapping("/start")
@@ -34,5 +37,6 @@
@ApiOperation(value = "鏂板缓涓�涓祴璇曚换鍔�")
@PutMapping("/newTask/test")
- fun newTestTask(@RequestParam taskId: String) = resPack { bgTaskService.newTestTask(taskId) }
+ fun newTestTask(@ApiParam(value = "鍚庡彴浠诲姟id") @RequestParam taskId: String) =
+ resPack { bgTaskService.newTestTask(taskId) }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeAdviceController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeAdviceController.kt
index d1e87a3..9fce5e2 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeAdviceController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeAdviceController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.lightshare.service.ChangeAdviceService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
@@ -7,8 +8,9 @@
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
-@Api(tags = ["ChangeAdviceController"], description = "鏁存敼寤鸿API鎺ュ彛")
+@Api(tags = ["鏁存敼寤鸿API鎺ュ彛"])
@RestController
+//@IgnoreResponseAdvice
@RequestMapping("/changeadvice")
class ChangeAdviceController(val changeAdviceService: ChangeAdviceService) {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeEffectController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeEffectController.kt
index 6252873..375aef5 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeEffectController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeEffectController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.lightshare.service.ChangeEffectService
import io.swagger.annotations.Api
import org.springframework.web.bind.annotation.GetMapping
@@ -8,6 +9,7 @@
@Api(tags = ["ChangeEffectController"], description = "鏁存敼鏁堟灉API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/changeeffect")
class ChangeEffectController(val changeEffectService: ChangeEffectService) {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/CityController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/CityController.kt
index ed1969a..a7994b3 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/CityController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/CityController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.City
import cn.flightfeather.supervision.lightshare.service.CityService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["CityController"], description = "鍩庡競淇℃伅API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/city")
class CityController(val cityService: CityService){
@GetMapping
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ComplaintController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ComplaintController.kt
index 8846516..f65c954 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ComplaintController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ComplaintController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.lightshare.service.ComplaintService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import io.swagger.annotations.Api
@@ -9,6 +10,7 @@
@Api(tags = ["淇¤鎶曡瘔鍙婅鏀垮缃氱浉鍏矨PI鎺ュ彛"])
@RestController
+@IgnoreResponseAdvice
@RequestMapping("")
class ComplaintController(val complaintService: ComplaintService) {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DistrictController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DistrictController.kt
index d4d5042..56077cd 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DistrictController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DistrictController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.District
import cn.flightfeather.supervision.lightshare.service.DistrictService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["DistrictController"], description = "鍖哄幙淇℃伅API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/district")
class DistrictController(val districtService: DistrictService){
@GetMapping
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomaincatalogController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomaincatalogController.kt
index daf8969..0849d25 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomaincatalogController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomaincatalogController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Domaincatalog
import cn.flightfeather.supervision.lightshare.service.DomaincatalogService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["DomaincatalogController"], description = "鍊煎煙鐩綍API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/domaincatalog")
class DomaincatalogController(val domaincatalogService: DomaincatalogService) {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomainitemController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomainitemController.kt
index 380364c..c9432f7 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomainitemController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomainitemController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Domainitem
import cn.flightfeather.supervision.lightshare.service.DomainitemService
import io.swagger.annotations.Api
@@ -9,6 +10,7 @@
@Api(tags = ["DomainitemController"], description = "鍊煎煙淇℃伅API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/domainitem")
class DomainitemController (val domainitemService: DomainitemService) {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
index 7515ab9..d8ece8a 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Evaluation
import cn.flightfeather.supervision.lightshare.service.EvaluationService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
@@ -15,21 +16,27 @@
@RestController
@RequestMapping("/evaluation")
class EvaluationController(val evaluationService: EvaluationService) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = evaluationService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody evaluation: Evaluation) = evaluationService.save(evaluation)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody evaluation: Evaluation) = evaluationService.update(evaluation)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = evaluationService.findOne(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = evaluationService.delete(id)
+ @IgnoreResponseAdvice
@GetMapping("/rankofscense")
fun getRankOfScense(
@RequestParam(value = "tguid", required = true) tguid: String,
@@ -37,27 +44,32 @@
@RequestParam(value = "ruletypeid", required = false) ruletypeid: ByteArray?,
) = evaluationService.getRankOfSense(tguid, scensetypeid, ruletypeid)
+ @IgnoreResponseAdvice
@GetMapping("/rankoftown")
fun getRankOfTown(
@RequestParam(value = "tguid", required = true) tguid: String,
@RequestParam(value = "scensetypeid", required = false) scensetypeid: String?,
) = evaluationService.getRankOfTown(tguid, scensetypeid)
+ @IgnoreResponseAdvice
@GetMapping("/autoScore")
fun autoScore(
@RequestParam(value = "districtCode") districtCode: String,
@RequestParam(value = "time") time: String,
) = evaluationService.autoScore(districtCode, time)
+ @IgnoreResponseAdvice
@GetMapping("/autoScore3")
fun autoScore3(
@RequestParam(value = "topTaskId") tGuid: String,
@RequestParam(value = "sceneTypeId") sceneTypeId: String,
) = evaluationService.autoScore3(tGuid, sceneTypeId)
+ @IgnoreResponseAdvice
@PostMapping("/autoScore")
fun autoScore2(@RequestParam(value = "subTaskId") subTaskId: String) = evaluationService.autoScore2(subTaskId)
+ @IgnoreResponseAdvice
@GetMapping("/byInspection")
fun findByInspectionId(@RequestParam("inspectionId") inspectionId: String) =
evaluationService.findByInspectionId(inspectionId)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationruleController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationruleController.kt
index 1f72cd9..13324b9 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationruleController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationruleController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
import cn.flightfeather.supervision.lightshare.service.EvaluationruleService
import cn.flightfeather.supervision.lightshare.vo.AreaEvaVo
@@ -11,18 +12,23 @@
@RestController
@RequestMapping("/evaluationrule")
class EvaluationruleController (val evaluationruleService: EvaluationruleService){
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = evaluationruleService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody evaluationrule: Evaluationrule) = evaluationruleService.save(evaluationrule)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody evaluationrule: Evaluationrule) = evaluationruleService.update(evaluationrule)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id:String) = evaluationruleService.findOne(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete (@PathVariable id: String) = evaluationruleService.delete(id)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt
index 8fc1806..18fba28 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
import cn.flightfeather.supervision.lightshare.service.EvaluationsubruleService
import io.swagger.annotations.Api
@@ -11,18 +12,23 @@
@RestController
@RequestMapping("/evaluationsubrule")
class EvaluationsubruleController(val evaluationsubruleService: EvaluationsubruleService) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = evaluationsubruleService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody evaluationsubrule: Evaluationsubrule2) = evaluationsubruleService.save(evaluationsubrule)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody evaluationsubrule: Evaluationsubrule2) = evaluationsubruleService.update(evaluationsubrule)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = evaluationsubruleService.findOne(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = evaluationsubruleService.delete(id)
@@ -32,6 +38,7 @@
@ApiParam("璇勪及鎬昏鍒欎富閿甶d") @RequestParam id: String
) = resPack { evaluationsubruleService.findByRuleId(id) }
+ @IgnoreResponseAdvice
@ApiOperation("鏍规嵁鍖哄幙鍜屽満鏅被鍨嬫煡璇㈣瘎鍒嗗瓙瑙勫垯")
@GetMapping("/search")
fun search(
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GitlistController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GitlistController.kt
index 0b23db5..c4377bc 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GitlistController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GitlistController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Gitlist
import cn.flightfeather.supervision.lightshare.service.GitlistService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["GitlistController"], description = "鎶�闃叉帾鏂借褰曚俊鎭疉PI鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/gitlist")
class GitlistController (val gitlistService: GitlistService){
@GetMapping
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GittypeController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GittypeController.kt
index 957d614..08f79df 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GittypeController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GittypeController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Gittype
import cn.flightfeather.supervision.lightshare.service.GittypeService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["GittypeController"], description = "鎶�闃叉帾鏂界被鍨婣PI鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/gittype")
class GittypeController (val gittypeService: GittypeService){
@GetMapping
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/InspectionController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/InspectionController.kt
index 464cb58..502dc57 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/InspectionController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/InspectionController.kt
@@ -1,6 +1,7 @@
package cn.flightfeather.supervision.lightshare.web
import cn.flightfeather.supervision.common.exception.BizException
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Inspection
import cn.flightfeather.supervision.lightshare.service.InspectionService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
@@ -14,34 +15,44 @@
@RestController
@RequestMapping("/inspection")
class InspectionController(val inspectionService: InspectionService) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = inspectionService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody inspection: Inspection) = inspectionService.save(inspection)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody inspection: Inspection) = inspectionService.update(inspection)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = inspectionService.findByID(id)
+ @IgnoreResponseAdvice
@GetMapping("/{id}/problemlist")
fun findProblemListById(@PathVariable id: String) = inspectionService.findProblemListById(id)
+ @IgnoreResponseAdvice
@GetMapping("/{id}/gitlist")
fun findGitListById(@PathVariable id: String) = inspectionService.findGitListById(id)
+ @IgnoreResponseAdvice
@GetMapping("/{id}/{date}/lastproblemlist")
fun findLastProblemListById(@PathVariable id: String, @PathVariable date: String) =
inspectionService.findLastProblemListBySenceId(id, date)
+ @IgnoreResponseAdvice
@GetMapping("/find/{id}")
fun findBySubTaskID(@PathVariable id: String) = inspectionService.findBySubTaskID(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = inspectionService.delete(id)
+ @IgnoreResponseAdvice
@GetMapping("/getInspectionInfoByScene")
fun getInspectionInfoByScene(
@RequestParam(value = "sceneId", required = true) sceneId: String,
@@ -54,15 +65,13 @@
@ApiParam("鎬讳换鍔d") @RequestParam(required = false) topTaskId: String?,
@ApiParam("鍦烘櫙绫诲瀷id") @RequestParam(required = false) sceneTypeId: String?,
@ApiParam("鍖哄煙鏉′欢") @RequestBody(required = false) areaVo: AreaVo?,
- ): BaseResponse<Any> {
- return resPack {
- if (topTaskId != null && sceneTypeId != null) {
- inspectionService.getStatistic(topTaskId, sceneTypeId)
- } else if (areaVo != null) {
- inspectionService.getStatistic(areaVo)
- } else {
- throw BizException("缂哄け鎬讳换鍔d鍜屽尯鍩熸潯浠讹紝璇烽�夋嫨浼犺緭鍏朵腑涓�绉嶅弬鏁�")
- }
+ ) = resPack {
+ if (topTaskId != null && sceneTypeId != null) {
+ inspectionService.getStatistic(topTaskId, sceneTypeId)
+ } else if (areaVo != null) {
+ inspectionService.getStatistic(areaVo)
+ } else {
+ throw BizException("缂哄け鎬讳换鍔d鍜屽尯鍩熸潯浠讹紝璇烽�夋嫨浼犺緭鍏朵腑涓�绉嶅弬鏁�")
}
}
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ItemevaluationController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ItemevaluationController.kt
index c6c9a34..b0fc75a 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ItemevaluationController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ItemevaluationController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
import cn.flightfeather.supervision.lightshare.service.ItemevaluationService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
@@ -13,27 +14,35 @@
@RestController
@RequestMapping("/itemevaluation")
class ItemevaluationController (val itemevaluationService: ItemevaluationService){
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = itemevaluationService.findAll()
+ @IgnoreResponseAdvice
@GetMapping("/subtask/{id}")
fun getBySubtaskId(@PathVariable id:String) = itemevaluationService.findBySubTaskID(id)
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody itemevaluation: Itemevaluation) = itemevaluationService.save(itemevaluation)
+ @IgnoreResponseAdvice
@PutMapping("/addlist")
fun addList(@RequestBody itemevaluationlist: List<Itemevaluation>) = itemevaluationService.savelist(itemevaluationlist)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody itemevaluation: Itemevaluation) = itemevaluationService.update(itemevaluation)
+ @IgnoreResponseAdvice
@PostMapping("/uplist")
fun updatelist(@RequestBody itemevaluationlist: List<Itemevaluation>) = itemevaluationService.updatelist(itemevaluationlist)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id:String) = itemevaluationService.findOne(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete (@PathVariable id: String) = itemevaluationService.delete(id)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LedgerController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LedgerController.kt
index 79854cc..c4dc0e1 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LedgerController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LedgerController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.lightshare.service.LedgerService
import cn.flightfeather.supervision.lightshare.vo.CopyLedgerVo
import io.swagger.annotations.Api
@@ -12,6 +13,7 @@
@RequestMapping("/ledger")
class LedgerController(private val ledgerService: LedgerService){
+ @IgnoreResponseAdvice
@ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫彴璐︿笂浼犲畬鎴愭儏鍐�")
@GetMapping("/summary")
fun getLedgerSummary(
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
index 47c5249..c9c90c9 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Mediafile
import cn.flightfeather.supervision.lightshare.service.MediafileService
import io.swagger.annotations.Api
@@ -12,18 +13,23 @@
@RestController
@RequestMapping("/mediafile")
class MediafileController(val mediafileService: MediafileService) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = mediafileService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody mediafile: Mediafile) = mediafileService.save(mediafile)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody mediafile: Mediafile) = mediafileService.update(mediafile)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = mediafileService.findOne(id)
+ @IgnoreResponseAdvice
@ApiOperation("鏍规嵁涓氬姟绫诲瀷鑾峰彇鏂囦欢")
@GetMapping("/{id}/{btid}")
fun getBySubtaskId(
@@ -31,16 +37,11 @@
@ApiParam("鏂囦欢涓氬姟绫诲瀷id", allowableValues = "") @PathVariable btid: String,
) = mediafileService.findBysubtaskbtid(id, btid)
- @ApiOperation("鑾峰彇鎵�鏈変换鎰忔媿甯歌璁板綍鍥剧墖", notes = "閫氳繃宸℃煡璁板綍id鎴栧贰鏌ヤ换鍔d鑾峰彇瀵瑰簲鐨勬墍鏈変换鎰忔媿鍥剧墖锛屼袱涓弬鏁颁换閫夊叾涓�鍗冲彲")
- @GetMapping("/routine")
- fun getRoutineRecord(
- @ApiParam("宸℃煡璁板綍id", required = false) @RequestParam(required = false) iGuid: String?,
- @ApiParam("宸℃煡浠诲姟id", required = false) @RequestParam(required = false) stGuid: String?,
- ) = resPack { mediafileService.getRoutineRecord(iGuid, stGuid) }
-
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = mediafileService.delete(id)
+ @IgnoreResponseAdvice
@PostMapping("/add")
fun addProblem(
@RequestParam("mediafileVoList") mediafileVoList: String,
@@ -48,4 +49,11 @@
) {
mediafileService.addMedifile(mediafileVoList, files)
}
+
+ @ApiOperation("鑾峰彇鎵�鏈変换鎰忔媿甯歌璁板綍鍥剧墖", notes = "閫氳繃宸℃煡璁板綍id鎴栧贰鏌ヤ换鍔d鑾峰彇瀵瑰簲鐨勬墍鏈変换鎰忔媿鍥剧墖锛屼袱涓弬鏁颁换閫夊叾涓�鍗冲彲")
+ @GetMapping("/routine")
+ fun getRoutineRecord(
+ @ApiParam("宸℃煡璁板綍id", required = false) @RequestParam(required = false) iGuid: String?,
+ @ApiParam("宸℃煡浠诲姟id", required = false) @RequestParam(required = false) stGuid: String?,
+ ) = resPack { mediafileService.getRoutineRecord(iGuid, stGuid) }
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MenuController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MenuController.kt
index 7b2b1d7..1d54801 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MenuController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MenuController.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.domain.ds1.entity.*
import cn.flightfeather.supervision.common.utils.DateUtil
import cn.flightfeather.supervision.common.utils.UUIDGenerator
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.lightshare.service.*
import cn.flightfeather.supervision.lightshare.vo.*
import org.springframework.beans.BeanUtils
@@ -21,6 +22,7 @@
@ApiIgnore
@Controller
+@IgnoreResponseAdvice
@RequestMapping("menu")
class MenuController {
@Autowired
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorobjectversionController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorobjectversionController.kt
index 6fbea7d..d3bfa90 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorobjectversionController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorobjectversionController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Monitorobjectversion
import cn.flightfeather.supervision.lightshare.service.MonitorobjectversionService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["MonitorobjectversionController"], description = "鐩戠宸℃煡鐗堟湰淇℃伅API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/monitorobjectversion")
class MonitorobjectversionController(val monitorobjectversionService: MonitorobjectversionService) {
@GetMapping
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/OpenApiWordController.java b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/OpenApiWordController.java
index 8e56a1e..7eeac79 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/OpenApiWordController.java
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/OpenApiWordController.java
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web;
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice;
import cn.flightfeather.supervision.lightshare.service.OpenApiWordService;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
@@ -21,8 +22,8 @@
import java.net.URLEncoder;
import java.util.Map;
+@IgnoreResponseAdvice
@Controller
-@Api(tags = "OpenAPI")
public class OpenApiWordController {
@Value("${swagger.url}")
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
index dac5f41..64dbbce 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
@@ -2,6 +2,7 @@
import cn.flightfeather.supervision.common.log.BizLog
import cn.flightfeather.supervision.common.log.WorkStreamLogInfo
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import cn.flightfeather.supervision.lightshare.service.ProblemlistService
import cn.flightfeather.supervision.lightshare.service.SubtaskService
@@ -21,12 +22,15 @@
val problemlistService: ProblemlistService,
val subtaskService: SubtaskService, private val bizLog: BizLog,
) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = problemlistService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody problemlist: Problemlist) = problemlistService.save(problemlist)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody problemlist: Problemlist):Int{
val res = problemlistService.update(problemlist)
@@ -38,46 +42,57 @@
return res
}
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = problemlistService.findByID(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = problemlistService.delete(id)
+
@PostMapping("/{id}")
fun setDeleteStatus(@PathVariable id: String) = problemlistService.setDeleteStatus(id)
+ @IgnoreResponseAdvice
@PostMapping("/add")
fun addProblem(@RequestBody problemlistVo: ProblemListVo) {
problemlistService.addProblem(problemlistVo)
}
+ @IgnoreResponseAdvice
@PostMapping("/getbyarea")
fun getByArea(@RequestBody areaVo: AreaVo): List<ProblemListVo> = problemlistService.getByArea(areaVo)
+ @IgnoreResponseAdvice
@GetMapping("/getbytoptask")
fun getByTopTask(@RequestParam(value = "tguid", required = true) tguid: String): List<ProblemListVo> =
problemlistService.getByTopTask(tguid)
+ @IgnoreResponseAdvice
@PostMapping("/getStatisticalResult")
fun getStatisticalResult(@RequestBody areaVo: AreaVo): List<StatisticsVo> =
problemlistService.getStatisticalResult(areaVo)
+ @IgnoreResponseAdvice
@PostMapping("/getStatisticalResultById")
fun getStatisticalResult(
@RequestParam(value = "id", required = true) topTaskId: String,
@RequestParam(value = "curSceneTypeId", required = true) sceneTypeId: String,
): List<StatisticsVo> = problemlistService.getStatisticalResultById(topTaskId, sceneTypeId)
+ @IgnoreResponseAdvice
@PostMapping("/getChargeResult")
fun getChargeResult(@RequestBody areaVo: AreaVo): ChargeInfoVo = problemlistService.getChargeResult(areaVo)
+ @IgnoreResponseAdvice
@GetMapping("/getProblemsByScene")
fun getProblemsByScene(
@RequestParam(value = "sceneId", required = true) sceneId: String,
@RequestParam date: String,
): List<ProblemListVo> = problemlistService.getProblemByScene(sceneId, date)
+ @IgnoreResponseAdvice
@GetMapping("/month_anlysis")
fun getMonthProblemsById(
@RequestParam(value = "taskId", required = true) taskId: String,
@@ -127,6 +142,7 @@
@ApiParam("鏂板鏁存敼鍥剧墖") @RequestPart("images") images: Array<MultipartFile>,
) = resPack { problemlistService.updateChange(problemId, deleteImg, images) }
+ @IgnoreResponseAdvice
@ApiOperation(value = "閫氳繃浠诲姟鏌ユ壘闂")
@GetMapping("/subtask")
fun getBySubTask(
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemtypeController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemtypeController.kt
index b3bd042..0812c98 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemtypeController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemtypeController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Problemtype
import cn.flightfeather.supervision.lightshare.service.ProblemtypeService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["ProblemtypeController"], description = "鐩戠闂绫诲埆API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/problemtype")
class ProblemtypeController (val problemtypeService: ProblemtypeService) {
@GetMapping
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProvinceController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProvinceController.kt
index 326d8a3..ed85f8a 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProvinceController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProvinceController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Province
import cn.flightfeather.supervision.lightshare.service.ProvinceService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["ProvinceController"], description = "鐪佷唤API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/province")
class ProvinceController(val provinceService: ProvinceService){
@GetMapping
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
index 2e2d523..9e6b5c7 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.entity.Task
import cn.flightfeather.supervision.lightshare.service.ScenseService
@@ -16,27 +17,35 @@
@RestController
@RequestMapping("/scense")
class ScenseController(val scenseService: ScenseService) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = scenseService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody scense: Scense) = scenseService.save(scense)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody scense: Scense) = scenseService.update(scense)
+ @IgnoreResponseAdvice
@PostMapping("/update/list")
fun updateList(@RequestBody sceneList: MutableList<Scense>) = scenseService.updateList(sceneList)
+ @IgnoreResponseAdvice
@PostMapping("/search")
fun find(@RequestBody scense: Scense) = scenseService.search(scense)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = scenseService.findOne(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = scenseService.delete(id)
+ @IgnoreResponseAdvice
@GetMapping("/alltype")
fun getSceneType() = scenseService.getSceneType()
@@ -46,6 +55,7 @@
* @param mode 0锛氬彧浼氳幏鍙栨�讳换鍔″搴旂殑鐩戠鐗堟湰涓瓨鍦ㄧ殑鍦烘櫙锛�1锛氶櫎浜嗙洃绠$増鏈腑瀛樺湪鐨勫満鏅紝杩樹細鑾峰彇鍓╀綑鐨勫彲鐢ㄥ満鏅�
* @return 鍦烘櫙鍒楄〃
*/
+ @IgnoreResponseAdvice
@PostMapping("/getByTask")
fun getByTaskId(@RequestBody task: Task, @RequestParam(value = "mode") mode: Int) = scenseService.getByTaskId(task, mode)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SearchController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SearchController.kt
index d95a418..486aca7 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SearchController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SearchController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.lightshare.service.SearchService
import cn.flightfeather.supervision.lightshare.service.SubtaskService
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
@@ -23,6 +24,7 @@
@Autowired
lateinit var searchService: SearchService
+ @IgnoreResponseAdvice
@GetMapping("/subtask")
fun searchSubTask(
@RequestParam("token") token: String,
@@ -73,6 +75,7 @@
@RequestParam("per_page", required = false) perPage: Int?
) = subtaskService.searchSubTask3(token, updateTime, sceneType, districtCode, startTime, endTime, page, perPage)
+ @IgnoreResponseAdvice
@ApiOperation(value = "鑾峰彇宸℃煡浠诲姟缁熻鎶ュ憡")
@PostMapping("/subtask/excel")
fun getExcel(
@@ -80,17 +83,20 @@
@ApiIgnore response: HttpServletResponse
) = searchService.getExcel(config, response)
+ @IgnoreResponseAdvice
@PostMapping("/subtask/detail")
fun getExcel(
@RequestBody config: ExcelConfigVo
) = searchService.getSubTaskDetail(config)
+ @IgnoreResponseAdvice
@PostMapping("/subtask/pic/download")
fun downloadPic(
@RequestBody config: ExcelConfigVo,
@ApiIgnore response: HttpServletResponse
) = searchService.downloadPic(config, response)
+ @IgnoreResponseAdvice
@GetMapping("/subtask/pic/download2")
fun downloadPic2(
@RequestParam("sceneType") sceneType: Int,
@@ -107,6 +113,7 @@
@RequestParam("perPage") perPage: Int
) = searchService.searchSubTaskByKeyword(userId, keyword, page, perPage)
+ @IgnoreResponseAdvice
@PostMapping("/dailyreport")
fun getDailyReport(
@RequestBody config: ExcelConfigVo
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SiteController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SiteController.kt
index fa8092a..a94fdcb 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SiteController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SiteController.kt
@@ -1,13 +1,15 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Site
import cn.flightfeather.supervision.lightshare.service.SiteService
import org.springframework.web.bind.annotation.*
import springfox.documentation.annotations.ApiIgnore
-//fixme 2020.10.10 鍘熺敤浜庡瓨鍌ㄥ伐鍦颁俊鎭紝鐜板凡鑸嶅純
+@Deprecated("2020.10.10 鍘熺敤浜庡瓨鍌ㄥ伐鍦颁俊鎭紝鐜板凡鑸嶅純")
@ApiIgnore
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/site")
class SiteController (val siteService: SiteService) {
@GetMapping
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 46d2217..9f35c54 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.common.log.BizLog
import cn.flightfeather.supervision.common.log.WorkStreamLogInfo
import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import cn.flightfeather.supervision.lightshare.service.SubtaskService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
@@ -17,22 +18,26 @@
@RestController
@RequestMapping("/subtask")
class SubtaskController(val subtaskService: SubtaskService, private val bizLog: BizLog) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = subtaskService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody subtask: Subtask) = subtaskService.save(subtask)
+ @IgnoreResponseAdvice
@PutMapping("/addlist")
fun addList(@RequestBody subtasklist: List<Subtask>) = subtaskService.saveList(subtasklist)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody subtask: Subtask): Int {
val res = subtaskService.changeStatus(subtask)
if (subtask.status == Constant.TaskProgress.RUNINGSTATUS3.text) {
val event = "鍦�${subtask.scensename}缁撴潫宸℃煡"
bizLog.info(WorkStreamLogInfo(subtask.executorguids, subtask.executorrealtimes, event))
- }else if (subtask.status == Constant.TaskProgress.RUNINGSTATUS2.text) {
+ } else if (subtask.status == Constant.TaskProgress.RUNINGSTATUS2.text) {
val event = "鍦�${subtask.scensename}寮�濮嬪贰鏌�"
bizLog.info(WorkStreamLogInfo(subtask.executorguids, subtask.executorrealtimes, event))
}
@@ -43,59 +48,80 @@
@PostMapping("/adjust")
fun adjust(@RequestBody subtask: Subtask) = resPack { subtaskService.update(subtask) }
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = subtaskService.findByID(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = subtaskService.delete(id)
+ @IgnoreResponseAdvice
@GetMapping("/{date}/{guid}/{type}")
- fun getTaskPackList(@PathVariable date: String, @PathVariable guid: String, @PathVariable type: String) = subtaskService.getTaskPackList(date, guid, type)
+ fun getTaskPackList(@PathVariable date: String, @PathVariable guid: String, @PathVariable type: String) =
+ subtaskService.getTaskPackList(date, guid, type)
//涓存椂娣诲姞鐢ㄦ埛绫诲瀷浣滀负绛涢�夋潯浠�
+ @IgnoreResponseAdvice
@GetMapping("/{date}/{guid}/{type}/{userType}")
- fun getTaskPackList(@PathVariable date: String, @PathVariable guid: String, @PathVariable type: String, @PathVariable userType: String) = subtaskService.getTaskPackList(date, guid, type, userType)
+ fun getTaskPackList(
+ @PathVariable date: String,
+ @PathVariable guid: String,
+ @PathVariable type: String,
+ @PathVariable userType: String,
+ ) = subtaskService.getTaskPackList(date, guid, type, userType)
+ @IgnoreResponseAdvice
@GetMapping("/{date}/{guid}")
fun getTaskPack(@PathVariable date: String, @PathVariable guid: String) = subtaskService.getTaskPack(date, guid)
+ @IgnoreResponseAdvice
@PostMapping("/subtaskprogress")
- fun getTaskProgress(@RequestBody areaVo: AreaVo, @RequestParam(value = "userguid", required = true) userGuid: String): TaskVo = subtaskService.getTaskProgress(areaVo, userGuid)
+ fun getTaskProgress(
+ @RequestBody areaVo: AreaVo,
+ @RequestParam(value = "userguid", required = true) userGuid: String,
+ ) = subtaskService.getTaskProgress(areaVo, userGuid)
+ @IgnoreResponseAdvice
@GetMapping("/byDayTaskId")
fun findByDayTaskID(
- @RequestParam("dayTaskId") dayTaskId: String,
- @RequestParam("userId") userId: String,
- @RequestParam("userType") userType: String
+ @RequestParam("dayTaskId") dayTaskId: String,
+ @RequestParam("userId") userId: String,
+ @RequestParam("userType") userType: String,
) = subtaskService.findByDayTaskID(dayTaskId, userId, userType)
+ @IgnoreResponseAdvice
@GetMapping("/byDate")
fun findByDate(
- @RequestParam("date") date: String,
- @RequestParam("userId") userId: String
+ @RequestParam("date") date: String,
+ @RequestParam("userId") userId: String,
) = subtaskService.findByDate(date, userId)
+ @IgnoreResponseAdvice
@GetMapping("/getSubTask")
fun getByTopTaskAndDate(
- @RequestParam("topTaskId") topTaskId: String,
- @RequestParam(value = "startTime", required = false) startTime: String?,
- @RequestParam(value = "endTime", required = false) endTime: String?,
- @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?
+ @RequestParam("topTaskId") topTaskId: String,
+ @RequestParam(value = "startTime", required = false) startTime: String?,
+ @RequestParam(value = "endTime", required = false) endTime: String?,
+ @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?,
) = subtaskService.getByTopTaskAndDate(topTaskId, startTime, endTime, sceneTypeId)
+ @IgnoreResponseAdvice
@ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫贰鏌ヤ换鍔$粺璁′俊鎭�")
@GetMapping("/summary")
fun getByTopTaskAndDate(
@RequestParam("topTaskId") topTaskId: String,
- @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?
+ @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?,
) = subtaskService.getSummary(topTaskId, sceneTypeId)
+ @IgnoreResponseAdvice
@ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫贰鏌ヤ换鍔$粺璁′俊鎭�")
@PostMapping("/summary/area")
fun getTaskProgressByArea(
@RequestBody areaVo: AreaVo,
) = subtaskService.getTaskProgressByArea(areaVo)
+ @IgnoreResponseAdvice
@ApiOperation("鑾峰彇鏌愪釜鍦烘櫙鐨勫贰鏌ヤ换鍔�")
@GetMapping("/byScene")
fun getByScene(
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TableController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TableController.kt
index a70f927..2ce97e6 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TableController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TableController.kt
@@ -1,6 +1,7 @@
package cn.flightfeather.supervision.lightshare.web
import cn.flightfeather.supervision.common.utils.DateUtil
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import org.docx4j.dml.wordprocessingDrawing.Inline
import org.docx4j.jaxb.Context
import org.docx4j.openpackaging.packages.WordprocessingMLPackage
@@ -19,6 +20,7 @@
@ApiIgnore
@Controller
+@IgnoreResponseAdvice
@RequestMapping("table")
class TableController {
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskController.kt
index a3251c1..46a83de 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Task
import cn.flightfeather.supervision.lightshare.service.TaskService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
@@ -12,33 +13,41 @@
@RequestMapping("/task")
class TaskController(val taskService: TaskService) {
+ @IgnoreResponseAdvice
@PutMapping
fun save(@RequestBody task: Task) = taskService.save(task)
@PutMapping("/create")
fun create(@RequestBody task: Task) = resPack { taskService.create(task) }
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody task: Task) = taskService.update(task)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = taskService.findByID(id)
+ @IgnoreResponseAdvice
@PostMapping("/lastTask")
fun getLastTask(@RequestBody task: Task) = taskService.findLastTask(task)
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = taskService.findAll()
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun deleteById(@PathVariable id: String) = taskService.delete(id)
+ @IgnoreResponseAdvice
@GetMapping("/alltask/{type}")
fun getAllbyCondition(@PathVariable type: Int) = taskService.getAllbyCondition(type)
/**
* 鏍规嵁鐢ㄦ埛鍙婄敤鎴风被鍨嬭幏鍙栨煇鏈堟墍鏈夋�讳换鍔�
*/
+ @IgnoreResponseAdvice
@GetMapping("/mothTask/{userId}")
fun getMonthTask(
@PathVariable("userId") userId: String,
@@ -49,6 +58,7 @@
/**
* 鏍规嵁椤跺眰浠诲姟id鍙婄敤鎴穒d鍜岀被鍨嬭幏鍙栨棩浠诲姟
*/
+ @IgnoreResponseAdvice
@GetMapping("/dayTask/{taskId}")
fun getDayTask(
@PathVariable("taskId") taskId: String,
@@ -56,12 +66,15 @@
@RequestParam("userType") userType: String
) = taskService.getDayTask(taskId, userId, userType)
+ @IgnoreResponseAdvice
@GetMapping("/taskprogress/{userid}")
fun getTaskProgress(@PathVariable userid: String) = taskService.getTaskProgress(userid)
+ @IgnoreResponseAdvice
@PostMapping("/getFrequency")
fun getFrequency(@RequestParam(value = "id", required = true)id: String) = taskService.getFrequency(id)
+ @IgnoreResponseAdvice
@PostMapping("/getRank")
fun getRank(@RequestParam(value = "id", required = true) id: String,
@RequestParam(value = "curSceneTypeId", required = true) sceneTypeId: String,
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskvertionController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskvertionController.kt
index 1102333..eeda971 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskvertionController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskvertionController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Taskvertion
import cn.flightfeather.supervision.lightshare.service.TaskvertionService
import org.springframework.web.bind.annotation.*
@@ -7,6 +8,7 @@
@ApiIgnore
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/tasksvertion")
class TaskvertionController(val taskvertionService: TaskvertionService) {
@GetMapping("")
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TownController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TownController.kt
index 3ed776b..83efa7f 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TownController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TownController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Town
import cn.flightfeather.supervision.lightshare.service.TownService
import io.swagger.annotations.Api
@@ -7,6 +8,7 @@
@Api(tags = ["TownController"], description = "琛楅晣API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/town")
class TownController(val townService: TownService){
@GetMapping
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserMapController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserMapController.kt
index bc0c0b9..0c97e39 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserMapController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserMapController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.lightshare.service.UserMapService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import cn.flightfeather.supervision.lightshare.vo.DeviceMapVo
@@ -13,10 +14,12 @@
@RequestMapping("/usermap")
class UserMapController(val userMapService: UserMapService) {
+ @IgnoreResponseAdvice
@ApiOperation(value = "鏍规嵁椋炵窘鐩戠绯荤粺涓殑鍦烘櫙id锛岃幏鍙栦笌椋炵窘鐜绯荤粺涓殑鍏宠仈鐢ㄦ埛")
@GetMapping
fun getTZId(@RequestParam sceneId: String) = userMapService.getTZIdBySceneId(sceneId)
+ @IgnoreResponseAdvice
@ApiOperation(value = "鏍规嵁椋炵窘鐜绯荤粺涓殑鐢ㄦ埛id锛岃幏鍙栦笌椋炵窘鐩戠绯荤粺涓殑鍏宠仈鐢ㄦ埛")
@GetMapping("/scene")
fun getSceneByTzId(@RequestParam tzUserId: String) = userMapService.getSceneByTZId(tzUserId)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserinfoController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserinfoController.kt
index 19127ca..db2d389 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserinfoController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserinfoController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Userinfo
import cn.flightfeather.supervision.lightshare.service.UserinfoService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
@@ -13,12 +14,15 @@
@CrossOrigin
@RequestMapping("/userinfo")
class UserinfoController(val userinfoService: UserinfoService) {
+ @IgnoreResponseAdvice
@GetMapping("")
fun getAll() = userinfoService.findAll()
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = userinfoService.findOne(id)
+ @IgnoreResponseAdvice
@ApiOperation(value = "鎸夌敤鎴风被鍨嬫悳绱㈢敤鎴蜂俊鎭�")
@GetMapping("/type/get")
fun getUserByTypeId(
@@ -26,12 +30,15 @@
@ApiParam("鐢ㄦ埛鏄惁鍙敤", required = false, defaultValue = "true") @RequestParam(required = false) enable: Boolean?
) = userinfoService.findByType(typeId, enable)
+ @IgnoreResponseAdvice
@PutMapping("")
fun add(@RequestBody userinfo: Userinfo) = userinfoService.save(userinfo)
+ @IgnoreResponseAdvice
@PostMapping("")
fun update(@RequestBody userinfo: Userinfo) = userinfoService.update(userinfo)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = userinfoService.delete(id)
@@ -51,12 +58,15 @@
perPage: Int?,
) = resPack { userinfoService.search(areaVo, keyword, userType, page, perPage) }
+ @IgnoreResponseAdvice
@PostMapping("/login")
fun getByName(@RequestBody userinfo: Userinfo) = userinfoService.findOneByName(userinfo)
+ @IgnoreResponseAdvice
@PostMapping("/create")
fun createAccount(sceneId: String) = userinfoService.createAccount(sceneId)
+ @IgnoreResponseAdvice
@GetMapping("/scene/get")
fun findByScene(sceneId: String) = userinfoService.findByScene(sceneId)
}
\ No newline at end of file
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt
index fe85cd3..89fc9f5 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Version
import cn.flightfeather.supervision.lightshare.service.VersionService
import io.swagger.annotations.Api
@@ -8,6 +9,7 @@
@Api(tags = ["VersionController"], description = "绉诲姩绔疉pp鐩稿叧API鎺ュ彛")
@RestController
+@IgnoreResponseAdvice
@RequestMapping("/version")
class VersionController(val versionService: VersionService) {
diff --git a/src/main/resources/generator/generatorConfig4ds1.xml b/src/main/resources/generator/generatorConfig4ds1.xml
index 74c0347..8809639 100644
--- a/src/main/resources/generator/generatorConfig4ds1.xml
+++ b/src/main/resources/generator/generatorConfig4ds1.xml
@@ -11,6 +11,10 @@
<property name="javaFileEncoding" value="UTF-8"/>
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
+ <!-- 閰嶇疆鑷畾涔夋敞瑙f彃浠� -->
+ <plugin type="cn.flight.feather.devtool.mybatis.plugin.CustomAnnotationPlugin">
+ <!-- 鍙互鍦ㄨ繖閲屾坊鍔犳彃浠跺睘鎬� -->
+ </plugin>
<plugin type="${mapper.plugin}">
<property name="mappers" value="${mapper.Mapper}"/>
</plugin>
@@ -33,38 +37,39 @@
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- 鐢熸垚鏄犲皠鏂囦欢鐨勫寘鍚嶅拰浣嶇疆-->
- <sqlMapGenerator targetPackage="ds1" targetProject="src/main/resources/mapper">
- <property name="enableSubPackages" value="true"/>
- </sqlMapGenerator>
+<!-- <sqlMapGenerator targetPackage="ds1" targetProject="src/main/resources/mapper">-->
+<!-- <property name="enableSubPackages" value="true"/>-->
+<!-- </sqlMapGenerator>-->
<!-- 鐢熸垚DAO鐨勫寘鍚嶅拰浣嶇疆-->
- <javaClientGenerator type="XMLMAPPER" targetPackage="cn.flightfeather.supervision.domain.ds1.mapper" targetProject="src/main/kotlin">
- <property name="enableSubPackages" value="true"/>
- </javaClientGenerator>
+<!-- <javaClientGenerator type="XMLMAPPER" targetPackage="cn.flightfeather.supervision.domain.ds1.mapper" targetProject="src/main/kotlin">-->
+<!-- <property name="enableSubPackages" value="true"/>-->
+<!-- </javaClientGenerator>-->
<!-- 瑕佺敓鎴愮殑琛� tableName鏄暟鎹簱涓殑琛ㄥ悕鎴栬鍥惧悕 domainObjectName鏄疄浣撶被鍚�-->
- <!--<table tableName="sm_t_changeadvice" domainObjectName="ChangeAdvice" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
- <!--<table tableName="sm_t_changeeffect" domainObjectName="ChangeEffect" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
- <!--<table tableName="sm_t_monitorobjectversion" domainObjectName="Monitorobjectversion" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
- <!--<table tableName="tm_t_subtask" domainObjectName="Subtask" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
-<!-- <table tableName="sm_t_scene_construction_site" domainObjectName="SceneConstructionSite" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
-<!-- <table tableName="sm_t_scene_device" domainObjectName="SceneDevice" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
-<!-- <table tableName="sm_t_scene_mixing_plant" domainObjectName="SceneMixingPlant" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
-<!-- <table tableName="sm_t_scene_storage_yard" domainObjectName="SceneStorageYard" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
-<!-- <table tableName="sm_t_scene_wharf" domainObjectName="SceneWharf" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
-<!-- <table tableName="sm_t_night_construction" domainObjectName="NightConstruction" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
-<!-- <table tableName="sm_t_score" domainObjectName="Score" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>-->
-<!-- <table tableName="sm_t_scense" domainObjectName="Scense" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>-->
-<!-- <table tableName="ea_t_mediafile" domainObjectName="LedgerMediaFile" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>-->
-<!-- <table tableName="ea_t_dust_data_result" domainObjectName="DustDataResult" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
-<!-- enableSelectByExample="false" selectByExampleQueryId="false"/>-->
-<!-- <table tableName="ea_t_evaluation" domainObjectName="Evaluation" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"-->
-<!-- enableSelectByExample="false" selectByExampleQueryId="false"/>-->
- <table tableName="di_t_monitor_device_info" domainObjectName="MonitorDeviceInfo" enableCountByExample="false"
- enableUpdateByExample="false" enableDeleteByExample="false"
+ <table tableName="sm_t_changeadvice" domainObjectName="ChangeAdvice" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_changeeffect" domainObjectName="ChangeEffect" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_monitorobjectversion" domainObjectName="Monitorobjectversion" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="tm_t_subtask" domainObjectName="Subtask" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_scene_construction_site" domainObjectName="SceneConstructionSite" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_scene_device" domainObjectName="SceneDevice" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_scene_mixing_plant" domainObjectName="SceneMixingPlant" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_scene_storage_yard" domainObjectName="SceneStorageYard" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_scene_wharf" domainObjectName="SceneWharf" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_night_construction" domainObjectName="NightConstruction" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
+ <table tableName="sm_t_score" domainObjectName="Score" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>
+ <table tableName="sm_t_scense" domainObjectName="Scense" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>
+ <table tableName="ea_t_mediafile" domainObjectName="LedgerMediaFile" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>
+ <table tableName="ea_t_dust_data_result" domainObjectName="DustDataResult" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false"/>
- <table tableName="di_t_treatment_device_info" domainObjectName="TreatmentDeviceInfo"
- enableCountByExample="false"
- enableUpdateByExample="false" enableDeleteByExample="false"
+ <table tableName="ea_t_evaluation" domainObjectName="Evaluation" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false"/>
+<!-- <table tableName="di_t_monitor_device_info" domainObjectName="MonitorDeviceInfo" enableCountByExample="false"-->
+<!-- enableUpdateByExample="false" enableDeleteByExample="false"-->
+<!-- enableSelectByExample="false" selectByExampleQueryId="false">-->
+<!-- </table>-->
+<!-- <table tableName="di_t_treatment_device_info" domainObjectName="TreatmentDeviceInfo"-->
+<!-- enableCountByExample="false"-->
+<!-- enableUpdateByExample="false" enableDeleteByExample="false"-->
+<!-- enableSelectByExample="false" selectByExampleQueryId="false"/>-->
<table tableName="di_t_production_device_info" domainObjectName="ProductionDeviceInfo"
enableCountByExample="false"
enableUpdateByExample="false" enableDeleteByExample="false"
diff --git a/src/main/resources/mapper/ds1/MonitorDeviceInfoMapper.xml b/src/main/resources/mapper/ds1/MonitorDeviceInfoMapper.xml
index 7efc9e7..b54c1b3 100644
--- a/src/main/resources/mapper/ds1/MonitorDeviceInfoMapper.xml
+++ b/src/main/resources/mapper/ds1/MonitorDeviceInfoMapper.xml
@@ -1,36 +1,36 @@
-<?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.MonitorDeviceInfoMapper" >
- <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo" >
+<?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.MonitorDeviceInfoMapper">
+ <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo">
<!--
WARNING - @mbg.generated
-->
- <id column="DI_ID" property="diId" jdbcType="INTEGER" />
- <result column="DI_Device_Code" property="diDeviceCode" jdbcType="VARCHAR" />
- <result column="DI_Name" property="diName" jdbcType="VARCHAR" />
- <result column="DI_Scene_GUID" property="diSceneGuid" jdbcType="VARCHAR" />
- <result column="DI_Scene_Type_Id" property="diSceneTypeId" jdbcType="TINYINT" />
- <result column="DI_Type_Id" property="diTypeId" jdbcType="TINYINT" />
- <result column="DI_Subtype_Id" property="diSubtypeId" jdbcType="TINYINT" />
- <result column="DI_Supplier" property="diSupplier" jdbcType="VARCHAR" />
- <result column="DI_Maintainer" property="diMaintainer" jdbcType="VARCHAR" />
- <result column="DI_Maintain_Frequency" property="diMaintainFrequency" jdbcType="TINYINT" />
- <result column="DI_Maintain_Staff" property="diMaintainStaff" jdbcType="VARCHAR" />
- <result column="DI_Maintain_Tel" property="diMaintainTel" jdbcType="VARCHAR" />
- <result column="DI_Running_Status" property="diRunningStatus" jdbcType="TINYINT" />
- <result column="DI_Brand_Model" property="diBrandModel" jdbcType="VARCHAR" />
- <result column="DI_Device_Param" property="diDeviceParam" jdbcType="VARCHAR" />
- <result column="DI_Ownership" property="diOwnership" jdbcType="TINYINT" />
- <result column="DI_QR_Code" property="diQrCode" jdbcType="VARCHAR" />
- <result column="DI_Other_QR_Code" property="diOtherQrCode" jdbcType="VARCHAR" />
- <result column="DI_Create_Time" property="diCreateTime" jdbcType="TIMESTAMP" />
- <result column="DI_Update_Time" property="diUpdateTime" jdbcType="TIMESTAMP" />
+ <id column="DI_ID" jdbcType="INTEGER" property="diId" />
+ <result column="DI_Device_Code" jdbcType="VARCHAR" property="diDeviceCode" />
+ <result column="DI_Name" jdbcType="VARCHAR" property="diName" />
+ <result column="DI_Scene_GUID" jdbcType="VARCHAR" property="diSceneGuid" />
+ <result column="DI_Scene_Type_Id" jdbcType="TINYINT" property="diSceneTypeId" />
+ <result column="DI_Type_Id" jdbcType="TINYINT" property="diTypeId" />
+ <result column="DI_Subtype_Id" jdbcType="TINYINT" property="diSubtypeId" />
+ <result column="DI_Supplier" jdbcType="VARCHAR" property="diSupplier" />
+ <result column="DI_Maintainer" jdbcType="VARCHAR" property="diMaintainer" />
+ <result column="DI_Maintain_Frequency" jdbcType="TINYINT" property="diMaintainFrequency" />
+ <result column="DI_Maintain_Staff" jdbcType="VARCHAR" property="diMaintainStaff" />
+ <result column="DI_Maintain_Tel" jdbcType="VARCHAR" property="diMaintainTel" />
+ <result column="DI_Running_Status" jdbcType="TINYINT" property="diRunningStatus" />
+ <result column="DI_Brand_Model" jdbcType="VARCHAR" property="diBrandModel" />
+ <result column="DI_Device_Param" jdbcType="VARCHAR" property="diDeviceParam" />
+ <result column="DI_Ownership" jdbcType="TINYINT" property="diOwnership" />
+ <result column="DI_QR_Code" jdbcType="VARCHAR" property="diQrCode" />
+ <result column="DI_Other_QR_Code" jdbcType="VARCHAR" property="diOtherQrCode" />
+ <result column="DI_Create_Time" jdbcType="TIMESTAMP" property="diCreateTime" />
+ <result column="DI_Update_Time" jdbcType="TIMESTAMP" property="diUpdateTime" />
</resultMap>
- <sql id="Base_Column_List" >
+ <sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
- DI_ID, DI_Device_Code, DI_Name, DI_Scene_GUID, DI_Scene_Type_Id, DI_Type_Id, DI_Subtype_Id,
+ DI_ID, DI_Device_Code, DI_Name, DI_Scene_GUID, DI_Scene_Type_Id, DI_Type_Id, DI_Subtype_Id,
DI_Supplier, DI_Maintainer, DI_Maintain_Frequency, DI_Maintain_Staff, DI_Maintain_Tel,
DI_Running_Status, DI_Brand_Model, DI_Device_Param, DI_Ownership, DI_QR_Code, DI_Other_QR_Code,
DI_Create_Time, DI_Update_Time
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 0aa07ff..a904ee8 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
@@ -63,21 +63,21 @@
*/
@Test
fun test1() {
- val taskId = "P7hsgDedyN9XLrbt"
+ val taskId = "qpou6fonNsye9WC1"
val districtCode = "310106"
- val year = 2024
- val month = 6
+ val year = 2025
+ val month = 9
val sceneType = Constant.SceneType.TYPE1.value.toInt()
jaCsDataAnalysis.setResource(taskId, sceneType, year, month)
jaCsDataAnalysis.execute()
aopEvaluation.executeByTopTask(taskId, sceneType)
- val mode = 9
- searchService.writeToFile(ExcelConfigVo(
- taskId,
- districtCode = districtCode,
- sceneType = sceneType), mode)
+// val mode = 9
+// searchService.writeToFile(ExcelConfigVo(
+// taskId,
+// districtCode = districtCode,
+// sceneType = sceneType), mode)
}
/**
diff --git a/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt b/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt
index 03e3a32..e61ede2 100644
--- a/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt
+++ b/src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt
@@ -28,7 +28,7 @@
@Test
fun startEvaluation() {
- val time = LocalDate.of(2024, 7, 23).atStartOfDay()
+ val time = LocalDate.of(2025, 9, 1).atStartOfDay()
aopTaskCtrl.startEvaluation(aopTaskCtrl.getArea(time, "310106", "闈欏畨鍖�", Constant.SceneType.TYPE1))
}
@@ -48,9 +48,9 @@
@Test
fun startNewTask(){
- val time = LocalDate.of(2024, 6, 23).atStartOfDay()
-// aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310106", "闈欏畨鍖�", Constant.SceneType.TYPE1))
- aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310104", "寰愭眹鍖�", Constant.SceneType.TYPE5))
+ val time = LocalDate.of(2025, 9, 23).atStartOfDay()
+ aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310106", "闈欏畨鍖�", Constant.SceneType.TYPE1))
+// aopTaskCtrl.startNewTask(aopTaskCtrl.getArea(time, "310104", "寰愭眹鍖�", Constant.SceneType.TYPE5))
val reader = BufferedReader(InputStreamReader(System.`in`))
reader.readLine()
}
--
Gitblit v1.9.3