Browse Source

Merge remote-tracking branch 'origin/prod-5.1.3' into prod-5.1.3

zhongwei
yang_shj 2 months ago
parent
commit
428a8f878e
  1. 55
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java
  2. 2
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml

55
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java

@ -4,14 +4,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; 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.ModelEventVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import org.springblade.core.tool.utils.Func; import lombok.NoArgsConstructor;
/** /**
* @Author: ypj * @Author: ypj
* @Date: 2024/9/19 7:55 * @Date: 2024/9/19 7:55
*/ */
@Data @Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeviceModelData { public class DeviceModelData {
/** /**
* 模型id * 模型id
@ -157,20 +162,50 @@ public class DeviceModelData {
private String type; private String type;
public static DeviceModelData of(ModelAttrVO data) { public static DeviceModelData of(ModelAttrVO data) {
DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); return DeviceModelData.builder()
deviceModelData.setType("0"); .modelId(null != data.getModelId() ? data.getModelId().toString() : null)
return deviceModelData; .name(data.getName())
.signage(data.getSignage())
.dbType(data.getDbType())
.fieldLength(data.getFieldLength())
.keepFigures(null != data.getKeepFigures() ? data.getKeepFigures().toString() : null)
.accessRules(null != data.getAccessRules() ? data.getAccessRules().toString() : null)
.descs(data.getDescs())
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null)
.type("0").build();
} }
public static DeviceModelData of(ModelFuncVO data) { public static DeviceModelData of(ModelFuncVO data) {
DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); return DeviceModelData.builder()
deviceModelData.setType("1"); .modelId(null != data.getModelId() ? data.getModelId().toString() : null)
return deviceModelData; .name(data.getName())
.signage(data.getSignage())
.parameterJson(data.getParameterJson())
.controlStatus(null != data.getControlStatus() ? data.getControlStatus().toString() : null)
.parameterTag(data.getParameterTag())
.isPopup(null != data.getIsPopup() ? data.getIsPopup().toString() : null)
.isCheck(null != data.getIsCheck() ? data.getIsCheck().toString() : null)
.parameterSource(null != data.getParameterSource() ? data.getParameterSource().toString() : null)
.sourceAttrSignage(data.getSourceAttrSignage())
.controlParameter(null != data.getControlParameter() ? data.getControlParameter().toString() : null)
.intervalLength(null != data.getIntervalLength() ? data.getIntervalLength().toString() : null)
.minValue(null != data.getMinValue() ? data.getMinValue().toString() : null)
.maxValue(null != data.getMaxValue() ? data.getMaxValue().toString() : null)
.coefficient(null != data.getCoefficient() ? data.getCoefficient().toString() : null)
.descs(data.getDescs())
.type("1").build();
} }
public static DeviceModelData of(ModelEventVO data) { public static DeviceModelData of(ModelEventVO data) {
DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); return DeviceModelData.builder()
deviceModelData.setType("2"); .modelId(null != data.getModelId() ? data.getModelId().toString() : null)
return deviceModelData; .name(data.getName())
.signage(data.getSignage())
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null)
.level(null != data.getLevel() ? data.getLevel().toString() : null)
.duration(null != data.getDuration() ? data.getDuration().toString() : null)
.descs(data.getDescs())
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null)
.type("2").build();
} }
} }

2
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml

@ -15,5 +15,7 @@
FROM FROM
knowledge_file_segment AS `segment` knowledge_file_segment AS `segment`
LEFT JOIN knowledge_file_info `info` ON `segment`.DOC_ID = `info`.ID LEFT JOIN knowledge_file_info `info` ON `segment`.DOC_ID = `info`.ID
WHERE
`segment`.IS_DELETED = 0
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save