2025.10.13
1. 统一调整controller层的返回类型,通过添加全局响应增强器GlobalResponseAdvice来管理返回结果;
2. 新增mybatis-generator自定义插件,实现给数据库实体entity自动添加swagger注解@ApiModel和@ApiModelProperty
已修改50个文件
已添加4个文件
853 ■■■■ 文件已修改
pom.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/autooutput/dataanalysis/AopDataAnalysis.kt 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/business/report/cols/ColTotalGrade.kt 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskConditionVo.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/executor/BgTaskType.kt 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/config/GlobalResponseAdvice.kt 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/config/IgnoreResponseAdvice.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/config/RestExceptionHandler.kt 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/config/Swagger2Configuration.kt 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/MonitorDeviceInfo.java 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/entity/TreatmentDeviceInfo.java 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/mapper/MonitorDeviceInfoMapper.kt 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/generatePlugin/CustomAnnotationPlugin.kt 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseResponse.kt 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/BaseSearchResultVo.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BgTaskController.kt 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeAdviceController.kt 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ChangeEffectController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/CityController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ComplaintController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DistrictController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomaincatalogController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DomainitemController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationruleController.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GitlistController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/GittypeController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/InspectionController.kt 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ItemevaluationController.kt 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LedgerController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MenuController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MonitorobjectversionController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/OpenApiWordController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemtypeController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProvinceController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SearchController.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SiteController.kt 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TableController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskController.kt 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TaskvertionController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/TownController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserMapController.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserinfoController.kt 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/VersionController.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/generator/generatorConfig4ds1.xml 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ds1/MonitorDeviceInfoMapper.xml 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/business/bgtask/AopTaskCtrlTest.kt 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>-->
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)
        }
    }
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)
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
}
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, "生成文档任务");
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)
    }
}
src/main/kotlin/cn/flightfeather/supervision/config/IgnoreResponseAdvice.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package cn.flightfeather.supervision.config
/**
 * å¿½ç•¥å…¨å±€å“åº”增强注解
 * ç”¨äºŽæ ‡æ³¨åœ¨Controller的方法上,标识该方法不进行全局响应增强
 */
annotation class IgnoreResponseAdvice
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)
    }
}
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
 * è®¿é—®åœ°å€ï¼šhttp://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()
}
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;
    /**
     * æ‰€å±žåœºæ™¯id
     */
    @Column(name = "DI_Scene_GUID")
    @ApiModelProperty(value = "所属场景id")
    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;
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;
    /**
     * æ‰€å±žåœºæ™¯id
     */
    @Column(name = "PI_Scene_GUID")
    @ApiModelProperty(value = "所属场景id")
    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;
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> {
}
interface MonitorDeviceInfoMapper : MyMapper<MonitorDeviceInfo?>
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自定义注解插件
 * ç”¨äºŽä¸ºç”Ÿæˆçš„实体类添加自定义注解
 * @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,使用字段名)添加为Swagger注解,用于API文档生成
        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)
    }
}
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 -> ""
                        }
                    })
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())
        }
    }
}
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
)
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) }
}
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) {
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) {
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
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 = ["信访投诉及行政处罚相关API接口"])
@RestController
@IgnoreResponseAdvice
@RequestMapping("")
class ComplaintController(val complaintService: ComplaintService) {
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
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) {
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) {
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)
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)
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("评估总规则主键id") @RequestParam id: String
    ) = resPack { evaluationsubruleService.findByRuleId(id) }
    @IgnoreResponseAdvice
    @ApiOperation("根据区县和场景类型查询评分子规则")
    @GetMapping("/search")
    fun search(
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 = "技防措施记录信息API接口")
@RestController
@IgnoreResponseAdvice
@RequestMapping("/gitlist")
class GitlistController (val gitlistService: GitlistService){
    @GetMapping
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 = "技防措施类型API接口")
@RestController
@IgnoreResponseAdvice
@RequestMapping("/gittype")
class GittypeController (val gittypeService: GittypeService){
    @GetMapping
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("总任务id") @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("缺失总任务id和区域条件,请选择传输其中一种参数")
            }
    ) = resPack {
        if (topTaskId != null && sceneTypeId != null) {
            inspectionService.getStatistic(topTaskId, sceneTypeId)
        } else if (areaVo != null) {
            inspectionService.getStatistic(areaVo)
        } else {
            throw BizException("缺失总任务id和区域条件,请选择传输其中一种参数")
        }
    }
}
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)
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(
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或巡查任务id获取对应的所有任意拍图片,两个参数任选其一即可")
    @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或巡查任务id获取对应的所有任意拍图片,两个参数任选其一即可")
    @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) }
}
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
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
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}")
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(
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
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
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)
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
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
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(
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 {
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及用户id和类型获取日任务
     */
    @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,
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("")
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
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)
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)
}
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 = "移动端App相关API接口")
@RestController
@IgnoreResponseAdvice
@RequestMapping("/version")
class VersionController(val versionService: VersionService) {
src/main/resources/generator/generatorConfig4ds1.xml
@@ -11,6 +11,10 @@
        <property name="javaFileEncoding" value="UTF-8"/>
        <property name="beginningDelimiter" value="`"/>
        <property name="endingDelimiter" value="`"/>
        <!-- é…ç½®è‡ªå®šä¹‰æ³¨è§£æ’ä»¶ -->
        <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"
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
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)
    }
    /**
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()
    }