|
@@ -1,9 +1,11 @@
|
|
|
package com.yaoyicloud.render;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Map;
|
|
|
import com.deepoove.poi.config.Configure;
|
|
|
import com.deepoove.poi.config.ConfigureBuilder;
|
|
|
+import com.deepoove.poi.policy.RenderPolicy;
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.google.protobuf.util.JsonFormat;
|
|
@@ -48,12 +50,13 @@ public final class ServiceProviderInfoRender extends AbstractRender {
|
|
|
|
|
|
// 配置POI-TL渲染器
|
|
|
ConfigureBuilder builder = Configure.builder();
|
|
|
-
|
|
|
+ RenderPolicy indicatorsRenderPolicy = this.indicatorsRenderPolicy();
|
|
|
+ builder.bind("checkItemScores", indicatorsRenderPolicy);
|
|
|
FxyProtos.AuditResult.Builder auditResultBuilder = FxyProtos.AuditResult.newBuilder();
|
|
|
JsonFormat.parser().merge(info, auditResultBuilder);
|
|
|
|
|
|
- FxyProtos.BasicInfo defaultInstance = FxyProtos.BasicInfo.getDefaultInstance();
|
|
|
- FxyProtos.BasicInfo mergedProto = defaultInstance.toBuilder()
|
|
|
+ FxyProtos.AuditResult defaultInstance = FxyProtos.AuditResult.getDefaultInstance();
|
|
|
+ FxyProtos.AuditResult mergedProto = defaultInstance.toBuilder()
|
|
|
.mergeFrom(auditResultBuilder.build())
|
|
|
.build();
|
|
|
|
|
@@ -67,7 +70,7 @@ public final class ServiceProviderInfoRender extends AbstractRender {
|
|
|
if (addtionalMap != null) {
|
|
|
data.putAll(addtionalMap);
|
|
|
}
|
|
|
- // fillBasicDefaultValues(data);
|
|
|
+ // fillDefaultValues(data);
|
|
|
|
|
|
try {
|
|
|
// 渲染文档
|
|
@@ -79,5 +82,12 @@ public final class ServiceProviderInfoRender extends AbstractRender {
|
|
|
throw new IOException("文档渲染失败", e);
|
|
|
}
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 填充默认值,确保所有必要字段都存在
|
|
|
+ */
|
|
|
+ private void fillDefaultValues(Map<String, Object> data) {
|
|
|
+ Object checkItemScores = data.get("checkItemScores");
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|