Browse Source

增加模型健康度2个分值

wukai 9 months ago
parent
commit
dd1bb1124e

+ 14 - 14
jjt-biz/src/main/java/com/jjt/biz/controller/BizModelController.java

@@ -45,20 +45,20 @@ public class BizModelController extends BaseController {
     public AjaxResult objAdd(@ApiParam(value = "模型ID", required = true) @PathVariable("modelId") Long modelId, @ApiParam(value = "对象ID数组", required = true) Long[] objIds) {
         return success(bizModelService.insertObj(modelId, objIds));
     }
-
-     @ApiOperation("选择健康度指标")
-    @GetMapping("/metrics/select/{modelId}")
-    public TableDataInfo metricsSelect(@ApiParam(value = "模型ID", required = true) @PathVariable("modelId") Long modelId) {
-        startPage();
-        List<BizObj> list = bizModelService.selectObjList(modelId);
-        return getDataTable(list);
-    }
-
-    @ApiOperation("添加对象")
-    @GetMapping("/metrics/add/{modelId}")
-    public AjaxResult metricsAdd(@ApiParam(value = "模型ID", required = true) @PathVariable("modelId") Long modelId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
-        return success(bizModelService.insertObj(modelId, metricsIds));
-    }
+//
+//     @ApiOperation("选择健康度指标")
+//    @GetMapping("/metrics/select/{modelId}")
+//    public TableDataInfo metricsSelect(@ApiParam(value = "模型ID", required = true) @PathVariable("modelId") Long modelId) {
+//        startPage();
+//        List<BizObj> list = bizModelService.selectObjList(modelId);
+//        return getDataTable(list);
+//    }
+//
+//    @ApiOperation("添加对象")
+//    @GetMapping("/metrics/add/{modelId}")
+//    public AjaxResult metricsAdd(@ApiParam(value = "模型ID", required = true) @PathVariable("modelId") Long modelId, @ApiParam(value = "指标ID数组", required = true) Long[] metricsIds) {
+//        return success(bizModelService.insertObj(modelId, metricsIds));
+//    }
 
     /**
      * 查询业务模型列表

+ 24 - 72
jjt-biz/src/main/java/com/jjt/biz/domain/BizModel.java

@@ -1,12 +1,11 @@
 package com.jjt.biz.domain;
 
 import com.baomidou.mybatisplus.annotation.TableId;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.jjt.common.annotation.Excel;
 import com.jjt.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 /**
  * 业务模型对象 biz_model
@@ -15,94 +14,47 @@ import com.jjt.common.core.domain.BaseEntity;
  * @date 2024-08-26
  */
 @ApiModel(value = "BizModel", description = "业务模型")
-public class BizModel extends BaseEntity
-{
+@Data
+public class BizModel extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 模型ID */
+    /**
+     * 模型ID
+     */
     @ApiModelProperty("模型ID")
     @TableId
     private Long modelId;
 
-    /** 模型编码 */
+    /**
+     * 模型编码
+     */
     @ApiModelProperty("模型编码")
     @Excel(name = "模型编码")
     private String modelCode;
 
-    /** 模型名称 */
+    /**
+     * 模型名称
+     */
     @ApiModelProperty("模型名称")
     @Excel(name = "模型名称")
     private String modelName;
 
-    /** 模型总分 */
+    /**
+     * 模型总分
+     */
     @ApiModelProperty("模型总分")
     @Excel(name = "模型总分")
     private Long modelScore;
 
-    /** 业务类型 */
+    /**
+     * 业务类型
+     */
     @ApiModelProperty("业务类型")
     @Excel(name = "业务类型")
     private String modelType;
 
-    public void setModelId(Long modelId)
-    {
-        this.modelId = modelId;
-    }
-
-    public Long getModelId()
-    {
-        return modelId;
-    }
-    public void setModelCode(String modelCode)
-    {
-        this.modelCode = modelCode;
-    }
-
-    public String getModelCode()
-    {
-        return modelCode;
-    }
-    public void setModelName(String modelName)
-    {
-        this.modelName = modelName;
-    }
-
-    public String getModelName()
-    {
-        return modelName;
-    }
-    public void setModelScore(Long modelScore)
-    {
-        this.modelScore = modelScore;
-    }
-
-    public Long getModelScore()
-    {
-        return modelScore;
-    }
-    public void setModelType(String modelType)
-    {
-        this.modelType = modelType;
-    }
-
-    public String getModelType()
-    {
-        return modelType;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("modelId", getModelId())
-            .append("modelCode", getModelCode())
-            .append("modelName", getModelName())
-            .append("modelScore", getModelScore())
-            .append("modelType", getModelType())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
+    @ApiModelProperty("最近一次得分")
+    private Float lastScore;
+    @ApiModelProperty("昨日健康度得分")
+    private Float yesterdayScore;
 }