iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/McsApi.java
@@ -1,10 +1,7 @@ package com.iailab.module.model.api.mcs; import com.iailab.framework.common.pojo.CommonResult; import com.iailab.module.model.api.mcs.dto.AlarmMessageDTO; import com.iailab.module.model.api.mcs.dto.PredictItemInfoDTO; import com.iailab.module.model.api.mcs.dto.PredictItemTreeDTO; import com.iailab.module.model.api.mcs.dto.ScheduleSuggestDTO; import com.iailab.module.model.api.mcs.dto.*; import com.iailab.module.model.enums.ApiConstants; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -23,7 +20,7 @@ * @createTime 2024年08月26日 */ @FeignClient(name = ApiConstants.NAME) @Tag(name = "RPC 服务 - MCS") @Tag(name = "RPC 服务 - 模型配置接口") public interface McsApi { String PREFIX = ApiConstants.PREFIX + "/mcs"; @@ -38,18 +35,25 @@ @PostMapping(PREFIX + "/alarm-message/create") @Operation(summary = "添加预警信息") CommonResult<Boolean> createAlarmMessage(@RequestBody AlarmMessageDTO dto); CommonResult<Boolean> createAlarmMessage(@RequestBody AlarmMessageRespDTO dto); @GetMapping(PREFIX + "/alarm-message/list") @Operation(summary = "获取预警信息") CommonResult<AlarmMessageDTO> listAlarmMessage(@RequestParam Map<String, Object> params); @Operation(summary = "获取预警信息列表") CommonResult<AlarmMessageRespDTO> listAlarmMessage(@RequestParam Map<String, Object> params); @PostMapping(PREFIX + "/schedule-suggest/create") @Operation(summary = "添加调度建议") CommonResult<Boolean> createScheduleSuggest(@RequestBody ScheduleSuggestDTO dto); CommonResult<Boolean> createScheduleSuggest(@RequestBody ScheduleSuggestRespDTO dto); @GetMapping(PREFIX + "/alarm-message/list") @Operation(summary = "获取调度建议") CommonResult<ScheduleSuggestDTO> listScheduleSuggest(@RequestParam Map<String, Object> params); @Operation(summary = "获取调度建议列表") CommonResult<ScheduleSuggestRespDTO> listScheduleSuggest(@RequestParam ScheduleSuggestReqDTO params); @PostMapping(PREFIX + "/predict-model-setting/modify") @Operation(summary = "修改预测模型设置参数") CommonResult<Boolean> modifyPredictModelSetting(@RequestBody List<PredictModelSettingReqDTO> dtos); @PostMapping(PREFIX + "/schedule-model-setting/modify") @Operation(summary = "修改调度模型设置参数") CommonResult<Boolean> modifyScheduleModelSetting(@RequestBody List<ScheduleModelSettingReqDTO> dtos); } iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/AlarmMessageReqDTO.java
对比新文件 @@ -0,0 +1,36 @@ package com.iailab.module.model.api.mcs.dto; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; import java.util.Date; /** * @author PanZhibao * @Description * @createTime 2024年10月10日 */ @Schema(description = "RPC 模型 - 预警消息 DTO") @Data public class AlarmMessageReqDTO implements Serializable { private static final long serialVersionUID = 1L; @Schema(description = "监控对象") private String alarmObj; @Schema(description = "监控点位ID") private String pointId; @Schema(description = "预测项ID") private String itemId; @Schema(description = "预警时间") private Date alarmTime; @Schema(description = "开始时间") private Date startTime; @Schema(description = "结束时间") private Date endTime; } iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/AlarmMessageRespDTO.java
文件名从 iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/AlarmMessageDTO.java 修改 @@ -20,7 +20,7 @@ */ @Schema(description = "RPC 模型 - 预警消息 DTO") @Data public class AlarmMessageDTO implements Serializable { public class AlarmMessageRespDTO implements Serializable { private static final long serialVersionUID = 1L; iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/PredictModelSettingReqDTO.java
对比新文件 @@ -0,0 +1,30 @@ package com.iailab.module.model.api.mcs.dto; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; /** * @author PanZhibao * @Description * @createTime 2024年10月10日 */ @Schema(description = "RPC 模型 - 调度建议 DTO") @Data public class PredictModelSettingReqDTO implements Serializable { private static final long serialVersionUID = 1L; private String modelid; /** * 键 */ private String key; /** * 值 */ private String value; } iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/ScheduleModelSettingReqDTO.java
对比新文件 @@ -0,0 +1,24 @@ package com.iailab.module.model.api.mcs.dto; import java.io.Serializable; /** * @author PanZhibao * @Description * @createTime 2024年10月10日 */ public class ScheduleModelSettingReqDTO implements Serializable { private static final long serialVersionUID = 1L; private String modelid; /** * 键 */ private String key; /** * 值 */ private String value; } iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/ScheduleSuggestReqDTO.java
对比新文件 @@ -0,0 +1,34 @@ package com.iailab.module.model.api.mcs.dto; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; import java.util.Date; /** * @author PanZhibao * @Description * @createTime 2024年10月10日 */ @Schema(description = "RPC 模型 - 调度建议req DTO") @Data public class ScheduleSuggestReqDTO implements Serializable { private static final long serialVersionUID = 1L; @Schema(description = "预测项ID") private String itemId; @Schema(description = "模型ID") private String modelId; @Schema(description = "调整对象") private String adjustObj; @Schema(description = "开始时间") private Date startTime; @Schema(description = "结束时间") private Date endTime; } iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/ScheduleSuggestRespDTO.java
文件名从 iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mcs/dto/ScheduleSuggestDTO.java 修改 @@ -14,7 +14,7 @@ */ @Schema(description = "RPC 模型 - 调度建议 DTO") @Data public class ScheduleSuggestDTO implements Serializable { public class ScheduleSuggestRespDTO implements Serializable { private static final long serialVersionUID = 1L; iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mdk/MdkApi.java
@@ -2,11 +2,10 @@ import com.iailab.module.model.api.mdk.dto.*; import com.iailab.module.model.enums.ApiConstants; import com.iailab.framework.common.pojo.CommonResult; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; @@ -17,25 +16,24 @@ * @createTime 2024年08月26日 */ @FeignClient(name = ApiConstants.NAME) @Tag(name = "RPC 服务 - MDK") @Tag(name = "RPC 服务 - 模型调用接口") public interface MdkApi { String PREFIX = ApiConstants.PREFIX + "/mdk"; @GetMapping(PREFIX + "/predict-module") @Operation(summary = "模块预测") CommonResult<MdkPredictModuleRespDTO> predictModule(@Valid @RequestBody MdkPredictReqDTO reqDTO); @PostMapping(PREFIX + "/predict-module") @Operation(summary = "执行模块预测") MdkPredictModuleRespDTO predictModule(@Valid @RequestBody MdkPredictReqDTO reqDTO); @GetMapping(PREFIX + "/predict-item") @Operation(summary = "单独预测") CommonResult<MdkPredictItemRespDTO> predictItem(@Valid @RequestBody MdkPredictReqDTO reqDTO); @PostMapping(PREFIX + "/predict-item") @Operation(summary = "执行单独预测") MdkPredictItemRespDTO predictItem(@Valid @RequestBody MdkPredictReqDTO reqDTO); @GetMapping(PREFIX + "/predict-auto-adjust") @PostMapping(PREFIX + "/predict-adjust") @Operation(summary = "预测自动调整") CommonResult<Boolean> predictAutoAdjust(@Valid @RequestBody MdkPredictReqDTO reqDTO); Boolean predictAutoAdjust(@Valid @RequestBody MdkPredictReqDTO reqDTO); @GetMapping(PREFIX + "/schedule") @Operation(summary = "执行调度") CommonResult<MdkScheduleRespDTO> doSchedule(@Valid @RequestBody MdkScheduleReqDTO reqDTO); @PostMapping(PREFIX + "/schedule-scheme") @Operation(summary = "执行调度方案") MdkScheduleRespDTO doSchedule(@Valid @RequestBody MdkScheduleReqDTO reqDTO); } iailab-module-model/iailab-module-model-api/src/main/java/com/iailab/module/model/api/mdk/dto/MdkPredictReqDTO.java
@@ -3,6 +3,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotNull; import java.util.Date; /** @@ -14,9 +15,13 @@ @Data public class MdkPredictReqDTO { @Schema(description = "预测时间") @NotNull(message="预测时间不能为空") private Date predictTime; @Schema(description = "预测模块") private String moduleType; @Schema(description = "预测项编号") private String itemNo; }