From 36548a5ea9f4c69b593454e6d32eb7ee06111ef5 Mon Sep 17 00:00:00 2001 From: luyie Date: Wed, 25 Sep 2024 15:44:25 +0800 Subject: [PATCH] =?UTF-8?q?add:=E5=90=91=E9=87=8F=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gglm/bigmodel/business/vo/DeviceModelData.java | 23 ++++++++++++++++++---- .../bigmodel/maintenance/dto/KnowledgeData.java | 6 ++++++ .../maintenance/entity/AgentLogEntity.java | 6 +++--- .../service/KnowledgeFileInfoService.java | 1 - .../service/impl/KnowledgeFileInfoServiceImpl.java | 4 ---- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java index 7bebc16..496fe0f 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java @@ -1,7 +1,6 @@ package com.hnac.gglm.bigmodel.business.vo; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.fasterxml.jackson.annotation.JsonProperty; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; @@ -17,6 +16,7 @@ public class DeviceModelData { /** * 模型id */ + @JsonProperty("model_id") private Long modelId; /** @@ -32,23 +32,25 @@ public class DeviceModelData { /** * 数据类型 */ + @JsonProperty("data_type") private String dbType; /** * 字段长度 */ + @JsonProperty("field_length") private String fieldLength; /** * 保留位数 */ - @JsonSerialize(nullsUsing = NullSerializer.class) + @JsonProperty("keep_figures") private Integer keepFigures; /** * 取数规则 0 平均值、1 最大值、2 最小值、3 最后值、4 最早值、5 和值、6 差值 */ - @JsonSerialize(nullsUsing = NullSerializer.class) + @JsonProperty("access_rules") private Integer accessRules; /** @@ -59,6 +61,7 @@ public class DeviceModelData { /** * 模型分类id */ + @JsonProperty("model_classify_id") private Long modelClassifyId; /** @@ -74,61 +77,73 @@ public class DeviceModelData { /** * 参数名称 */ + @JsonProperty("parameter_name") private String parameterName; /** * 参数标识 */ + @JsonProperty("parameter_tag") private String parameterTag; /** * 单点控制状态,0:分,1:合 */ + @JsonProperty("control_status") private Integer controlStatus; /** * 是否弹窗 */ + @JsonProperty("is_popup") private Integer isPopup; /** * 是否反校 */ + @JsonProperty("is_check") private Integer isCheck; /** * 参数来源,0:默认,1:属性值 */ + @JsonProperty("parameter_source") private Integer parameterSource; /** * 来源属性标识 */ + @JsonProperty("source_attr_signage") private String sourceAttrSignage; /** * 控制参数,0:分/合,1:退/投,2:停止/启动 */ + @JsonProperty("control_parameter") private Integer controlParameter; /** * 参数json */ + @JsonProperty("parameter_json") private String parameterJson; /** * 间隔时长 */ + @JsonProperty("interval_length") private Integer intervalLength; /** * 参数范围最小值 */ + @JsonProperty("min_value") private Integer minValue; /** * 参数范围最大值 */ + @JsonProperty("max_value") private Integer maxValue; /** diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/KnowledgeData.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/KnowledgeData.java index 6e1d3ce..161d588 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/KnowledgeData.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/KnowledgeData.java @@ -1,6 +1,7 @@ package com.hnac.gglm.bigmodel.maintenance.dto; import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -14,23 +15,28 @@ import lombok.Data; public class KnowledgeData { @ApiModelProperty("文档ID") @TableField("DOC_ID") + @JsonProperty("doc_id") private Long docId; @ApiModelProperty("文档问题") @TableField("DOC_QS") + @JsonProperty("doc_qs") private String docQs; @ApiModelProperty("文档内容") @TableField("DOC_CONTENT") + @JsonProperty("doc_content") private String docContent; @ApiModelProperty("文档页码") @TableField("DOC_PAGE_INDEX") + @JsonProperty("doc_page_index") private Integer docPageIndex; @ApiModelProperty("知识库领域") private String area; @ApiModelProperty("等级") + @JsonProperty("doc_level") private Integer level; } diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/entity/AgentLogEntity.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/entity/AgentLogEntity.java index 5ab9d50..0df71b8 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/entity/AgentLogEntity.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/entity/AgentLogEntity.java @@ -65,17 +65,17 @@ public class AgentLogEntity extends TenantEntity implements Serializable { @ApiModelProperty("用户结论,0为错误,1为正确") @QueryField(condition = SqlCondition.EQUAL) @TableField("user_conclusion") - private int userConclusion; + private Integer userConclusion; @ApiModelProperty("标注状态,0为未标注,1为已标注") @QueryField(condition = SqlCondition.EQUAL) @TableField("label_status") - private int labelStatus; + private Integer labelStatus; @ApiModelProperty("标注结果,0为错误,1为正确") @QueryField(condition = SqlCondition.EQUAL) @TableField("label_result") - private int labelResult; + private Integer labelResult; @ApiModelProperty("标注内容,json字符串,答案类型不一样格式不一样") @QueryField(condition = SqlCondition.LIKE) diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/KnowledgeFileInfoService.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/KnowledgeFileInfoService.java index 1d30668..52d11df 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/KnowledgeFileInfoService.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/KnowledgeFileInfoService.java @@ -17,7 +17,6 @@ import java.util.List; */ public interface KnowledgeFileInfoService extends IService { String SEGMENT_URL = "/kn/doc_segment"; - String VICTOR_DATABASE_NAME = "knowledge_data"; Boolean store(IdRequest req); diff --git a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/impl/KnowledgeFileInfoServiceImpl.java b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/impl/KnowledgeFileInfoServiceImpl.java index 309faab..bc29937 100644 --- a/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/impl/KnowledgeFileInfoServiceImpl.java +++ b/hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/impl/KnowledgeFileInfoServiceImpl.java @@ -47,7 +47,6 @@ public class KnowledgeFileInfoServiceImpl extends ServiceImpllambdaQuery().in(KnowledgeFileFragment::getDocId, idsList)); - Map deleteTableParams = new HashMap<>(1); - deleteTableParams.put("table_name", VICTOR_DATABASE_NAME); - RequestClientUtil.postCall(interactionUrl + invokeApi.getDeleteTable(), deleteTableParams); } return result; }