Prechádzať zdrojové kódy

update remains except finiance

dengjia 3 mesiacov pred
rodič
commit
59c5fd7d12

+ 25 - 1
src/main/java/org/example/mybatisplus/Controller/IndexController.java

@@ -4,13 +4,17 @@ import com.alibaba.fastjson2.JSONObject;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 
+import org.docx4j.wml.P;
 import org.example.mybatisplus.model.auto.CmsEnterpriseRiskInfoCheckBO;
 import org.example.mybatisplus.model.auto.CmsEnterpriseRiskInfoDeclaration;
 import org.example.mybatisplus.model.auto.CmsEnterpriseRiskQxbInfoBO;
 import org.example.mybatisplus.module.AuditResult;
 import org.example.mybatisplus.module.BasicInfo;
+import org.example.mybatisplus.module.FinancialInfo;
+import org.example.mybatisplus.module.ProjectInfo;
 import org.example.mybatisplus.module.PublicRecord;
 import org.example.mybatisplus.module.ServiceProviderAuditReport;
+import org.example.mybatisplus.module.vo.Attachment;
 import org.example.mybatisplus.module.vo.ServiceProviderInfo;
 import org.example.mybatisplus.tools.WordPoiExporter;
 import org.springframework.core.io.FileSystemResource;
@@ -22,6 +26,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.io.*;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -102,15 +107,34 @@ public class IndexController {
         cmsEnterpriseRiskInfoCheckBO.fillPublicRecordVO(publicRecord);
 
 
+        FinancialInfo financialInfo = new FinancialInfo();
+
+        ProjectInfo projectInfo = new ProjectInfo();
+        cmsEnterpriseRiskInfoDeclaration.fillProjectInfoVO(projectInfo);
+        cmsEnterpriseRiskInfoCheckBO.fillProjectInfoVO(projectInfo);
+
+        Attachment interestConflicts = new Attachment();
+        cmsEnterpriseRiskInfoDeclaration.fillInterestConflicts(interestConflicts);
+        
+        List<Attachment> attachments = new ArrayList<>();
+        cmsEnterpriseRiskInfoDeclaration.fillAttachments(attachments);
+
         // 4. render WordTemplate with BasicInfo
 
         // ...
 
         // 最后把所有片段合成一个完整报告
 
-        ServiceProviderAuditReport report=new ServiceProviderAuditReport();
+        ServiceProviderAuditReport report = new ServiceProviderAuditReport();
         report.setServiceProviderInfo(serviceProviderInfo);
+        report.setAuditResult(auditResult);
         report.setBasicInfo(basicInfo);
+        report.setPublicRecord(publicRecord);
+        report.setFinancialInfo(financialInfo);
+        report.setProjectInfo(projectInfo);
+        report.setInterestConflict(interestConflicts);
+        report.setAttachments(attachments);
+
         try {
             JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(report));
             // 生成Word文档

+ 8 - 0
src/main/java/org/example/mybatisplus/model/auto/CmsEnterpriseRiskInfoCheckBO.java

@@ -8,6 +8,7 @@ import java.util.stream.Collectors;
 
 import org.example.mybatisplus.module.AuditResult;
 import org.example.mybatisplus.module.BasicInfo;
+import org.example.mybatisplus.module.ProjectInfo;
 import org.example.mybatisplus.module.PublicRecord;
 import org.example.mybatisplus.module.vo.BasicInfoCheck;
 import org.example.mybatisplus.module.vo.BasicInfoScore;
@@ -96,4 +97,11 @@ public class CmsEnterpriseRiskInfoCheckBO {
             new PublicRecordScore(cate.getScore(), cate.getCktReview(), cate.getCktMsg())
         );
     }
+
+    public void fillProjectInfoVO(ProjectInfo projectInfo) {
+        CmsEntRiskInfoCktItemCategory cate = mpCmsEntRiskInfoCktItemCategory.get("PROJECT");
+        projectInfo.setRiskSummary(cate.getCktReview());
+        projectInfo.setScore(cate.getScore());
+        projectInfo.setSuggestion(cate.getCktMsg());
+    }
 }

+ 71 - 0
src/main/java/org/example/mybatisplus/model/auto/CmsEnterpriseRiskInfoDeclaration.java

@@ -5,6 +5,7 @@ import java.util.List;
 
 import org.example.mybatisplus.module.AuditResult;
 import org.example.mybatisplus.module.BasicInfo;
+import org.example.mybatisplus.module.ProjectInfo;
 import org.example.mybatisplus.module.vo.Attachment;
 
 public class CmsEnterpriseRiskInfoDeclaration {
@@ -66,6 +67,12 @@ public class CmsEnterpriseRiskInfoDeclaration {
 
     }
 
+    public void fillProjectInfoVO(ProjectInfo projectInfo) {
+        Attachment attach = new Attachment();
+        attach.setFilePath(getDelcFileUrl("基金会项目情况", Collections.singletonList(this)));
+        projectInfo.setFiles(Collections.singletonList(attach));
+    }
+
     private Object getDelcEndWithInfo(String delcItem, List<CmsEnterpriseRiskInfoDeclaration> declarations) {
         return "value-" + delcItem; // mock
     }
@@ -73,4 +80,68 @@ public class CmsEnterpriseRiskInfoDeclaration {
     private String getDelcFileUrl(String delcItem, List<CmsEnterpriseRiskInfoDeclaration> declarations) {
         return "oss://abc";  // mock
     }
+
+    public void fillInterestConflicts(Attachment interestConflicts) {
+        interestConflicts.setFilePath(
+            getDelcFileUrl("机构负责人", Collections.singletonList(this)));
+    }
+
+    public void fillAttachments(List<Attachment> attachments) {
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("基金会法人登记证书", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("基金会法人登记证书-最新年检结果页", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("银行开户证或银行资信证明", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("1A-5A评估等级/资质证书/金属铜牌照片", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("完整章程副本", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("机构“前十大”捐赠方名单", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("机构“前十大”支出方名单", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("机构管理层(法定代表人,理事长,秘书长)相关工作简历或备案 表(如有)", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("最近三年财务报表", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("关联实体情况", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("机构负责人", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("项目信息", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("组织架构-扫描件并加盖公章", Collections.singletonList(this))
+        );
+        attachments.add(new Attachment());
+        attachments.get(attachments.size()-1).setFilePath(
+            getDelcFileUrl("总体保证声明", Collections.singletonList(this))
+        );
+    }
 }

+ 1 - 1
src/main/java/org/example/mybatisplus/module/ProjectInfo.java

@@ -10,7 +10,7 @@ import java.util.List;
  */
 @Data
 public class ProjectInfo {
-    private Double score;           // ${公共记录评分及建议:公共记录评分}
+    private Long score;           // ${公共记录评分及建议:公共记录评分}
     private String riskSummary;     // ${公共记录评分及建议:风险综述}
     private String suggestion;      // ${公共记录评分及建议:建议}
 

+ 4 - 0
src/main/java/org/example/mybatisplus/module/vo/Attachment.java

@@ -1,5 +1,7 @@
 package org.example.mybatisplus.module.vo;
 
+import org.apache.xpath.operations.Bool;
+
 import lombok.Data;
 
 /**
@@ -12,4 +14,6 @@ public class Attachment {
     private String fileType;//附件类型,图片或pdf
     private String width;
     private String height;//图片显示高度
+
+    private Boolean showable = true;
 }