Forráskód Böngészése

reorganize data definition of basic info section

dengjia 1 hónapja
szülő
commit
f651ee58f0

+ 2 - 1
.style/suppressions.xml

@@ -5,4 +5,5 @@
 <suppressions>
     <!-- 忽略所有资源目录下的文件 -->
     <suppress files=".*[/\\]resources[/\\].*" checks=".*"/>
-</suppressions>
+    <suppress files="[/\\]yaoyicloud[/\\]message[/\\]" checks=".*" />
+</suppressions>

+ 0 - 8
checkstyle-suppressions.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE suppressions PUBLIC
-  "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
-  "https://checkstyle.org/dtds/suppressions_1_2.dtd">
-
-<suppressions>
-  <suppress files="[/\\]yaoyicloud[/\\]message[/\\]" checks=".*" />
-</suppressions>

+ 24 - 5
easier-report-biz/src/main/java/com/yaoyicloud/render/AuditResultRender.java

@@ -15,6 +15,7 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
 import com.fasterxml.jackson.databind.ser.std.StdSerializer;
 import com.yaoyicloud.message.FxyProtos.AuditResult;
 import com.yaoyicloud.message.FxyProtos.CheckItemScore;
+import com.yaoyicloud.message.FxyProtos.CheckSummary;
 
 import cn.hutool.core.util.StrUtil;
 
@@ -41,6 +42,7 @@ public final class AuditResultRender extends AbstractRender {
         SimpleModule module = new SimpleModule();
         module.addSerializer(new AuditResultSerializer(AuditResult.class));
         module.addSerializer(new CheckItemScoreSerializer(CheckItemScore.class));
+        module.addSerializer(new CheckSummarySerializer(CheckSummary.class));
         mapper.registerModule(module);
 
         String jsonStr = mapper.writeValueAsString(info);
@@ -74,14 +76,11 @@ public final class AuditResultRender extends AbstractRender {
             throws IOException, JsonProcessingException {
 
             jgen.writeStartObject();
-            jgen.writeStringField("auditResultScore", value.getAuditResultScore());
             jgen.writeStringField("opinion", StrUtil.isBlank(value.getOpinion()) ? "-" : value.getOpinion());
             jgen.writeStringField("serviceProviderName", value.getServiceProviderName());
             // Note: ignore reportVersion
             jgen.writeStringField("auditDate", value.getAuditDate());
-            jgen.writeStringField("riskAlert", StrUtil.isBlank(value.getRiskAlert()) ? "-" : value.getRiskAlert());
-            jgen.writeStringField("auditResultSuggestion",
-                StrUtil.isBlank(value.getAuditResultSuggestion()) ? "-" : value.getAuditResultSuggestion());
+            jgen.writeObjectField("overallSummary", value.getOverallSummary());
             jgen.writeObjectField("checkItemScores", value.getCheckItemScoresList());
             jgen.writeEndObject();
         }
@@ -102,11 +101,31 @@ public final class AuditResultRender extends AbstractRender {
             throws IOException, JsonProcessingException {
 
             jgen.writeStartObject();
-            jgen.writeNumberField("itemId", value.getItemId());
             jgen.writeStringField("category", StrUtil.isBlank(value.getCategory()) ? "-" : value.getCategory());
             jgen.writeStringField("itemName", value.getItemName());
             jgen.writeNumberField("score", value.getScore());
             jgen.writeEndObject();
         }
     }
+
+    public class CheckSummarySerializer extends StdSerializer<CheckSummary> {
+
+        public CheckSummarySerializer() {
+            this(null);
+        }
+
+        public CheckSummarySerializer(Class<CheckSummary> t) {
+            super(t);
+        }
+
+        @Override
+        public void serialize(CheckSummary value, JsonGenerator jgen, SerializerProvider provider)
+            throws IOException, JsonProcessingException {
+            jgen.writeStartObject();
+            jgen.writeStringField("score", value.getScore() < 0 ? "-" : String.valueOf(value.getScore()));
+            jgen.writeStringField("riskSummary", value.getRiskSummary());
+            jgen.writeStringField("suggestion", value.getSuggestion());
+            jgen.writeEndObject();
+        }
+    }
 }

+ 102 - 7
easier-report-biz/src/main/proto/fxy.proto

@@ -10,21 +10,116 @@ message ServiceProviderInfo {
     optional string tenantName = 4; // ${服务商信息:租户名称}
 }
 
+message CheckItemDetail {
+    optional string name = 1;      //
+    optional string desc = 2;      //
+    optional string fact = 3;     //
+    optional string result = 4;      //
+    optional int64 score = 5;      //
+    optional string reviewResult = 6; // 复核结果
+    optional int32 reviewScore = 7; // 复核评分
+}
+
 message CheckItemScore {
-    optional int64 itemId = 1;
-    optional string category = 2;
-    optional string itemName = 3;
-    optional int64 score = 4;
+    optional string category = 1;
+    optional string itemName = 2;
+    optional int64 score = 3;
+}
+
+message CheckSummary {
+    optional int32 score = 1; // ${基本信息评分及建议:基本信息总分}
+    optional string riskSummary = 2; // ${基本信息评分及建议:风险综述}
+    optional string suggestion = 3 ; // ${基本信息评分及建议:建议}
 }
 
 message AuditResult {
-    optional string auditResultScore = 1;
     optional string opinion = 2; // ${审核结果:审核意见}
     optional string serviceProviderName = 3; // ${审核结果:服务商名称}
     optional string auditDate = 4; // ${审核结果:审核日期}
     optional string reportVersion = 5; // ${审核结果:报告版本}
-    optional string riskAlert = 6; // ${风险概述:风险提示}
-    optional string auditResultSuggestion = 7; // ${风险概述:建议}
+    optional string tenantName = 6; // ${服务商信息:租户名称}
 
+    optional CheckSummary overallSummary = 7;
     repeated CheckItemScore checkItemScores = 8;
 }
+
+message SuperiorAuthority { // 直属机关
+    optional string sname = 1;
+    optional string nature = 2;
+}
+
+message CompanyBasicInfoExt {
+    optional string industry = 1; // 所属行业
+    optional string paidInCapital = 2; // 实缴资本(单位:人民币万元)
+    optional string enterpriseScale = 3; // 企业规模(如:小型)
+    optional int32 insuredEmployees = 4; // 参保人数
+    optional string businessStatus = 5; // 经营状态(如:存续)
+    optional string registrationAuthority = 6; // 登记机关
+    optional string taxpayerQualification = 7; // 纳税人资质(如:增值税一般纳税人)
+    optional string enterpriseType = 8; // 企业类型(如:有限责任公司)
+}
+
+message AssociationBasicInfoExt {
+    optional string corporateMembers = 1; // 单位会员数量(如:超x家)
+    optional string individualMembers = 2; // 个人会员数量
+    optional string membershipFeeStandard = 3; // 会费收取标准(多行文本)
+    optional string mainActivityRegion = 4; // 主要活动覆盖地域(示例:长三角地区)
+    optional string sponsorshipRatio = 5; // 上一年度xxx公司赞助和捐赠额占总社会赞助和捐赠比例(单位:%,示例:1%)
+}
+
+message FoundationBasicInfoExt {
+    optional string foundationCategory = 1;          // 基金会类别(公募/非公募)
+    optional string lastYearSponsorshipDonationRatio = 2; // 上一年度XXX赞助和捐赠额占比(%)
+    optional string initialFund = 3;             // 原始基金(单位:元)
+    optional string lastYearDonationIncome = 4;  // 最近一年捐赠收入(单位:元)
+    optional string secretaryGeneral = 5;            // 秘书长
+    optional string chairman = 6;                    // 理事长
+    optional int32 numberOfDirectors = 7;          // 理事人数
+}
+
+message Attachment {
+    optional string fileName = 1;
+    optional string fileUri = 2;
+}
+
+message BasicInfo {
+    optional string entName = 1;
+    optional string establishmentDate = 2; // 成立登记日期(格式:yyyy-MM-dd)
+    optional string registrationValidity = 3; // 登记有效期(格式:yyyy-MM-dd)
+    optional string officialWebsite = 4; // 官方网站链接
+    optional string registeredCapital = 5; // 注册资金(单位:万元)
+    optional string netAsset = 6;                // 净资产(单位:元)
+    optional string businessScope = 7; // 业务范围描述
+    optional string missionStatement = 8; // 机构宗旨
+    optional string legalRepresentative = 9; // 法定代表人
+    optional string officeAddress = 10; // 实际办公地址
+    optional string location = 11;          // 基金会所在地
+    optional string contactNumber = 12; // 联系电话
+    optional int32 fullTimeStaffCount = 13;         // 全职员工数量
+    optional string evaluationLevel = 14; // 评估等级(如:3A)
+    optional bool useExternalService = 15; // 是否通常需要外包合作项目(true/false)
+    optional string projectServiceVendors = 16; // 项目服务执行方名单(如:无/合作方名称列表)
+    repeated SuperiorAuthority superiorAuthority = 17; // 业务主管单位情况
+
+    optional string basicInfoCheckResult = 18;
+    repeated Attachment relatedEntityImages = 19;            // 支机构或专业委员会情况
+    optional string relatedEntitiesResult = 20; // 利益冲突风险提示 根据客户在申报链接中填写的答案 填写是,提示1,填写不是,则提示0
+
+    optional string certReceived = 21;    // ${经营情况:《*登记证书》:相关资料是否收到}
+    optional string renzcode = 22;               // ${认证代码}
+    optional string validate = 23;               // ${有效期}
+    optional string companyCode = 24; // ${统一社会信用代码}
+    optional string companyRenzcode = 25;               // ${认证代码}
+    optional string companyValidate = 26;               // ${有效期}
+    optional string bankLicense = 27;             //银行开户许可证
+    optional string bankRenzcode = 28;               // ${认证代码}
+    optional string bankValidate = 29;               // ${有效期}
+    optional string annualInspectionResult = 30;    // ${经营情况:年检结果}
+
+    repeated CheckItemDetail basicInfoChecks = 31; // 审查内容
+    optional CheckSummary basicInfoSummary = 32;          // 基本信息评分及建议(2.5)
+
+    optional CompanyBasicInfoExt platformExt = 33;
+    optional AssociationBasicInfoExt associationExt = 34;
+    optional FoundationBasicInfoExt foundationExt = 35;
+}

+ 5 - 4
easier-report-biz/src/test/java/com/yaoyicloud/render/test/TestAuditResultRender.java

@@ -8,6 +8,7 @@ import org.junit.Test;
 
 import com.yaoyicloud.message.FxyProtos.AuditResult;
 import com.yaoyicloud.message.FxyProtos.CheckItemScore;
+import com.yaoyicloud.message.FxyProtos.CheckSummary;
 import com.yaoyicloud.render.AuditResultRender;
 
 public class TestAuditResultRender {
@@ -19,12 +20,12 @@ public class TestAuditResultRender {
             .readAllBytes(Paths.get(getClass().getClassLoader().getResource("docx/check_overview.docx").getFile()));
         AuditResultRender render = new AuditResultRender("../temp/");
         String retPath = render.renderDocx(
-            AuditResult.newBuilder().setAuditResultScore("30").setOpinion("my opinion").setServiceProviderName("whoami")
-                .setRiskAlert("high risk").setAuditResultSuggestion("accept it")
+            AuditResult.newBuilder().setOpinion("my opinion").setServiceProviderName("whoami")
+                .setOverallSummary(CheckSummary.newBuilder().setRiskSummary("high risk").setSuggestion("accept it"))
                 .addCheckItemScores(0,
-                    CheckItemScore.newBuilder().setItemId(1L).setCategory("cate1").setItemName("name1").setScore(1L))
+                    CheckItemScore.newBuilder().setCategory("cate1").setItemName("name1").setScore(1L))
                 .addCheckItemScores(0,
-                    CheckItemScore.newBuilder().setItemId(2L).setCategory("cate2").setItemName("name2").setScore(2L))
+                    CheckItemScore.newBuilder().setCategory("cate2").setItemName("name2").setScore(2L))
                 .build(),
             content);
 

BIN
easier-report-biz/src/test/resources/docx/basic_info.docx


BIN
easier-report-biz/src/test/resources/docx/check_overview.docx


+ 1 - 1
pom.xml

@@ -170,7 +170,7 @@
                     <outputEncoding>UTF-8</outputEncoding>
                     <skip>${checkstyle.skip}</skip>
                     <configLocation>.style/alibaba.xml</configLocation>
-                    <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
+                    <suppressionsLocation>.style/suppressions.xml</suppressionsLocation>
                     <consoleOutput>true</consoleOutput>
                     <failsOnError>false</failsOnError>
                     <linkXRef>false</linkXRef>