2025.10.13
1. 统一调整controller层的返回类型,通过添加全局响应增强器GlobalResponseAdvice来管理返回结果;
2. 新增mybatis-generator自定义插件,实现给数据库实体entity自动添加swagger注解@ApiModel和@ApiModelProperty
| | |
| | | <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> |
| | |
| | | <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>--> |
| | |
| | | //è·ååå§çæµæ°æ® |
| | | 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) |
| | | } |
| | | } |
| | | |
| | |
| | | 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) |
| | |
| | | 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 |
| | | } |
| | |
| | | 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, "çæææ¡£ä»»å¡"); |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.config |
| | | |
| | | /** |
| | | * 忽ç¥å
¨å±ååºå¢å¼ºæ³¨è§£ |
| | | * ç¨äºæ 注å¨Controllerçæ¹æ³ä¸ï¼æ è¯è¯¥æ¹æ³ä¸è¿è¡å
¨å±ååºå¢å¼º |
| | | */ |
| | | annotation class IgnoreResponseAdvice |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
| | | } |
| | |
| | | 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 |
| | |
| | | /** |
| | | * @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 { |
| | |
| | | |
| | | @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() |
| | | } |
| | |
| | | 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; |
| | |
| | | /** |
| | | * è·ååºæ¯ç±»åid |
| | | * |
| | | * @return PI_Scene_Type_Id - åºæ¯ç±»åid |
| | | * @return DI_Scene_Type_Id - åºæ¯ç±»åid |
| | | */ |
| | | public Byte getDiSceneTypeId() { |
| | | return diSceneTypeId; |
| | |
| | | } |
| | | |
| | | /** |
| | | * @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; |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·ååå设æ½åç§° |
| | | * è·åæ²»ç设å¤åç§° |
| | | * |
| | | * @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(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * @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(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * @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; |
| | |
| | | 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?> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | } |
| | | } |
| | |
| | | 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 -> "" |
| | | } |
| | | }) |
| | |
| | | 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()) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | 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()) |
| | | } |
| | | } |
| | | } |
| | |
| | | package cn.flightfeather.supervision.lightshare.vo |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude |
| | | import io.swagger.annotations.ApiModel |
| | | import io.swagger.annotations.ApiModelProperty |
| | | |
| | | /** |
| | | * @author riku |
| | |
| | | var data: MutableList<Any> = mutableListOf() |
| | | } |
| | | |
| | | @ApiModel("请æ±è¿åæ°æ®å¤´") |
| | | data class DataHead( |
| | | @ApiModelProperty("å½å页ç ") |
| | | var page: Int = 1, |
| | | @ApiModelProperty("æ»é¡µæ°") |
| | | var totalPage: Int = 1, |
| | | @ApiModelProperty("æ»è®°å½æ°") |
| | | var totalCount:Long = 0 |
| | | ) |
| | | |
| | |
| | | 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") |
| | |
| | | |
| | | @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) } |
| | | } |
| | |
| | | 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 |
| | |
| | | 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) { |
| | | |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["ChangeEffectController"], description = "æ´æ¹ææAPIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/changeeffect") |
| | | class ChangeEffectController(val changeEffectService: ChangeEffectService) { |
| | | |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["CityController"], description = "åå¸ä¿¡æ¯APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/city") |
| | | class CityController(val cityService: CityService){ |
| | | @GetMapping |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["信访æè¯åè¡æ¿å¤ç½ç¸å
³APIæ¥å£"]) |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("") |
| | | class ComplaintController(val complaintService: ComplaintService) { |
| | | |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["DistrictController"], description = "åºå¿ä¿¡æ¯APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/district") |
| | | class DistrictController(val districtService: DistrictService){ |
| | | @GetMapping |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["DomaincatalogController"], description = "å¼åç®å½APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/domaincatalog") |
| | | class DomaincatalogController(val domaincatalogService: DomaincatalogService) { |
| | | |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["DomainitemController"], description = "å¼åä¿¡æ¯APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/domainitem") |
| | | class DomainitemController (val domainitemService: DomainitemService) { |
| | | |
| | |
| | | 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 |
| | |
| | | @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, |
| | |
| | | @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) |
| | |
| | | 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 |
| | |
| | | @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) |
| | | |
| | |
| | | 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 |
| | |
| | | @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) |
| | | |
| | |
| | | @ApiParam("è¯ä¼°æ»è§å主é®id") @RequestParam id: String |
| | | ) = resPack { evaluationsubruleService.findByRuleId(id) } |
| | | |
| | | @IgnoreResponseAdvice |
| | | @ApiOperation("æ ¹æ®åºå¿ååºæ¯ç±»åæ¥è¯¢è¯ååè§å") |
| | | @GetMapping("/search") |
| | | fun search( |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["GitlistController"], description = "æé²æªæ½è®°å½ä¿¡æ¯APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/gitlist") |
| | | class GitlistController (val gitlistService: GitlistService){ |
| | | @GetMapping |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["GittypeController"], description = "æé²æªæ½ç±»åAPIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/gittype") |
| | | class GittypeController (val gittypeService: GittypeService){ |
| | | @GetMapping |
| | |
| | | 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 |
| | |
| | | @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, |
| | |
| | | @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ååºåæ¡ä»¶ï¼è¯·éæ©ä¼ è¾å
¶ä¸ä¸ç§åæ°") |
| | | } |
| | | } |
| | | } |
| | |
| | | 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 |
| | |
| | | @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) |
| | | |
| | |
| | | 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 |
| | |
| | | @RequestMapping("/ledger") |
| | | class LedgerController(private val ledgerService: LedgerService){ |
| | | |
| | | @IgnoreResponseAdvice |
| | | @ApiOperation("è·åæç±»åºæ¯çå°è´¦ä¸ä¼ 宿æ
åµ") |
| | | @GetMapping("/summary") |
| | | fun getLedgerSummary( |
| | |
| | | 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 |
| | |
| | | @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( |
| | |
| | | @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, |
| | |
| | | ) { |
| | | 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) } |
| | | } |
| | |
| | | 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 |
| | |
| | | |
| | | @ApiIgnore |
| | | @Controller |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("menu") |
| | | class MenuController { |
| | | @Autowired |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["MonitorobjectversionController"], description = "ç管巡æ¥çæ¬ä¿¡æ¯APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/monitorobjectversion") |
| | | class MonitorobjectversionController(val monitorobjectversionService: MonitorobjectversionService) { |
| | | @GetMapping |
| | |
| | | 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; |
| | |
| | | import java.net.URLEncoder; |
| | | import java.util.Map; |
| | | |
| | | @IgnoreResponseAdvice |
| | | @Controller |
| | | @Api(tags = "OpenAPI") |
| | | public class OpenApiWordController { |
| | | |
| | | @Value("${swagger.url}") |
| | |
| | | |
| | | 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 |
| | |
| | | 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) |
| | |
| | | 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, |
| | |
| | | @ApiParam("æ°å¢æ´æ¹å¾ç") @RequestPart("images") images: Array<MultipartFile>, |
| | | ) = resPack { problemlistService.updateChange(problemId, deleteImg, images) } |
| | | |
| | | @IgnoreResponseAdvice |
| | | @ApiOperation(value = "éè¿ä»»å¡æ¥æ¾é®é¢") |
| | | @GetMapping("/subtask") |
| | | fun getBySubTask( |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["ProblemtypeController"], description = "ç管é®é¢ç±»å«APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/problemtype") |
| | | class ProblemtypeController (val problemtypeService: ProblemtypeService) { |
| | | @GetMapping |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["ProvinceController"], description = "ç份APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/province") |
| | | class ProvinceController(val provinceService: ProvinceService){ |
| | | @GetMapping |
| | |
| | | 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 |
| | |
| | | @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() |
| | | |
| | |
| | | * @param mode 0ï¼åªä¼è·åæ»ä»»å¡å¯¹åºççç®¡çæ¬ä¸åå¨çåºæ¯ï¼1ï¼é¤äºçç®¡çæ¬ä¸åå¨çåºæ¯ï¼è¿ä¼è·åå©ä½çå¯ç¨åºæ¯ |
| | | * @return åºæ¯å表 |
| | | */ |
| | | @IgnoreResponseAdvice |
| | | @PostMapping("/getByTask") |
| | | fun getByTaskId(@RequestBody task: Task, @RequestParam(value = "mode") mode: Int) = scenseService.getByTaskId(task, mode) |
| | | |
| | |
| | | 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 |
| | |
| | | @Autowired |
| | | lateinit var searchService: SearchService |
| | | |
| | | @IgnoreResponseAdvice |
| | | @GetMapping("/subtask") |
| | | fun searchSubTask( |
| | | @RequestParam("token") token: String, |
| | |
| | | @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( |
| | |
| | | @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, |
| | |
| | | @RequestParam("perPage") perPage: Int |
| | | ) = searchService.searchSubTaskByKeyword(userId, keyword, page, perPage) |
| | | |
| | | @IgnoreResponseAdvice |
| | | @PostMapping("/dailyreport") |
| | | fun getDailyReport( |
| | | @RequestBody config: ExcelConfigVo |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | @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)) |
| | | } |
| | |
| | | @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( |
| | |
| | | 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 |
| | |
| | | |
| | | @ApiIgnore |
| | | @Controller |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("table") |
| | | class TableController { |
| | | |
| | |
| | | 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 |
| | |
| | | @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, |
| | |
| | | /** |
| | | * æ ¹æ®é¡¶å±ä»»å¡idåç¨æ·idåç±»åè·åæ¥ä»»å¡ |
| | | */ |
| | | @IgnoreResponseAdvice |
| | | @GetMapping("/dayTask/{taskId}") |
| | | fun getDayTask( |
| | | @PathVariable("taskId") taskId: String, |
| | |
| | | @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, |
| | |
| | | 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.* |
| | |
| | | |
| | | @ApiIgnore |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/tasksvertion") |
| | | class TaskvertionController(val taskvertionService: TaskvertionService) { |
| | | @GetMapping("") |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["TownController"], description = "è¡éAPIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/town") |
| | | class TownController(val townService: TownService){ |
| | | @GetMapping |
| | |
| | | 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 |
| | |
| | | @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) |
| | |
| | | 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 |
| | |
| | | @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( |
| | |
| | | @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) |
| | | |
| | |
| | | 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) |
| | | } |
| | |
| | | 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 |
| | |
| | | |
| | | @Api(tags = ["VersionController"], description = "ç§»å¨ç«¯Appç¸å
³APIæ¥å£") |
| | | @RestController |
| | | @IgnoreResponseAdvice |
| | | @RequestMapping("/version") |
| | | class VersionController(val versionService: VersionService) { |
| | | |
| | |
| | | <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> |
| | |
| | | <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" |
| | |
| | | <?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 |
| | |
| | | */ |
| | | @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) |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | @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)) |
| | | } |
| | | |
| | |
| | | |
| | | @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() |
| | | } |