Browse Source

add:向量配置,月报评价

zhongwei
luyie 3 months ago
parent
commit
fe5855cbab
  1. 3
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/entity/RunMonthEntity.java
  2. 6
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/VectorParamController.java
  3. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/VectorParamService.java
  4. 119
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/impl/VectorParamServiceImpl.java
  5. 13
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/controller/RunMonthController.java
  6. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/RunMonthService.java
  7. 56
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java
  8. 13
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/vo/RunMonthEvaluateVO.java

3
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/report/entity/RunMonthEntity.java

@ -44,4 +44,7 @@ public class RunMonthEntity extends TenantEntity {
@ApiModelProperty("分析结果") @ApiModelProperty("分析结果")
private String analyseResult; private String analyseResult;
@ApiModelProperty("评价")
private String evaluation;
} }

6
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/VectorParamController.java

@ -107,11 +107,11 @@ public class VectorParamController {
return R.data(vectorParamService.getUrlResponseKeyList(url, bladeToken, hzinfoToken)); return R.data(vectorParamService.getUrlResponseKeyList(url, bladeToken, hzinfoToken));
} }
@PutMapping("/synchronization") @PutMapping("/synchronization/{id}")
@ApiOperation(value = "同步") @ApiOperation(value = "同步")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
public R synchronization(@RequestHeader(name = "Blade-Auth", value = "Blade-Auth", required = false) String bladeToken, public R synchronization(@RequestHeader(name = "Blade-Auth", value = "Blade-Auth", required = false) String bladeToken,
@RequestHeader(name = "Hzinfo-Auth", value = "Hzinfo-Auth", required = false) String hzinfoToken) throws JsonProcessingException { @RequestHeader(name = "Hzinfo-Auth", value = "Hzinfo-Auth", required = false) String hzinfoToken, @PathVariable Long id) throws JsonProcessingException {
return R.status(vectorParamService.synchronization(bladeToken, hzinfoToken)); return R.status(vectorParamService.synchronization(id, bladeToken, hzinfoToken));
} }
} }

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/VectorParamService.java

@ -18,5 +18,5 @@ public interface VectorParamService extends IService<VectorParamEntity> {
List<String> getUrlResponseKeyList(String url, String bladeToken, String hzinfoToken); List<String> getUrlResponseKeyList(String url, String bladeToken, String hzinfoToken);
Boolean synchronization(String bladeToken, String hzinfoToken); Boolean synchronization(Long id ,String bladeToken, String hzinfoToken);
} }

119
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/impl/VectorParamServiceImpl.java

@ -5,6 +5,7 @@ import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
@ -16,7 +17,6 @@ import com.hnac.hzims.bigmodel.maintenance.service.VectorParamService;
import com.hnac.hzims.bigmodel.maintenance.vo.VectorUrlResponse; import com.hnac.hzims.bigmodel.maintenance.vo.VectorUrlResponse;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -49,59 +49,57 @@ public class VectorParamServiceImpl extends ServiceImpl<VectorParamMapper, Vecto
.header("Hzinfo-Auth", hzinfoToken).execute(); .header("Hzinfo-Auth", hzinfoToken).execute();
if (response.getStatus() == HttpServletResponse.SC_OK) { if (response.getStatus() == HttpServletResponse.SC_OK) {
String body = response.body(); String body = response.body();
log.info("getUrlResponse:" + body); try {
JSONObject jsonObject = JSON.parseObject(body); ObjectMapper mapper = new ObjectMapper();
VectorUrlResponse result = new VectorUrlResponse(); JsonNode rootNode = mapper.readTree(body);
result.setOriginalData(JSONArray.parseArray(jsonObject.getString("data")).toJavaList(JSONObject.class)); if (rootNode.isArray()) {
// try { return getUrlResponseByArray(rootNode);
// ObjectMapper mapper = new ObjectMapper(); }
// JsonNode rootNode = mapper.readTree(body); JsonNode dataNode = rootNode.findValue("data");
// if (rootNode.isArray()) { if (dataNode != null && dataNode.isArray()) {
// return getUrlResponseByArray(rootNode); return getUrlResponseByArray(dataNode);
// } }
// JsonNode dataNode = rootNode.findValue("data"); if (dataNode != null) {
// if (dataNode != null && dataNode.isArray()) { return getUrlResponseByObject(dataNode);
// return getUrlResponseByArray(dataNode); }
// } if (rootNode != null) {
// if (dataNode != null) { return getUrlResponseByObject(rootNode);
// return getUrlResponseByObject(dataNode); }
// } } catch (JsonProcessingException e) {
// if (rootNode != null) { log.error("getUrlResponse error", e);
// return getUrlResponseByObject(rootNode); }
// }
// } catch (JsonProcessingException e) {
// log.error("getUrlResponse error", e);
// }
} }
return null; return null;
} }
// private VectorUrlResponse getUrlResponseByArray(JsonNode rootNode) throws JsonProcessingException { private VectorUrlResponse getUrlResponseByArray(JsonNode rootNode) throws JsonProcessingException {
// VectorUrlResponse result = new VectorUrlResponse(); VectorUrlResponse result = new VectorUrlResponse();
// result.setOriginalData(rootNode); result.setOriginalData(JSONArray.parseArray(rootNode.toPrettyString()).toJavaList(JSONObject.class));
// JsonNode item = rootNode.get(0); JsonNode item = rootNode.get(0);
// if (item != null) { if (item != null) {
// List<String> keyList = new ArrayList<>(); List<String> keyList = new ArrayList<>();
// Iterator<String> iterator = item.fieldNames(); Iterator<String> iterator = item.fieldNames();
// while (iterator.hasNext()) { while (iterator.hasNext()) {
// keyList.add(iterator.next()); keyList.add(iterator.next());
// } }
// result.setKeyList(keyList); result.setKeyList(keyList);
// } }
// return result; return result;
// } }
// private VectorUrlResponse getUrlResponseByObject(JsonNode rootNode) throws JsonProcessingException { private VectorUrlResponse getUrlResponseByObject(JsonNode rootNode) throws JsonProcessingException {
// VectorUrlResponse result = new VectorUrlResponse(); VectorUrlResponse result = new VectorUrlResponse();
// result.setOriginalData(rootNode); List<JSONObject> originalData = new ArrayList<>();
// List<String> keyList = new ArrayList<>(); originalData.add(JSON.parseObject(rootNode.toPrettyString()));
// Iterator<String> iterator = rootNode.fieldNames(); result.setOriginalData(originalData);
// while (iterator.hasNext()) { List<String> keyList = new ArrayList<>();
// keyList.add(iterator.next()); Iterator<String> iterator = rootNode.fieldNames();
// } while (iterator.hasNext()) {
// result.setKeyList(keyList); keyList.add(iterator.next());
// return result; }
// } result.setKeyList(keyList);
return result;
}
@Override @Override
public List<String> getUrlResponseKeyList(String url, String bladeToken, String hzinfoToken) { public List<String> getUrlResponseKeyList(String url, String bladeToken, String hzinfoToken) {
@ -110,12 +108,11 @@ public class VectorParamServiceImpl extends ServiceImpl<VectorParamMapper, Vecto
} }
@Override @Override
public Boolean synchronization(String bladeToken, String hzinfoToken) { public Boolean synchronization(Long id, String bladeToken, String hzinfoToken) {
List<VectorParamEntity> list = this.list(); VectorParamEntity entity = getById(id);
if (CollectionUtil.isEmpty(list)) { if (null == entity) {
return false; return false;
} }
for (VectorParamEntity entity : list) {
VectorUrlResponse response = getUrlResponse(entity.getUrl(), bladeToken, hzinfoToken); VectorUrlResponse response = getUrlResponse(entity.getUrl(), bladeToken, hzinfoToken);
if (response != null) { if (response != null) {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
@ -131,24 +128,10 @@ public class VectorParamServiceImpl extends ServiceImpl<VectorParamMapper, Vecto
String key = iterator.next(); String key = iterator.next();
attrMap.put(key, rootNode.findValue(key).textValue()); attrMap.put(key, rootNode.findValue(key).textValue());
} }
List<Object> dataList = new ArrayList();
JsonNode dataObject = (JsonNode) response.getOriginalData();
if (dataObject.isArray()) {
Iterator<JsonNode> dataIterator = dataObject.iterator();
while (dataIterator.hasNext()) {
dataList.add(toJsonObject(dataIterator.next()));
}
} else {
dataList.add(toJsonObject(dataObject));
}
weaviateService.saveBatch(response.getOriginalData(), entity.getTableName(), attrMap); weaviateService.saveBatch(response.getOriginalData(), entity.getTableName(), attrMap);
} this.update(Wrappers.<VectorParamEntity>lambdaUpdate().eq(VectorParamEntity::getId, id).set(VectorParamEntity::getUpdateTime, new Date()));
} }
return true; return true;
} }
private JSONObject toJsonObject(JsonNode node) {
JSONObject jsonObject = JSON.parseObject(node.toString());
return jsonObject;
}
} }

13
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/controller/RunMonthController.java

@ -3,15 +3,13 @@ package com.hnac.hzims.operational.report.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.report.entity.RunMonthEntity; import com.hnac.hzims.operational.report.entity.RunMonthEntity;
import com.hnac.hzims.operational.report.service.RunMonthService; import com.hnac.hzims.operational.report.service.RunMonthService;
import com.hnac.hzims.operational.report.vo.RunMonthEvaluateVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @author ysj * @author ysj
@ -63,4 +61,11 @@ public class RunMonthController {
runMonthService.generateAnalyseResult(month, stationCode); runMonthService.generateAnalyseResult(month, stationCode);
return R.success("调用成功!"); return R.success("调用成功!");
} }
@PutMapping("/evaluate")
@ApiOperation(value = "站点月报评价", notes = "站点月报评价")
@ApiOperationSupport(order = 6)
public R evaluate(@RequestBody RunMonthEvaluateVO req) {
return R.data(runMonthService.evaluate(req.getId(), req.getText()));
}
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/RunMonthService.java

@ -24,4 +24,6 @@ public interface RunMonthService extends IService<RunMonthEntity> {
* @return 大模型调用结果 * @return 大模型调用结果
*/ */
Boolean generateAnalyseResult(String month,String stationCode); Boolean generateAnalyseResult(String month,String stationCode);
Boolean evaluate(Long id, String text);
} }

56
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java

@ -108,6 +108,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 查询站点月报运行数据 * 查询站点月报运行数据
*
* @param mon * @param mon
* @param stationCode * @param stationCode
* @return * @return
@ -123,7 +124,8 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
} }
RunDataShowVo data = new RunDataShowVo(); RunDataShowVo data = new RunDataShowVo();
BeanUtil.copyProperties(entity, data); BeanUtil.copyProperties(entity, data);
List<RunDataVo> runs = JSONObject.parseObject(entity.getRunData(),new TypeReference<List<RunDataVo>>(){}); List<RunDataVo> runs = JSONObject.parseObject(entity.getRunData(), new TypeReference<List<RunDataVo>>() {
});
if (CollectionUtil.isEmpty(runs)) { if (CollectionUtil.isEmpty(runs)) {
return data; return data;
} }
@ -156,9 +158,9 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
} }
/** /**
* 导出站点月报文件 * 导出站点月报文件
*
* @param mon * @param mon
* @param stationCode * @param stationCode
*/ */
@ -174,7 +176,8 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
if (ObjectUtil.isEmpty(data)) { if (ObjectUtil.isEmpty(data)) {
throw new ServiceException("站点" + mon + "月份未生成运行月报数据!"); throw new ServiceException("站点" + mon + "月份未生成运行月报数据!");
} }
List<RunDataVo> runs = JSONObject.parseObject(data.getRunData(),new TypeReference<List<RunDataVo>>(){}); List<RunDataVo> runs = JSONObject.parseObject(data.getRunData(), new TypeReference<List<RunDataVo>>() {
});
if (CollectionUtil.isNotEmpty(runs)) { if (CollectionUtil.isNotEmpty(runs)) {
// 保留两位小数 // 保留两位小数
data.setRunData(JSONObject.toJSONString(runs.stream().map(run -> { data.setRunData(JSONObject.toJSONString(runs.stream().map(run -> {
@ -210,6 +213,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 生成站点月报 * 生成站点月报
*
* @param mon * @param mon
* @param stationCode * @param stationCode
* @return * @return
@ -297,6 +301,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 调用大模型分析月报接口 * 调用大模型分析月报接口
*
* @param mon 月报月份 * @param mon 月报月份
* @param stationCode 月报站号 * @param stationCode 月报站号
*/ */
@ -329,6 +334,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 填充大模型分析所需数据格式 * 填充大模型分析所需数据格式
*
* @param req 月报数据 * @param req 月报数据
* @param analyseVOList 大模型分析对象 * @param analyseVOList 大模型分析对象
* @param month 查询月报筛选条件 * @param month 查询月报筛选条件
@ -385,6 +391,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 创建大模型分析所需对象 * 创建大模型分析所需对象
*
* @param deviceName 设备名称 * @param deviceName 设备名称
* @param month 对象月份 * @param month 对象月份
* @param deviceOrder 设备序号 * @param deviceOrder 设备序号
@ -443,6 +450,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 先删除原先月报数据 * 先删除原先月报数据
*
* @param mon * @param mon
* @param stationCode * @param stationCode
*/ */
@ -459,6 +467,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 运行数据 * 运行数据
*
* @param devices * @param devices
* @return * @return
*/ */
@ -491,6 +500,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 实际发电量 * 实际发电量
*
* @param type * @param type
* @param deviceCode * @param deviceCode
* @param ride * @param ride
@ -512,6 +522,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 计划发电量 * 计划发电量
*
* @param type * @param type
* @param stationCode * @param stationCode
* @param plans * @param plans
@ -536,6 +547,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 获取运行数据 * 获取运行数据
*
* @param device * @param device
* @return * @return
*/ */
@ -557,6 +569,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 获取时间范围内运行时长 * 获取时间范围内运行时长
*
* @param realId * @param realId
* @param startDate * @param startDate
* @param endDate * @param endDate
@ -581,6 +594,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 获取运行时长 * 获取运行时长
*
* @param result * @param result
* @return * @return
*/ */
@ -614,6 +628,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 告警数据 * 告警数据
*
* @param code * @param code
* @return * @return
*/ */
@ -627,6 +642,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 查询hz3000告警 * 查询hz3000告警
*
* @param code * @param code
*/ */
private List<RunAlarmVo> hz3000Alarm(String code, String start, String end) { private List<RunAlarmVo> hz3000Alarm(String code, String start, String end) {
@ -654,6 +670,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 智能预警 * 智能预警
*
* @param code * @param code
* @param start * @param start
* @param end * @param end
@ -685,6 +702,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 运行曲线 * 运行曲线
*
* @param devices * @param devices
* @return * @return
*/ */
@ -703,11 +721,10 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 获取曲线数据 * 获取曲线数据
*
* @param attributes * @param attributes
* @param deviceCode * @param deviceCode
* @return * @return
*
*
*/ */
private List<EchartVo> curve(List<AttributeVo> attributes, String start, String end, String deviceCode) { private List<EchartVo> curve(List<AttributeVo> attributes, String start, String end, String deviceCode) {
List<AnalyzeDataConditionVO> datas = dataService.periodTargetSignages(start, end, 3, 3, deviceCode, attributes.stream().map(AttributeVo::getSignage).collect(Collectors.toList())); List<AnalyzeDataConditionVO> datas = dataService.periodTargetSignages(start, end, 3, 3, deviceCode, attributes.stream().map(AttributeVo::getSignage).collect(Collectors.toList()));
@ -756,6 +773,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 曲线属性获取 * 曲线属性获取
*
* @param attributeType * @param attributeType
* @return * @return
*/ */
@ -820,6 +838,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 检查站点是否存在设备信息 * 检查站点是否存在设备信息
*
* @param stationCode * @param stationCode
* @return * @return
*/ */
@ -848,8 +867,14 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
return true; return true;
} }
@Override
public Boolean evaluate(Long id, String text) {
return this.update(Wrappers.<RunMonthEntity>lambdaUpdate().set(RunMonthEntity::getEvaluation, text).eq(RunMonthEntity::getId, id));
}
/** /**
* 手绘运行数据表格 * 手绘运行数据表格
*
* @return * @return
*/ */
private Workbook drawBook(String headerName, RunMonthEntity entity) { private Workbook drawBook(String headerName, RunMonthEntity entity) {
@ -906,6 +931,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 绘制机组曲线 * 绘制机组曲线
*
* @param hssWB * @param hssWB
* @param rowNumber * @param rowNumber
* @param data * @param data
@ -919,7 +945,8 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
sheet.addMergedRegion(region); sheet.addMergedRegion(region);
return rowNumber + 1; return rowNumber + 1;
} }
List<CurveEchartVo> curves = JSONObject.parseObject(data,new TypeReference<List<CurveEchartVo>>(){}); List<CurveEchartVo> curves = JSONObject.parseObject(data, new TypeReference<List<CurveEchartVo>>() {
});
if (CollectionUtil.isEmpty(curves)) { if (CollectionUtil.isEmpty(curves)) {
// 绘制空表格 // 绘制空表格
this.emptyRow(hssWB, sheet, rowNumber); this.emptyRow(hssWB, sheet, rowNumber);
@ -941,6 +968,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 绘制曲线 * 绘制曲线
*
* @param loadCurve * @param loadCurve
* @param rowNumber * @param rowNumber
*/ */
@ -1000,6 +1028,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 曲线转数组对象 * 曲线转数组对象
*
* @param curves * @param curves
* @return * @return
*/ */
@ -1024,6 +1053,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 运行数据分析填充 * 运行数据分析填充
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
* @param rowNumber * @param rowNumber
@ -1053,6 +1083,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 运行建议及其他填充 * 运行建议及其他填充
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
* @param rowNumber * @param rowNumber
@ -1081,6 +1112,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 设置头部 * 设置头部
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
*/ */
@ -1098,6 +1130,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 设置标题表头 * 设置标题表头
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
*/ */
@ -1114,6 +1147,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 运行数据表头绘制 * 运行数据表头绘制
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
*/ */
@ -1142,6 +1176,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 运行数据填充 * 运行数据填充
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
* @param rowNumber * @param rowNumber
@ -1156,7 +1191,8 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
sheet.addMergedRegion(region); sheet.addMergedRegion(region);
return rowNumber + 1; return rowNumber + 1;
} }
List<RunDataVo> runData = JSONObject.parseObject(data,new TypeReference<List<RunDataVo>>(){}); List<RunDataVo> runData = JSONObject.parseObject(data, new TypeReference<List<RunDataVo>>() {
});
if (CollectionUtil.isEmpty(runData)) { if (CollectionUtil.isEmpty(runData)) {
// 绘制空表格 // 绘制空表格
this.emptyRow(hssWB, sheet, rowNumber); this.emptyRow(hssWB, sheet, rowNumber);
@ -1227,6 +1263,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 绘制空表格 * 绘制空表格
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
* @param rowNumber * @param rowNumber
@ -1257,6 +1294,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 告警数据表头绘制 * 告警数据表头绘制
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
*/ */
@ -1285,6 +1323,7 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
/** /**
* 告警数据填充 * 告警数据填充
*
* @param hssWB * @param hssWB
* @param sheet * @param sheet
* @param rowNumber * @param rowNumber
@ -1299,7 +1338,8 @@ public class RunMonthServiceImpl extends ServiceImpl<RunMonthMapper, RunMonthEnt
sheet.addMergedRegion(region); sheet.addMergedRegion(region);
return rowNumber + 1; return rowNumber + 1;
} }
List<RunAlarmVo> runAlarm = JSONObject.parseObject(data,new TypeReference<List<RunAlarmVo>>(){}); List<RunAlarmVo> runAlarm = JSONObject.parseObject(data, new TypeReference<List<RunAlarmVo>>() {
});
if (CollectionUtil.isEmpty(runAlarm)) { if (CollectionUtil.isEmpty(runAlarm)) {
// 绘制空表格 // 绘制空表格
this.emptyRow(hssWB, sheet, rowNumber); this.emptyRow(hssWB, sheet, rowNumber);

13
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/vo/RunMonthEvaluateVO.java

@ -0,0 +1,13 @@
package com.hnac.hzims.operational.report.vo;
import lombok.Data;
/**
* @Author: ypj
* @Date: 2024/9/6 14:50
*/
@Data
public class RunMonthEvaluateVO {
private String text;
private Long id;
}
Loading…
Cancel
Save