新增项目尽调功能、项目估值PE、PB、PS等

master
yz 1 year ago
parent 82bc5b7226
commit f702239506

@ -35,6 +35,11 @@
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-asian</artifactId>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>

@ -1,6 +1,7 @@
package com.sztzjy.fund_investment.controller;
import com.github.pagehelper.PageInfo;
import com.sztzjy.fund_investment.annotation.AnonymousAccess;
import com.sztzjy.fund_investment.entity.FoundProject;
import com.sztzjy.fund_investment.entity.ProjectPool;
import com.sztzjy.fund_investment.mapper.FoundProjectMapper;
@ -22,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
import java.io.File;
import java.nio.file.Paths;
//yz
@RestController
@RequestMapping("/foundProjectController")
@Api(tags = "学生端--寻找项目")
@ -38,6 +39,7 @@ public class FoundProjectController {
@GetMapping("getProjectPoolList")
@ApiOperation("寻找项目数据展示")
@AnonymousAccess
public ResultEntity getFundraising(@ApiParam("条数") @RequestParam Integer size,
@ApiParam("页数") @RequestParam Integer index) {
PageInfo<ProjectPool> pageInfo=projectPoolService.selectList(size,index);
@ -63,14 +65,21 @@ public class FoundProjectController {
@PostMapping("projectApproval")
@ApiOperation("立项")
@AnonymousAccess
public ResultEntity projectApproval(@ApiParam("传递flow_id,project_pool_id,found_project_conclusion") @RequestBody FoundProject foundProject){
if(StringUtils.isBlank(foundProject.getFlowId())){
return new ResultEntity(HttpStatus.BAD_REQUEST,"流程ID未上传");
}else if(StringUtils.isBlank(foundProject.getProjectPoolId())){
}
if(StringUtils.isBlank(foundProject.getProjectPoolId())){
return new ResultEntity(HttpStatus.BAD_REQUEST,"未选择项目");
}else if(StringUtils.isBlank(foundProject.getFoundProjectConclusion())){
}
if(StringUtils.isBlank(foundProject.getFoundProjectConclusion())){
return new ResultEntity(HttpStatus.BAD_REQUEST,"未填写选择理由");
}
FoundProject foundProject1 = foundProjectMapper.selectByPrimaryKey(foundProject.getFlowId());
if(foundProject1!=null){
return new ResultEntity(HttpStatus.BAD_REQUEST,"本次实训已立项过");
}
foundProjectMapper.insert(foundProject);
return new ResultEntity(HttpStatus.OK,"立项成功");
}
@ -80,6 +89,8 @@ public class FoundProjectController {
@ApiOperation("立项回显")
public ResultEntity getProjectApproval(@ApiParam("流程ID") @RequestParam String flowId){
FoundProject foundProject=foundProjectService.selectByFlowId(flowId);
foundProject.setFinancialDueDiligence(null);
foundProject.setServiceDueDiligence(null);
return new ResultEntity(HttpStatus.OK,"立项回显成功",foundProject);
}

@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.UUID;
//yz
@RestController
@RequestMapping("/fundraisingController")
@Api(tags = "学生端--资金募资")
@ -30,6 +31,7 @@ public class FundraisingController {
@AnonymousAccess
@GetMapping("getFundraising")
@ApiOperation("资金募资回显")
@AnonymousAccess
public ResultEntity getFundraising(@ApiParam("流程id") @RequestParam String flowId) {
Fundraising fundraising=fundraisingService.selectByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"资金募资回显成功",fundraising);
@ -38,6 +40,7 @@ public class FundraisingController {
@AnonymousAccess
@GetMapping("insertFundraising")
@ApiOperation("新增基金募资")
@AnonymousAccess
public ResultEntity insertFundraising(@ApiParam("流程id") @RequestParam String flowId,
@ApiParam("自有资金") @RequestParam BigDecimal ownFunds,
@ApiParam("银行借款") @RequestParam BigDecimal bankLoan,

@ -1,19 +1,37 @@
package com.sztzjy.fund_investment.controller;
import cn.hutool.core.util.IdUtil;
import com.github.pagehelper.PageInfo;
import com.itextpdf.text.*;
import com.itextpdf.text.Font;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import com.sztzjy.fund_investment.annotation.AnonymousAccess;
import com.sztzjy.fund_investment.entity.*;
import com.sztzjy.fund_investment.entity.treeSelect.TreeSelect;
import com.sztzjy.fund_investment.mapper.FoundProjectMapper;
import com.sztzjy.fund_investment.mapper.ProjectPoolMapper;
import com.sztzjy.fund_investment.service.ISysProjectDueDiligenceService;
import com.sztzjy.fund_investment.util.ResultEntity;
import com.sztzjy.fund_investment.util.excel.FilePortUtil;
import com.sztzjy.fund_investment.util.pdfUtils.HeaderAndFooterEvent;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.io.IOException;
import java.util.*;
import java.util.List;
//yz
@RestController
@RequestMapping("/projectDueDiligenceController")
@Api(tags = "学生端--项目尽调")
@ -22,115 +40,714 @@ public class ProjectDueDiligence {
ISysProjectDueDiligenceService projectDueDiligenceService;
@Autowired
FoundProjectMapper foundProjectMapper;
@Autowired
ProjectPoolMapper projectPoolMapper;
@Autowired
HeaderAndFooterEvent headerAndFooterEvent;
//*************公司业务尽职调查
@GetMapping("getProjectPoolNameByFlowId")
@ApiOperation("查询公司名称")
@AnonymousAccess
public String getProjectPoolNameByFlowId(@ApiParam("流程ID") @RequestParam String flowId) {
String projectPoolId = foundProjectMapper.selectByPrimaryKey(flowId).getProjectPoolId();
String companyName = projectPoolMapper.selectByPrimaryKey(projectPoolId).getCompanyName();
return companyName;
}
@GetMapping("getBusinessInfoShareholderList")
@ApiOperation("公司背景-公司信息")
public ResultEntity getBusinessInfoShareholderList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProBusinessInfoShareholder> list=projectDueDiligenceService.getBusinessInfoShareholderListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"公司背景-公司信息,展示成功",list);
@ApiOperation("公司背景-工商信息上")
@AnonymousAccess
public ResultEntity<ProBusinessInfoShareholder> getBusinessInfoShareholderList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProBusinessInfoShareholder> list = projectDueDiligenceService.getBusinessInfoShareholderListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "公司背景-工商信息上,展示成功", list.get(0));
}
@GetMapping("getBusinessInfoList")
@ApiOperation("公司背景-工商信息下")
@AnonymousAccess
public ResultEntity<ProBusinessInfo> getBusinessInfoList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProBusinessInfo> list = projectDueDiligenceService.getBusinessInfoList(flowId);
return new ResultEntity(HttpStatus.OK, "公司背景-工商信息下,展示成功", list.get(0));
}
@GetMapping("getProJudicialRiskList")
@ApiOperation("司法风险")
public ResultEntity getProJudicialRiskList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProJudicialRisk> list=projectDueDiligenceService.getProJudicialRiskListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"司法风险,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProJudicialRisk>> getProJudicialRiskList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProJudicialRisk> list = projectDueDiligenceService.getProJudicialRiskListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "司法风险,展示成功", list);
}
@GetMapping("getProBusinessRiskList")
@ApiOperation("经营风险")
public ResultEntity getProBusinessRiskList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProBusinessRisk> list=projectDueDiligenceService.getProBusinessRiskListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"经营风险,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProBusinessRisk>> getProBusinessRiskList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProBusinessRisk> list = projectDueDiligenceService.getProBusinessRiskListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "经营风险,展示成功", list);
}
@GetMapping("getProCoreTeamList")
@ApiOperation("公司发展-核心团队")
public ResultEntity getProCoreTeamList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProCoreTeam> list=projectDueDiligenceService.getProCoreTeamListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"公司发展-核心团队,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProCoreTeam>> getProCoreTeamList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProCoreTeam> list = projectDueDiligenceService.getProCoreTeamListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "公司发展-核心团队,展示成功", list);
}
@GetMapping("getProCoreBusinessList")
@ApiOperation("公司发展-核心业务")
public ResultEntity getProCoreBusinessList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProCoreBusiness> list=projectDueDiligenceService.getProCoreBusinessListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"公司发展-核心业务,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProCoreBusiness>> getProCoreBusinessList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProCoreBusiness> list = projectDueDiligenceService.getProCoreBusinessListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "公司发展-核心业务,展示成功", list);
}
@GetMapping("getProCoreCompProList")
@ApiOperation("公司发展-相关竞品")
public ResultEntity getProCoreCompProList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProCoreCompPro> list=projectDueDiligenceService.getProCoreCompProListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"公司发展-相关竞品,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProCoreCompPro>> getProCoreCompProList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProCoreCompPro> list = projectDueDiligenceService.getProCoreCompProListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "公司发展-相关竞品,展示成功", list);
}
@GetMapping("getProManaSituRecruitList")
@ApiOperation("经营状况-公司招聘")
public ResultEntity getProManaSituRecruitList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProManaSituRecruit> list=projectDueDiligenceService.getProManaSituRecruitListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"经营状况-公司招聘,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProManaSituRecruit>> getProManaSituRecruitList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProManaSituRecruit> list = projectDueDiligenceService.getProManaSituRecruitListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "经营状况-公司招聘,展示成功", list);
}
@GetMapping("getProManaSituCheckList")
@ApiOperation("经营状况-抽查检查")
public ResultEntity getProManaSituCheckList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProManaSituCheck> list=projectDueDiligenceService.getProManaSituCheckListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"经营状况-抽查检查,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProManaSituCheck>> getProManaSituCheckList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProManaSituCheck> list = projectDueDiligenceService.getProManaSituCheckListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "经营状况-抽查检查,展示成功", list);
}
@GetMapping("getProManaSituLicenseList")
@ApiOperation("经营状况-行政许可")
public ResultEntity getProManaSituLicenseList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProManaSituLicense> list=projectDueDiligenceService.getProManaSituLicenseListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"经营状况-行政许可,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProManaSituLicense>> getProManaSituLicenseList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProManaSituLicense> list = projectDueDiligenceService.getProManaSituLicenseListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "经营状况-行政许可,展示成功", list);
}
@GetMapping("getProManaSituTenderingBiddingList")
@ApiOperation("经营状况-招投标")
public ResultEntity getProManaSituTenderingBiddingList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProManaSituTenderingBidding> list=projectDueDiligenceService.getProManaSituTenderingBiddingListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"经营状况-招投标,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProManaSituTenderingBidding>> getProManaSituTenderingBiddingList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProManaSituTenderingBidding> list = projectDueDiligenceService.getProManaSituTenderingBiddingListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "经营状况-招投标,展示成功", list);
}
@GetMapping("getProIntelPropertyPatentInfoList")
@ApiOperation("知识产权-专利信息")
public ResultEntity getProIntelPropertyPatentInfoList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProIntelPropertyPatentinfo> list=projectDueDiligenceService.getProIntelPropertyPatentInfoListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"知识产权-专利信息,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProIntelPropertyPatentinfo>> getProIntelPropertyPatentInfoList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProIntelPropertyPatentinfo> list = projectDueDiligenceService.getProIntelPropertyPatentInfoListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "知识产权-专利信息,展示成功", list);
}
@GetMapping("getProIntelPropertyWebsiteRecordList")
@ApiOperation("知识产权-网站备案")
public ResultEntity getProIntelPropertyWebsiteRecordList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProIntelPropertyWebsiteRecord> list=projectDueDiligenceService.getProIntelPropertyWebsiteRecordListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"知识产权-网站备案,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProIntelPropertyWebsiteRecord>> getProIntelPropertyWebsiteRecordList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProIntelPropertyWebsiteRecord> list = projectDueDiligenceService.getProIntelPropertyWebsiteRecordListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "知识产权-网站备案,展示成功", list);
}
@GetMapping("getProAdminiPenaltyList")
@ApiOperation("法律尽职调查-行政处罚【信用中国】")
public ResultEntity getProAdminiPenaltyList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProAdminiPenalty> list=projectDueDiligenceService.getProAdminiPenaltyListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK,"法律尽职调查-行政处罚【信用中国】,展示成功",list);
@AnonymousAccess
public ResultEntity<List<ProAdminiPenalty>> getProAdminiPenaltyList(@ApiParam("流程ID") @RequestParam String flowId) {
List<ProAdminiPenalty> list = projectDueDiligenceService.getProAdminiPenaltyListByFlowId(flowId);
return new ResultEntity(HttpStatus.OK, "法律尽职调查-行政处罚【信用中国】,展示成功", list);
}
@PostMapping("updateServiceDueDiligence")
@ApiOperation("业务尽调结论")
@AnonymousAccess
public ResultEntity updateServiceDueDiligence(@ApiParam("转递flow_id、service_due_diligence") @RequestBody FoundProject foundProject) {
if(StringUtils.isBlank(foundProject.getFlowId())){
return new ResultEntity(HttpStatus.BAD_REQUEST,"流程ID为空");
if (StringUtils.isBlank(foundProject.getFlowId())) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "流程ID为空");
}
if(StringUtils.isBlank(foundProject.getServiceDueDiligence())){
return new ResultEntity(HttpStatus.BAD_REQUEST,"业务尽调结论为空");
if (StringUtils.isBlank(foundProject.getServiceDueDiligence())) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "业务尽调结论为空");
}
projectDueDiligenceService.updateServiceDueDiligence(foundProject);
return new ResultEntity(HttpStatus.OK,"业务尽调结论上传成功");
return new ResultEntity(HttpStatus.OK, "业务尽调结论保存成功");
}
@GetMapping("getServiceDueDiligence")
@ApiOperation("业务尽调结论回显")
public ResultEntity getServiceDueDiligence(@ApiParam("流程ID") @RequestParam String flowId) {
@AnonymousAccess
public ResultEntity<FoundProject> getServiceDueDiligence(@ApiParam("流程ID") @RequestParam String flowId) {
FoundProject foundProject = foundProjectMapper.selectByPrimaryKey(flowId);
return new ResultEntity(HttpStatus.OK,"业务尽调结论,展示成功",foundProject);
foundProject.setFinancialDueDiligence(null);
foundProject.setFoundProjectConclusion(null);
return new ResultEntity(HttpStatus.OK, "业务尽调结论,展示成功", foundProject);
}
//*********************公司财务尽职调查
@GetMapping("getProFinancialIndexSelectTree")
@ApiOperation("财务指标选取下拉框")
@AnonymousAccess
public ResultEntity<List<TreeSelect>> getProFinancialIndexSelectTree() {
List<TreeSelect> list = projectDueDiligenceService.getProFinancialIndexSelectTree();
return new ResultEntity(HttpStatus.OK, "财务指标选取下拉框,展示成功", list);
}
@GetMapping("getProFinancialStatementSelectTree")
@ApiOperation("财务报表选取下拉框")
@AnonymousAccess
public ResultEntity<List<TreeSelect>> getProFinancialStatementSelectTree() {
List<TreeSelect> list = projectDueDiligenceService.getProFinancialStatementSelectTree();
return new ResultEntity(HttpStatus.OK, "财务报表选取下拉框,展示成功", list);
}
@GetMapping("selectProFinancialIndexDetailList")
@ApiOperation("财务指标查询")
@AnonymousAccess
public ResultEntity<PageInfo<ProFinancialIndexDetail>> selectProFinancialIndexDetailList(@ApiParam("节点id的集合List") @RequestParam List<String> proFinancialIndexIdList,
@ApiParam("流程ID") @RequestParam String flowId,
@ApiParam("条数") @RequestParam Integer size,
@ApiParam("页数") @RequestParam Integer index) {
PageInfo<ProFinancialIndexDetail> pageInfo = projectDueDiligenceService.selectProFinancialIndexDetailList(proFinancialIndexIdList, flowId, size, index);
return new ResultEntity(HttpStatus.OK, "财务指标查询成功", pageInfo);
}
@GetMapping("selectProFinancialStatementDetailList")
@ApiOperation("财务报表查询")
@AnonymousAccess
public ResultEntity<PageInfo<ProFinancialStatementDetail>> selectProFinancialStatementDetailList(@ApiParam("节点id的集合List") @RequestParam List<String> proFinancialStatementIdList,
@ApiParam("流程ID") @RequestParam String flowId,
@ApiParam("条数") @RequestParam Integer size,
@ApiParam("页数") @RequestParam Integer index) {
PageInfo<ProFinancialStatementDetail> pageInfo = projectDueDiligenceService.selectProFinancialStatementDetailList(proFinancialStatementIdList, flowId, size, index);
return new ResultEntity(HttpStatus.OK, "财务报表查询成功", pageInfo);
}
@GetMapping("exportProFinancialIndexDetailList")
@ApiOperation("财务指标选取导出")
@AnonymousAccess
public void exportProFinancialIndexDetailList(@ApiParam("HttpServletResponse") HttpServletResponse response,
@ApiParam("节点id的集合List") @RequestParam List<String> proFinancialIndexIdList,
@ApiParam("流程ID") @RequestParam String flowId) {
//导出的表名
String title = IdUtil.simpleUUID();
//表中第一行表头字段
String[] headers = null;
List<String> listColumn;
headers = new String[]{"指标名称", "2022/12/31", "2021/12/31", "2020/12/31"};
listColumn = Arrays.asList("name", "lastYearValue", "lastTowYearValue", "lastThreeYearValue");
//实际数据结果集
PageInfo<ProFinancialIndexDetail> pageInfo = projectDueDiligenceService.selectProFinancialIndexDetailList(proFinancialIndexIdList, flowId, 10000, 1);
List<ProFinancialIndexDetail> list = pageInfo.getList();
//具体需要写入excel需要哪些字段这些字段取自UserReward类也就是上面的实际数据结果集的泛型
try {
FilePortUtil.exportExcel(response, title, headers, list, listColumn);
} catch (Exception e) {
e.printStackTrace();
}
}
@GetMapping("exportProFinancialStatementDetailList")
@ApiOperation("财务报表选取导出")
@AnonymousAccess
public void exportProFinancialStatementDetailList(@ApiParam("HttpServletResponse") HttpServletResponse response,
@ApiParam("节点id的集合List") @RequestParam List<String> proFinancialStatemantIdList,
@ApiParam("流程ID") @RequestParam String flowId) {
//导出的表名
String title = IdUtil.simpleUUID();
//表中第一行表头字段
String[] headers = null;
List<String> listColumn;
headers = new String[]{"指标名称", "2022/12/31", "2021/12/31", "2020/12/31"};
listColumn = Arrays.asList("name", "lastYearValue", "lastTowYearValue", "lastThreeYearValue");
//实际数据结果集
PageInfo<ProFinancialStatementDetail> pageInfo = projectDueDiligenceService.selectProFinancialStatementDetailList(proFinancialStatemantIdList, flowId, 10000, 1);
List<ProFinancialStatementDetail> list = pageInfo.getList();
//具体需要写入excel需要哪些字段这些字段取自UserReward类也就是上面的实际数据结果集的泛型
try {
FilePortUtil.exportExcel(response, title, headers, list, listColumn);
} catch (Exception e) {
e.printStackTrace();
}
}
@PostMapping("updateFinanceDueDiligence")
@ApiOperation("财务尽调结论")
@AnonymousAccess
public ResultEntity updateFinanceDueDiligence(@ApiParam("转递flow_id、financialDueDiligence") @RequestBody FoundProject foundProject) {
if (StringUtils.isBlank(foundProject.getFlowId())) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "流程ID为空");
}
if (StringUtils.isBlank(foundProject.getFinancialDueDiligence())) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "财务尽调结论为空");
}
projectDueDiligenceService.updateServiceDueDiligence(foundProject);
return new ResultEntity(HttpStatus.OK, "财务尽调结论保存成功");
}
@GetMapping("getFinanceDueDiligence")
@ApiOperation("财务尽调结论回显")
@AnonymousAccess
public ResultEntity<FoundProject> getFinanceServiceDueDiligence(@ApiParam("流程ID") @RequestParam String flowId) {
FoundProject foundProject = foundProjectMapper.selectByPrimaryKey(flowId);
foundProject.setServiceDueDiligence(null);
foundProject.setFoundProjectConclusion(null);
return new ResultEntity(HttpStatus.OK, "财务尽调结论,展示成功", foundProject);
}
@GetMapping("exportFinanceDueDiligencePDF")
@ApiOperation("财务尽调生成报告")
@AnonymousAccess
public void exportFinanceDueDiligencePDF(@ApiParam("HttpServletResponse") HttpServletResponse response,
@ApiParam("流程ID") @RequestParam String flowId) throws IOException, DocumentException {
String projectPoolName=getProjectPoolNameByFlowId(flowId); //公司名称
Document document = new Document();
// 创建 PdfWriter 对象 第一个参数是对文档对象的引用,第二个参数是文件的实际名称,在该名称中还会给出其输出路径。
PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream());
writer.setPageEvent(new HeaderAndFooterEvent());
document.open();
HeaderAndFooterEvent.tpl=writer.getDirectContent().createTemplate(500,500);
HeaderAndFooterEvent.PAGE_NUMBER = true;//实现页眉跟页脚
HeaderAndFooterEvent.HeaderLeft = "";//左上角
HeaderAndFooterEvent.HeaderRight = "";//右上角
HeaderAndFooterEvent.FooterLeft = "";//左下角
HeaderAndFooterEvent.FooterRight= "深圳市天择教育科技有限公司";//右下角
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "宋体", 25, Font.BOLD);
//添加一个空段落来占位五个参数分别为内容对齐方式1为居中0为居左2为居右段后空行数段前空行数行间距
document.add(HeaderAndFooterEvent.AddParagraph(" ", 1, 200, 0, 1.5f));
document.add(HeaderAndFooterEvent.AddParagraph("天择投资银行业务教学系统", 1, 1.5f));
HeaderAndFooterEvent.SetFont(BaseColor.GRAY, "宋体", 18, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph(projectPoolName + "--尽职调查报告", 1, 1.5f));
document.newPage(); //换第二页 目录
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 22, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("目录", 1, 1.5f));
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p1 = HeaderAndFooterEvent.AddParagraph("一、公司背景:", 0, 1.5f);
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 14, Font.BOLD);
p1.add(HeaderAndFooterEvent.AddParagraph("公司名称、法定代表人、股东及持股比例、成立日期、注册资本、\n" +
"经营状态、统一社会信用代码、纳税人识别号、营业期限、实缴资本、参保人数、注\n" +
"册地址、经营范围、工商注册号、组织机构代码、公司类型、行业、核准日期、人员\n" +
"规模、登记机关 ", 0, 1.5f));
document.add(p1);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p2 = HeaderAndFooterEvent.AddParagraph("二、司法风险:", 0, 1.5f);
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 14, Font.BOLD);
p2.add(HeaderAndFooterEvent.AddParagraph("开庭日期、案号、案由、公诉人/原告、被告人", 0, 1.5f));
document.add(p2);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p3 = HeaderAndFooterEvent.AddParagraph("三、经营风险:", 0, 1.5f);
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 14, Font.BOLD);
p3.add(HeaderAndFooterEvent.AddParagraph("列入经营异常名录原因、列入日期、列入机关;移出经营异常名录\n" +
"原因、移出日期、移出机关 ", 0, 1.5f));
document.add(p3);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p4 = HeaderAndFooterEvent.AddParagraph("四、公司发展:", 0, 1.5f);
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 14, Font.BOLD);
p4.add(HeaderAndFooterEvent.AddParagraph("核心团队、核心业务、相关竞品", 0, 1.5f));
document.add(p4);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p5 = HeaderAndFooterEvent.AddParagraph("五、经营状况:", 0, 1.5f);
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 14, Font.BOLD);
p5.add(HeaderAndFooterEvent.AddParagraph("公司招聘、抽查检查、行政许可、招投标 ", 0, 1.5f));
document.add(p5);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p6 = HeaderAndFooterEvent.AddParagraph("六、知识产权:", 0, 1.5f);
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 14, Font.BOLD);
p6.add(HeaderAndFooterEvent.AddParagraph("专利信息、网站备案", 0, 1.5f));
document.add(p6);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p7 = HeaderAndFooterEvent.AddParagraph("七、法律尽职调查:", 0, 1.5f);
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 14, Font.BOLD);
p7.add(HeaderAndFooterEvent.AddParagraph("行政处罚", 0, 1.5f));
document.add(p7);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p8 = HeaderAndFooterEvent.AddParagraph("八、财务尽职调查:", 0, 1.5f);
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 14, Font.BOLD);
p8.add(HeaderAndFooterEvent.AddParagraph("三大财务报表、主要财务指标", 0, 1.5f));
document.add(p8);
document.newPage(); //换第三页
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p11 = HeaderAndFooterEvent.AddParagraph("一、公司背景", 0, 1.5f);//公司背景
document.add(p11);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("工商信息:", 0, 1.5f));//工商信息
ProBusinessInfoShareholder proBusinessInfoShareholder = projectDueDiligenceService.getBusinessInfoShareholderListByFlowId(flowId).get(0);
ProBusinessInfo proBusinessInfo = projectDueDiligenceService.getBusinessInfoList(flowId).get(0);
TreeMap<String,String> treeMap=new TreeMap<>();
treeMap.put("企业名称",projectPoolName);
treeMap.put("法定代表人",proBusinessInfoShareholder.getLegalPerson());
treeMap.put("股东",proBusinessInfoShareholder.getShareholder1());
treeMap.put("持股比例",proBusinessInfoShareholder.getValue1());
treeMap.put("注册资本",proBusinessInfo.getRegisteredCapital());
treeMap.put("经营状态",proBusinessInfo.getOperatingState());
treeMap.put("统一社会信用代码",proBusinessInfo.getCreditCode());
treeMap.put("纳税人识别号",proBusinessInfo.getIdentificationNumber());
treeMap.put("营业期限",proBusinessInfo.getBusinessTerm());
treeMap.put("实缴资本",proBusinessInfo.getPaidinCapital());
treeMap.put("参保人数",proBusinessInfo.getInsuranceNum());
treeMap.put("成立日期",proBusinessInfo.getCreateDate());
treeMap.put("工商注册号",proBusinessInfo.getRegistrationNum());
treeMap.put("组织机构代码",proBusinessInfo.getOrgaStruCode());
treeMap.put("公司类型",proBusinessInfo.getCompanyType());
treeMap.put("行业",proBusinessInfo.getIndustry());
treeMap.put("核准日期",proBusinessInfo.getApprovalDate());
treeMap.put("人员规模",proBusinessInfo.getStaffSize());
treeMap.put("登记机关",proBusinessInfo.getRegistrar());
treeMap.put("注册地址",proBusinessInfo.getRegisteredAddress());
treeMap.put("经营范围",proBusinessInfo.getBusinessScope());
PdfPTable table = returnPdfPTable(treeMap);
document.add(table);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p12 = HeaderAndFooterEvent.AddParagraph("二、司法风险", 0, 1.5f);
document.add(p12);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("司法风险:", 0, 1.5f));
ProJudicialRisk proJudicialRisk = projectDueDiligenceService.getProJudicialRiskListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap2=new TreeMap<>();
treeMap2.put("开庭日期",proJudicialRisk.getLawfulDay());
treeMap2.put("案号",proJudicialRisk.getCaseCode());
treeMap2.put("案由",proJudicialRisk.getCause());
treeMap2.put("公诉人/原告",proJudicialRisk.getPlaintiff());
treeMap2.put("被告人",proJudicialRisk.getDefendant());
PdfPTable table2 = returnPdfPTable(treeMap2);
document.add(table2);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p13 = HeaderAndFooterEvent.AddParagraph("三、经营风险", 0, 1.5f);
document.add(p13);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("经营风险:", 0, 1.5f));
ProBusinessRisk proBusinessRisk = projectDueDiligenceService.getProBusinessRiskListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap3=new TreeMap<>();
treeMap3.put("列入日期 ",proBusinessRisk.getIncludedDate());
treeMap3.put("列入经营异常名录原因",proBusinessRisk.getIncludedCause());
treeMap3.put("列入机关 ",proBusinessRisk.getIncludedOrganization());
treeMap3.put("移出日期",proBusinessRisk.getRemovedDate());
treeMap3.put("移出经营异常名录原因",proBusinessRisk.getRemovedCause());
treeMap3.put("移出决定机关 ",proBusinessRisk.getRemovedOrganization());
PdfPTable table3 = returnPdfPTable(treeMap3);
document.add(table3);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p14 = HeaderAndFooterEvent.AddParagraph("四、公司发展", 0, 1.5f);
document.add(p14);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("核心团队:", 0, 1.5f));
ProCoreTeam proCoreTeam = projectDueDiligenceService.getProCoreTeamListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap4=new TreeMap<>();
treeMap4.put("姓名",proCoreTeam.getName());
treeMap4.put("职位",proCoreTeam.getDuty());
treeMap4.put("简介",proCoreTeam.getIntroduction());
PdfPTable table4 = returnPdfPTable(treeMap4);
document.add(table4);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("核心业务:", 0, 1.5f));
ProCoreBusiness proCoreBusiness = projectDueDiligenceService.getProCoreBusinessListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap42=new TreeMap<>();
treeMap42.put("产品名称",proCoreBusiness.getProductnameName());
treeMap42.put("行业",proCoreBusiness.getIndustry());
treeMap42.put("产品介绍",proCoreBusiness.getProductIntroduction());
PdfPTable table42 = returnPdfPTable(treeMap42);
document.add(table42);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("相关竞品:", 0, 1.5f));
ProCoreCompPro proCoreCompPro = projectDueDiligenceService.getProCoreCompProListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap43=new TreeMap<>();
treeMap43.put("竞品名称",proCoreCompPro.getCompProName());
treeMap43.put("地区",proCoreCompPro.getIndustry());
treeMap43.put("当前融资轮次",proCoreCompPro.getArea());
treeMap43.put("行业",proCoreCompPro.getIndustry());
treeMap43.put("业务",proCoreCompPro.getBusiness());
treeMap43.put("成立时间",proCoreCompPro.getCreateDate());
treeMap43.put("估值",proCoreCompPro.getValuation());
PdfPTable table43 = returnPdfPTable(treeMap43);
document.add(table43);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p15 = HeaderAndFooterEvent.AddParagraph("五、经营状况", 0, 1.5f);
document.add(p15);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("公司招聘:", 0, 1.5f));
ProManaSituRecruit proManaSituRecruit = projectDueDiligenceService.getProManaSituRecruitListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap51=new TreeMap<>();
treeMap51.put("发布日期",proManaSituRecruit.getReleaseDate());
treeMap51.put("招聘职位",proManaSituRecruit.getDuty());
treeMap51.put("月薪",proManaSituRecruit.getSalary());
treeMap51.put("学历",proManaSituRecruit.getDegrees());
treeMap51.put("工作经验",proManaSituRecruit.getExperience());
treeMap51.put("地区",proManaSituRecruit.getArea());
PdfPTable table51 = returnPdfPTable(treeMap51);
document.add(table51);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("抽查检查:", 0, 1.5f));
ProManaSituCheck proManaSituCheck = projectDueDiligenceService.getProManaSituCheckListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap52=new TreeMap<>();
treeMap52.put("日期",proManaSituCheck.getCheckDate());
treeMap52.put("类型",proManaSituCheck.getCheckType());
treeMap52.put("结果",proManaSituCheck.getConsequence());
treeMap52.put("检查实施机关",proManaSituCheck.getOrganization());
PdfPTable table52 = returnPdfPTable(treeMap52);
document.add(table52);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("行政许可:", 0, 1.5f));
ProManaSituLicense proManaSituLicense = projectDueDiligenceService.getProManaSituLicenseListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap53=new TreeMap<>();
treeMap53.put("行政许可文书号",proManaSituLicense.getWrittenDecisionNum());
treeMap53.put("许可决定机关",proManaSituLicense.getOrganization());
treeMap53.put("许可决定日期",proManaSituLicense.getLicenseDate());
PdfPTable table53 = returnPdfPTable(treeMap53);
document.add(table53);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("招投标:", 0, 1.5f));
ProManaSituTenderingBidding proManaSituTenderingBidding = projectDueDiligenceService.getProManaSituTenderingBiddingListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap54=new TreeMap<>();
treeMap54.put("发布日期",proManaSituTenderingBidding.getReleaseDate());
treeMap54.put("标题",proManaSituTenderingBidding.getTitle());
treeMap54.put("采购人",proManaSituTenderingBidding.getPurchaser());
PdfPTable table54 = returnPdfPTable(treeMap54);
document.add(table54);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p16 = HeaderAndFooterEvent.AddParagraph("六、知识产权", 0, 1.5f);
document.add(p16);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("专利信息:", 0, 1.5f));
ProIntelPropertyPatentinfo proIntelPropertyPatentinfo = projectDueDiligenceService.getProIntelPropertyPatentInfoListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap61=new TreeMap<>();
treeMap61.put("申请公布日",proIntelPropertyPatentinfo.getPublishDate());
treeMap61.put("专利名称",proIntelPropertyPatentinfo.getPatentName());
treeMap61.put("申请号",proIntelPropertyPatentinfo.getApplicationNum());
treeMap61.put("申请公布号",proIntelPropertyPatentinfo.getApplicationPubNum());
treeMap61.put("专利类型",proIntelPropertyPatentinfo.getPatentType());
PdfPTable table61 = returnPdfPTable(treeMap61);
document.add(table61);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("网站备案:", 0, 1.5f));
ProIntelPropertyWebsiteRecord proIntelPropertyWebsiteRecord = projectDueDiligenceService.getProIntelPropertyWebsiteRecordListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap62=new TreeMap<>();
treeMap62.put("审核日期",proIntelPropertyWebsiteRecord.getReviewDate());
treeMap62.put("网站名称",proIntelPropertyWebsiteRecord.getWebsiteName());
treeMap62.put("IP地址",proIntelPropertyWebsiteRecord.getIpAddress());
treeMap62.put("域名信息",proIntelPropertyWebsiteRecord.getDomainNameInfo());
PdfPTable table62 = returnPdfPTable(treeMap62);
document.add(table62);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p17 = HeaderAndFooterEvent.AddParagraph("七、法律尽职调查", 0, 1.5f);
document.add(p17);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("行政处罚:", 0, 1.5f));
ProAdminiPenalty proAdminiPenalty = projectDueDiligenceService.getProAdminiPenaltyListByFlowId(flowId).get(0);
TreeMap<String,String> treeMap7=new TreeMap<>();
treeMap7.put("公司名称",projectPoolName);
treeMap7.put("决定日期",proAdminiPenalty.getDecisionDate());
treeMap7.put("决定书文号",proAdminiPenalty.getWrittenDecisionNum());
treeMap7.put("处罚事由",proAdminiPenalty.getPunishmentCause());
treeMap7.put("处罚结果",proAdminiPenalty.getPunishmentResult());
treeMap7.put("处罚机关",proAdminiPenalty.getPunishmentOrganization());
PdfPTable table7 = returnPdfPTable(treeMap7);
document.add(table7);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD);
Paragraph p18 = HeaderAndFooterEvent.AddParagraph("八、财务尽职调查", 0, 1.5f);
document.add(p18);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("指标数据:", 0, 1.5f));
ArrayList<String> list = new ArrayList<>();
list.add("7");
list.add("8");
list.add("9");
list.add("10");
List<ProFinancialIndexDetail> financialIndexDetailList = projectDueDiligenceService.selectProFinancialIndexDetailList(list, flowId, 10, 1).getList();
PdfPTable table8 = new PdfPTable(4);
table8.setWidthPercentage(100);//设置表格宽度占用百分比
List<String> headList1=new ArrayList<>();
headList1.add("项目");
headList1.add("2022-12-31");
headList1.add("2021-12-31");
headList1.add("2020-12-31");
PdfPTable table8return = setPdfPTableHead(table8, headList1);
for (int i = 0; i < financialIndexDetailList.size(); i++) {
ProFinancialIndexDetail proFinancialIndexDetail = financialIndexDetailList.get(i);
List<String> headList2=new ArrayList<>();
headList2.add(proFinancialIndexDetail.getName());
headList2.add(proFinancialIndexDetail.getLastYearValue());
headList2.add(proFinancialIndexDetail.getLastTowYearValue());
headList2.add(proFinancialIndexDetail.getLastThreeYearValue());
table8return=setPdfPTableHead(table8return, headList2);
}
document.add(table8return);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("资产负债表:", 0, 1.5f));
ArrayList<String> list82 = new ArrayList<>();
list82.add("51");
list82.add("52");
list82.add("53");
list82.add("54");
list82.add("55");
list82.add("56");
list82.add("57");
list82.add("58");
list82.add("59");
list82.add("60");
List<ProFinancialStatementDetail> financialStatementDetailList = projectDueDiligenceService.selectProFinancialStatementDetailList(list82, flowId, 10, 1).getList();
PdfPTable table82 = new PdfPTable(4);
table82.setWidthPercentage(100);//设置表格宽度占用百分比
PdfPTable table82return = setPdfPTableHead(table82, headList1);
for (int i = 0; i < financialStatementDetailList.size(); i++) {
ProFinancialStatementDetail proFinancialStatementDetail = financialStatementDetailList.get(i);
List<String> headList82=new ArrayList<>();
headList82.add(proFinancialStatementDetail.getName());
headList82.add(proFinancialStatementDetail.getLastYearValue());
headList82.add(proFinancialStatementDetail.getLastTowYearValue());
headList82.add(proFinancialStatementDetail.getLastThreeYearValue());
table82return=setPdfPTableHead(table82return, headList82);
}
document.add(table82return);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("现金流量表:", 0, 1.5f));
ArrayList<String> list83 = new ArrayList<>();
list83.add("136");
list83.add("137");
list83.add("138");
list83.add("139");
list83.add("140");
list83.add("141");
list83.add("142");
list83.add("143");
list83.add("144");
list83.add("145");
List<ProFinancialStatementDetail> financialStatementDetailList83 = projectDueDiligenceService.selectProFinancialStatementDetailList(list83, flowId, 10, 1).getList();
PdfPTable table83 = new PdfPTable(4);
table83.setWidthPercentage(100);//设置表格宽度占用百分比
PdfPTable table83return = setPdfPTableHead(table83, headList1);
for (int i = 0; i < financialStatementDetailList83.size(); i++) {
ProFinancialStatementDetail proFinancialStatementDetail = financialStatementDetailList83.get(i);
List<String> headList83=new ArrayList<>();
headList83.add(proFinancialStatementDetail.getName());
headList83.add(proFinancialStatementDetail.getLastYearValue());
headList83.add(proFinancialStatementDetail.getLastTowYearValue());
headList83.add(proFinancialStatementDetail.getLastThreeYearValue());
table83return=setPdfPTableHead(table83return, headList83);
}
document.add(table83return);
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD);
document.add(HeaderAndFooterEvent.AddParagraph("利润表:", 0, 1.5f));
ArrayList<String> list84 = new ArrayList<>();
list84.add("12");
list83.add("13");
list83.add("14");
list83.add("15");
list83.add("16");
list83.add("17");
list83.add("18");
list83.add("19");
list83.add("20");
list83.add("21");
List<ProFinancialStatementDetail> financialStatementDetailList84 = projectDueDiligenceService.selectProFinancialStatementDetailList(list84, flowId, 10, 1).getList();
PdfPTable table84 = new PdfPTable(4);
table84.setWidthPercentage(100);//设置表格宽度占用百分比
PdfPTable table84return = setPdfPTableHead(table84, headList1);
for (int i = 0; i < financialStatementDetailList84.size(); i++) {
ProFinancialStatementDetail proFinancialStatementDetail = financialStatementDetailList84.get(i);
List<String> headList84=new ArrayList<>();
headList84.add(proFinancialStatementDetail.getName());
headList84.add(proFinancialStatementDetail.getLastYearValue());
headList84.add(proFinancialStatementDetail.getLastTowYearValue());
headList84.add(proFinancialStatementDetail.getLastThreeYearValue());
table84return=setPdfPTableHead(table84return, headList84);
}
document.add(table84return);
document.close();
}
public PdfPTable returnPdfPTable(TreeMap<String,String> treeMap){
PdfPTable table =new PdfPTable(2); //两列
table.setWidthPercentage(100);//设置表格宽度占用百分比
for (Map.Entry<String, String> entry : treeMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
HeaderAndFooterEvent.SetFont(BaseColor.DARK_GRAY, "黑体", 12, Font.BOLD);
PdfPCell cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(key, 0, 1.5f));
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
table.addCell(cell_data);
cell_data = new PdfPCell(HeaderAndFooterEvent.AddParagraph(value, 0, 1.5f));
cell_data.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
cell_data.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
table.addCell(cell_data);
}
return table;
}
public PdfPTable setPdfPTableHead(PdfPTable table,List<String> list){
for (int i = 0; i < list.size(); i++) {
HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 12, Font.NORMAL);
PdfPCell cell_data1 = new PdfPCell(HeaderAndFooterEvent.AddParagraph(list.get(i), 0, 1.5f));
cell_data1.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE); //垂直居中
cell_data1.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);//水平居中
table.addCell(cell_data1);
}
return table;
}
}

@ -0,0 +1,51 @@
package com.sztzjy.fund_investment.controller;
import com.sztzjy.fund_investment.annotation.AnonymousAccess;
import com.sztzjy.fund_investment.entity.EduProjectValuation;
import com.sztzjy.fund_investment.service.ISysProjectValuationService;
import com.sztzjy.fund_investment.util.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
//yz
@RestController
@RequestMapping("/projectValuationController")
@Api(tags = "学生端--项目估值")
public class ProjectValuation {
@Autowired
ISysProjectValuationService projectValuationService;
@GetMapping("getPE")
@ApiOperation("相对估值法-PE市盈率法")
@AnonymousAccess
public ResultEntity<List<EduProjectValuation>> getPE(@ApiParam("流程ID") @RequestParam String flowId) {
List<EduProjectValuation> projectValuationList=projectValuationService.getPE(flowId);
return new ResultEntity(HttpStatus.OK, "相对估值法-PE市盈率法展示成功", projectValuationList);
}
@GetMapping("getPB")
@ApiOperation("相对估值法-PE市盈率法")
@AnonymousAccess
public ResultEntity<List<EduProjectValuation>> getPB(@ApiParam("流程ID") @RequestParam String flowId) {
List<EduProjectValuation> projectValuationList=projectValuationService.getPB(flowId);
return new ResultEntity(HttpStatus.OK, "相对估值法-PB市盈率法展示成功", projectValuationList);
}
@GetMapping("getPS")
@ApiOperation("相对估值法-PE市盈率法")
@AnonymousAccess
public ResultEntity<List<EduProjectValuation>> getPS(@ApiParam("流程ID") @RequestParam String flowId) {
List<EduProjectValuation> projectValuationList=projectValuationService.getPS(flowId);
return new ResultEntity(HttpStatus.OK, "相对估值法-PS市盈率法展示成功", projectValuationList);
}
}

@ -0,0 +1,31 @@
package com.sztzjy.fund_investment.entity;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @author xcj
* edu_company
*/
public class EduCompany {
@ApiModelProperty("公司信息id")
private String id;
@ApiModelProperty("公司名")
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
}

@ -0,0 +1,339 @@
package com.sztzjy.fund_investment.entity;
import java.util.ArrayList;
import java.util.List;
public class EduCompanyExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public EduCompanyExample() {
oredCriteria = new ArrayList<>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("id like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("id not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -0,0 +1,198 @@
package com.sztzjy.fund_investment.entity;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @author xcj
* edu_project_valuation
*/
public class EduProjectValuation {
@ApiModelProperty("项目估值id")
private String id;
@ApiModelProperty("可比公司名称")
private String companyid;
@ApiModelProperty("选取公司id")
private String projectPoolId;
@ApiModelProperty("每股市价(可比公司)")
private BigDecimal marketPrice;
@ApiModelProperty("每股收益(可比公司)")
private BigDecimal earnings;
@ApiModelProperty("每股收益(选取公司)")
private BigDecimal earnings1;
@ApiModelProperty("增长率")
private BigDecimal growthRate;
@ApiModelProperty("增长率")
private BigDecimal growthRate1;
@ApiModelProperty("每股净资产")
private BigDecimal netWorth;
@ApiModelProperty("每股净资产")
private BigDecimal netWorth1;
@ApiModelProperty("权益净利率")
private BigDecimal netInterest;
@ApiModelProperty("权益净利率")
private BigDecimal netInterest1;
@ApiModelProperty("每股营业收入")
private BigDecimal operatingIncome;
@ApiModelProperty("每股营业收入")
private BigDecimal operatingIncome1;
@ApiModelProperty("营业净利率")
private BigDecimal netOperatinginterestRate;
@ApiModelProperty("营业净利率")
private BigDecimal netOperatinginterestRate1;
@ApiModelProperty("PE-1 PB-2 PS-3")
private Integer methodId;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getCompanyid() {
return companyid;
}
public void setCompanyid(String companyid) {
this.companyid = companyid == null ? null : companyid.trim();
}
public String getProjectPoolId() {
return projectPoolId;
}
public void setProjectPoolId(String projectPoolId) {
this.projectPoolId = projectPoolId == null ? null : projectPoolId.trim();
}
public BigDecimal getMarketPrice() {
return marketPrice;
}
public void setMarketPrice(BigDecimal marketPrice) {
this.marketPrice = marketPrice;
}
public BigDecimal getEarnings() {
return earnings;
}
public void setEarnings(BigDecimal earnings) {
this.earnings = earnings;
}
public BigDecimal getEarnings1() {
return earnings1;
}
public void setEarnings1(BigDecimal earnings1) {
this.earnings1 = earnings1;
}
public BigDecimal getGrowthRate() {
return growthRate;
}
public void setGrowthRate(BigDecimal growthRate) {
this.growthRate = growthRate;
}
public BigDecimal getGrowthRate1() {
return growthRate1;
}
public void setGrowthRate1(BigDecimal growthRate1) {
this.growthRate1 = growthRate1;
}
public BigDecimal getNetWorth() {
return netWorth;
}
public void setNetWorth(BigDecimal netWorth) {
this.netWorth = netWorth;
}
public BigDecimal getNetWorth1() {
return netWorth1;
}
public void setNetWorth1(BigDecimal netWorth1) {
this.netWorth1 = netWorth1;
}
public BigDecimal getNetInterest() {
return netInterest;
}
public void setNetInterest(BigDecimal netInterest) {
this.netInterest = netInterest;
}
public BigDecimal getNetInterest1() {
return netInterest1;
}
public void setNetInterest1(BigDecimal netInterest1) {
this.netInterest1 = netInterest1;
}
public BigDecimal getOperatingIncome() {
return operatingIncome;
}
public void setOperatingIncome(BigDecimal operatingIncome) {
this.operatingIncome = operatingIncome;
}
public BigDecimal getOperatingIncome1() {
return operatingIncome1;
}
public void setOperatingIncome1(BigDecimal operatingIncome1) {
this.operatingIncome1 = operatingIncome1;
}
public BigDecimal getNetOperatinginterestRate() {
return netOperatinginterestRate;
}
public void setNetOperatinginterestRate(BigDecimal netOperatinginterestRate) {
this.netOperatinginterestRate = netOperatinginterestRate;
}
public BigDecimal getNetOperatinginterestRate1() {
return netOperatinginterestRate1;
}
public void setNetOperatinginterestRate1(BigDecimal netOperatinginterestRate1) {
this.netOperatinginterestRate1 = netOperatinginterestRate1;
}
public Integer getMethodId() {
return methodId;
}
public void setMethodId(Integer methodId) {
this.methodId = methodId;
}
}

@ -0,0 +1,218 @@
package com.sztzjy.fund_investment.entity;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @author xcj
* pro_business_info
*/
public class ProBusinessInfo {
@ApiModelProperty("公司背景详情Id")
private String id;
@ApiModelProperty("项目池ID")
private String projectPoolId;
@ApiModelProperty("注册资本")
private String registeredCapital;
@ApiModelProperty("经营状态")
private String operatingState;
@ApiModelProperty("统一社会信用代码")
private String creditCode;
@ApiModelProperty("纳税人识别号")
private String identificationNumber;
@ApiModelProperty("营业期限")
private String businessTerm;
@ApiModelProperty("实缴资本")
private String paidinCapital;
@ApiModelProperty("参保人数")
private String insuranceNum;
@ApiModelProperty("成立日期")
private String createDate;
@ApiModelProperty("工商注册号")
private String registrationNum;
@ApiModelProperty("组织结构代码")
private String orgaStruCode;
@ApiModelProperty("公司类型")
private String companyType;
@ApiModelProperty("行业")
private String industry;
@ApiModelProperty("核准日期")
private String approvalDate;
@ApiModelProperty("人员规模")
private String staffSize;
@ApiModelProperty("登记机关")
private String registrar;
@ApiModelProperty("注册地址")
private String registeredAddress;
@ApiModelProperty("经营范围")
private String businessScope;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getProjectPoolId() {
return projectPoolId;
}
public void setProjectPoolId(String projectPoolId) {
this.projectPoolId = projectPoolId == null ? null : projectPoolId.trim();
}
public String getRegisteredCapital() {
return registeredCapital;
}
public void setRegisteredCapital(String registeredCapital) {
this.registeredCapital = registeredCapital == null ? null : registeredCapital.trim();
}
public String getOperatingState() {
return operatingState;
}
public void setOperatingState(String operatingState) {
this.operatingState = operatingState == null ? null : operatingState.trim();
}
public String getCreditCode() {
return creditCode;
}
public void setCreditCode(String creditCode) {
this.creditCode = creditCode == null ? null : creditCode.trim();
}
public String getIdentificationNumber() {
return identificationNumber;
}
public void setIdentificationNumber(String identificationNumber) {
this.identificationNumber = identificationNumber == null ? null : identificationNumber.trim();
}
public String getBusinessTerm() {
return businessTerm;
}
public void setBusinessTerm(String businessTerm) {
this.businessTerm = businessTerm == null ? null : businessTerm.trim();
}
public String getPaidinCapital() {
return paidinCapital;
}
public void setPaidinCapital(String paidinCapital) {
this.paidinCapital = paidinCapital == null ? null : paidinCapital.trim();
}
public String getInsuranceNum() {
return insuranceNum;
}
public void setInsuranceNum(String insuranceNum) {
this.insuranceNum = insuranceNum == null ? null : insuranceNum.trim();
}
public String getCreateDate() {
return createDate;
}
public void setCreateDate(String createDate) {
this.createDate = createDate == null ? null : createDate.trim();
}
public String getRegistrationNum() {
return registrationNum;
}
public void setRegistrationNum(String registrationNum) {
this.registrationNum = registrationNum == null ? null : registrationNum.trim();
}
public String getOrgaStruCode() {
return orgaStruCode;
}
public void setOrgaStruCode(String orgaStruCode) {
this.orgaStruCode = orgaStruCode == null ? null : orgaStruCode.trim();
}
public String getCompanyType() {
return companyType;
}
public void setCompanyType(String companyType) {
this.companyType = companyType == null ? null : companyType.trim();
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry == null ? null : industry.trim();
}
public String getApprovalDate() {
return approvalDate;
}
public void setApprovalDate(String approvalDate) {
this.approvalDate = approvalDate == null ? null : approvalDate.trim();
}
public String getStaffSize() {
return staffSize;
}
public void setStaffSize(String staffSize) {
this.staffSize = staffSize == null ? null : staffSize.trim();
}
public String getRegistrar() {
return registrar;
}
public void setRegistrar(String registrar) {
this.registrar = registrar == null ? null : registrar.trim();
}
public String getRegisteredAddress() {
return registeredAddress;
}
public void setRegisteredAddress(String registeredAddress) {
this.registeredAddress = registeredAddress == null ? null : registeredAddress.trim();
}
public String getBusinessScope() {
return businessScope;
}
public void setBusinessScope(String businessScope) {
this.businessScope = businessScope == null ? null : businessScope.trim();
}
}

@ -1,11 +1,14 @@
package com.sztzjy.fund_investment.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* @author xcj
* pro_financial_index_detail
*/
@Data
public class ProFinancialIndexDetail {
@ApiModelProperty("财务指标选取详情ID")
private String id;

@ -0,0 +1,93 @@
package com.sztzjy.fund_investment.entity.treeSelect;
import com.sztzjy.fund_investment.entity.ProFinancialIndex;
import com.sztzjy.fund_investment.entity.ProFinancialStatement;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class TreeSelect implements Serializable {
private static final long serialVersionUID = 1L;
/** 节点ID */
private String id;
/** 节点名称 */
private String name;
private String parentId;
/** 子节点 */
private List<TreeSelect> children;
public TreeSelect(ProFinancialIndex financialIndex) {
this.id=financialIndex.getId();
this.name=financialIndex.getName();
this.parentId=financialIndex.getParentId();
}
public TreeSelect(ProFinancialStatement financialStatement) {
this.id=financialStatement.getId();
this.name=financialStatement.getName();
this.parentId=financialStatement.getParentId();
}
public static List<TreeSelect> buildTree(List<TreeSelect> dataList) {
List<TreeSelect> treeList = new ArrayList<>();
for (TreeSelect data : dataList) {
if ("0".equals(data.parentId)) {
treeList.add(findChildren(data, dataList));
}
}
return treeList;
}
private static TreeSelect findChildren(TreeSelect parent, List<TreeSelect> dataList) {
for (TreeSelect data : dataList) {
if (parent.id.equals(data.parentId)) {
if (parent.children == null) {
parent.children = new ArrayList<>();
}
parent.children.add(findChildren(data, dataList));
}
}
return parent;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public List<TreeSelect> getChildren() {
return children;
}
public void setChildren(List<TreeSelect> children) {
this.children = children;
}
}

@ -0,0 +1,30 @@
package com.sztzjy.fund_investment.mapper;
import com.sztzjy.fund_investment.entity.EduCompany;
import com.sztzjy.fund_investment.entity.EduCompanyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface EduCompanyMapper {
long countByExample(EduCompanyExample example);
int deleteByExample(EduCompanyExample example);
int deleteByPrimaryKey(String id);
int insert(EduCompany record);
int insertSelective(EduCompany record);
List<EduCompany> selectByExample(EduCompanyExample example);
EduCompany selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") EduCompany record, @Param("example") EduCompanyExample example);
int updateByExample(@Param("record") EduCompany record, @Param("example") EduCompanyExample example);
int updateByPrimaryKeySelective(EduCompany record);
int updateByPrimaryKey(EduCompany record);
}

@ -0,0 +1,32 @@
package com.sztzjy.fund_investment.mapper;
import com.sztzjy.fund_investment.entity.EduProjectValuation;
import com.sztzjy.fund_investment.entity.EduProjectValuationExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface EduProjectValuationMapper {
long countByExample(EduProjectValuationExample example);
int deleteByExample(EduProjectValuationExample example);
int deleteByPrimaryKey(String id);
int insert(EduProjectValuation record);
int insertSelective(EduProjectValuation record);
List<EduProjectValuation> selectByExample(EduProjectValuationExample example);
EduProjectValuation selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") EduProjectValuation record, @Param("example") EduProjectValuationExample example);
int updateByExample(@Param("record") EduProjectValuation record, @Param("example") EduProjectValuationExample example);
int updateByPrimaryKeySelective(EduProjectValuation record);
int updateByPrimaryKey(EduProjectValuation record);
}

@ -0,0 +1,32 @@
package com.sztzjy.fund_investment.mapper;
import com.sztzjy.fund_investment.entity.ProBusinessInfo;
import com.sztzjy.fund_investment.entity.ProBusinessInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ProBusinessInfoMapper {
long countByExample(ProBusinessInfoExample example);
int deleteByExample(ProBusinessInfoExample example);
int deleteByPrimaryKey(String id);
int insert(ProBusinessInfo record);
int insertSelective(ProBusinessInfo record);
List<ProBusinessInfo> selectByExample(ProBusinessInfoExample example);
ProBusinessInfo selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") ProBusinessInfo record, @Param("example") ProBusinessInfoExample example);
int updateByExample(@Param("record") ProBusinessInfo record, @Param("example") ProBusinessInfoExample example);
int updateByPrimaryKeySelective(ProBusinessInfo record);
int updateByPrimaryKey(ProBusinessInfo record);
}

@ -3,8 +3,10 @@ package com.sztzjy.fund_investment.mapper;
import com.sztzjy.fund_investment.entity.ProFinancialIndexDetail;
import com.sztzjy.fund_investment.entity.ProFinancialIndexDetailExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ProFinancialIndexDetailMapper {
long countByExample(ProFinancialIndexDetailExample example);
@ -27,4 +29,6 @@ public interface ProFinancialIndexDetailMapper {
int updateByPrimaryKeySelective(ProFinancialIndexDetail record);
int updateByPrimaryKey(ProFinancialIndexDetail record);
List<ProFinancialIndexDetail> selectByProFinancialIndexIdListAndProjectPoolId(List<String> proFinancialIndexIdList, String projectPoolId);
}

@ -3,8 +3,12 @@ package com.sztzjy.fund_investment.mapper;
import com.sztzjy.fund_investment.entity.ProFinancialIndex;
import com.sztzjy.fund_investment.entity.ProFinancialIndexExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface ProFinancialIndexMapper {
long countByExample(ProFinancialIndexExample example);
@ -27,4 +31,6 @@ public interface ProFinancialIndexMapper {
int updateByPrimaryKeySelective(ProFinancialIndex record);
int updateByPrimaryKey(ProFinancialIndex record);
List<ProFinancialIndex> selectAll();
}

@ -3,8 +3,10 @@ package com.sztzjy.fund_investment.mapper;
import com.sztzjy.fund_investment.entity.ProFinancialStatementDetail;
import com.sztzjy.fund_investment.entity.ProFinancialStatementDetailExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ProFinancialStatementDetailMapper {
long countByExample(ProFinancialStatementDetailExample example);
@ -27,4 +29,6 @@ public interface ProFinancialStatementDetailMapper {
int updateByPrimaryKeySelective(ProFinancialStatementDetail record);
int updateByPrimaryKey(ProFinancialStatementDetail record);
List<ProFinancialStatementDetail> selectByproFinancialStatementIdListAndProjectPoolId(List<String> proFinancialStatementIdList, String projectPoolId);
}

@ -3,8 +3,10 @@ package com.sztzjy.fund_investment.mapper;
import com.sztzjy.fund_investment.entity.ProFinancialStatement;
import com.sztzjy.fund_investment.entity.ProFinancialStatementExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ProFinancialStatementMapper {
long countByExample(ProFinancialStatementExample example);
@ -27,4 +29,6 @@ public interface ProFinancialStatementMapper {
int updateByPrimaryKeySelective(ProFinancialStatement record);
int updateByPrimaryKey(ProFinancialStatement record);
List<ProFinancialStatement> selectAll();
}

@ -1,6 +1,8 @@
package com.sztzjy.fund_investment.service;
import com.github.pagehelper.PageInfo;
import com.sztzjy.fund_investment.entity.*;
import com.sztzjy.fund_investment.entity.treeSelect.TreeSelect;
import java.util.List;
@ -32,4 +34,14 @@ public interface ISysProjectDueDiligenceService {
List<ProAdminiPenalty> getProAdminiPenaltyListByFlowId(String flowId);
void updateServiceDueDiligence(FoundProject foundProject);
List<ProBusinessInfo> getBusinessInfoList(String flowId);
List<TreeSelect> getProFinancialIndexSelectTree();
List<TreeSelect> getProFinancialStatementSelectTree();
PageInfo<ProFinancialIndexDetail> selectProFinancialIndexDetailList(List<String> proFinancialIndexIdList, String flowId, Integer size, Integer index);
PageInfo<ProFinancialStatementDetail> selectProFinancialStatementDetailList(List<String> proFinancialStatementIdList, String flowId,Integer size,Integer index);
}

@ -0,0 +1,11 @@
package com.sztzjy.fund_investment.service;
import com.sztzjy.fund_investment.entity.EduProjectValuation;
import java.util.List;
public interface ISysProjectValuationService {
List<EduProjectValuation> getPE(String flowId);
List<EduProjectValuation> getPB(String flowId);
List<EduProjectValuation> getPS(String flowId);
}

@ -1,12 +1,16 @@
package com.sztzjy.fund_investment.service.serviceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sztzjy.fund_investment.entity.*;
import com.sztzjy.fund_investment.entity.treeSelect.TreeSelect;
import com.sztzjy.fund_investment.mapper.*;
import com.sztzjy.fund_investment.service.ISysFoundProjectService;
import com.sztzjy.fund_investment.service.ISysProjectDueDiligenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
@ -41,7 +45,16 @@ public class SysProjectDueDiligenceServiceImpl implements ISysProjectDueDiligenc
ProAdminiPenaltyMapper proAdminiPenaltyMapper;
@Autowired
FoundProjectMapper foundProjectMapper;
@Autowired
ProBusinessInfoMapper proBusinessInfoMapper;
@Autowired
ProFinancialIndexMapper proFinancialIndexMapper;
@Autowired
ProFinancialStatementMapper proFinancialStatementMapper;
@Autowired
ProFinancialIndexDetailMapper proFinancialIndexDetailMapper;
@Autowired
ProFinancialStatementDetailMapper proFinancialStatementDetailMapper;
//公司背景-公司信息
//先根据flowId查询项目池ID 根据项目池ID获取对应的数据
@ -179,4 +192,60 @@ public class SysProjectDueDiligenceServiceImpl implements ISysProjectDueDiligenc
public void updateServiceDueDiligence(FoundProject foundProject) {
foundProjectMapper.updateByPrimaryKeySelective(foundProject);
}
@Override
public List<ProBusinessInfo> getBusinessInfoList(String flowId) {
String projectPoolId = foundProjectService.selectProjectPoolIdByFlowId(flowId);
ProBusinessInfoExample example = new ProBusinessInfoExample();
ProBusinessInfoExample.Criteria criteria = example.createCriteria();
criteria.andProjectPoolIdEqualTo(projectPoolId);
List<ProBusinessInfo> list = proBusinessInfoMapper.selectByExample(example);
return list;
}
//返回财务指标选取树
@Override
public List<TreeSelect> getProFinancialIndexSelectTree() {
List<ProFinancialIndex> financialIndexList=proFinancialIndexMapper.selectAll();
List<TreeSelect> treeSelectList=new ArrayList<>();
for (int i = 0; i < financialIndexList.size(); i++) {
treeSelectList.add(new TreeSelect(financialIndexList.get(i)));
}
List<TreeSelect> treeSelects = TreeSelect.buildTree(treeSelectList);
return treeSelects;
}
//返回财务报表选取树
@Override
public List<TreeSelect> getProFinancialStatementSelectTree() {
List<ProFinancialStatement> financialStatementList=proFinancialStatementMapper.selectAll();
List<TreeSelect> treeSelectList=new ArrayList<>();
for (int i = 0; i < financialStatementList.size(); i++) {
treeSelectList.add(new TreeSelect(financialStatementList.get(i)));
}
List<TreeSelect> treeSelects = TreeSelect.buildTree(treeSelectList);
return treeSelects;
}
//财务指标详情查询
//先根据flowid查询项目池id
@Override
public PageInfo<ProFinancialIndexDetail> selectProFinancialIndexDetailList(List<String> proFinancialIndexIdList,String flowId,Integer size,Integer index) {
PageHelper.startPage(index, size);
String projectPoolId = foundProjectService.selectProjectPoolIdByFlowId(flowId);
List<ProFinancialIndexDetail> detailList = proFinancialIndexDetailMapper.selectByProFinancialIndexIdListAndProjectPoolId(proFinancialIndexIdList, projectPoolId);
PageInfo<ProFinancialIndexDetail> pageInfo = new PageInfo<>(detailList);
return pageInfo;
}
@Override
public PageInfo<ProFinancialStatementDetail> selectProFinancialStatementDetailList(List<String> proFinancialStatementIdList, String flowId,Integer size,Integer index) {
String projectPoolId = foundProjectService.selectProjectPoolIdByFlowId(flowId);
List<ProFinancialStatementDetail> detailList=proFinancialStatementDetailMapper.selectByproFinancialStatementIdListAndProjectPoolId(proFinancialStatementIdList,projectPoolId);
PageInfo<ProFinancialStatementDetail> pageInfo = new PageInfo<>(detailList);
return pageInfo;
}
}

@ -0,0 +1,49 @@
package com.sztzjy.fund_investment.service.serviceImpl;
import com.sztzjy.fund_investment.entity.EduProjectValuation;
import com.sztzjy.fund_investment.entity.EduProjectValuationExample;
import com.sztzjy.fund_investment.mapper.EduProjectValuationMapper;
import com.sztzjy.fund_investment.mapper.FoundProjectMapper;
import com.sztzjy.fund_investment.service.ISysProjectValuationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class SysProjectValuationServiceImpl implements ISysProjectValuationService {
@Autowired
FoundProjectMapper foundProjectMapper;
@Autowired
EduProjectValuationMapper projectValuationMapper;
@Override
public List<EduProjectValuation> getPE(String flowId) {
String projectPoolId = foundProjectMapper.selectByPrimaryKey(flowId).getProjectPoolId();
EduProjectValuationExample example = new EduProjectValuationExample();
EduProjectValuationExample.Criteria criteria = example.createCriteria();
criteria.andProjectPoolIdEqualTo(projectPoolId).andMethodIdEqualTo(1);
List<EduProjectValuation> projectValuationList = projectValuationMapper.selectByExample(example);
return projectValuationList;
}
@Override
public List<EduProjectValuation> getPB(String flowId) {
String projectPoolId = foundProjectMapper.selectByPrimaryKey(flowId).getProjectPoolId();
EduProjectValuationExample example = new EduProjectValuationExample();
EduProjectValuationExample.Criteria criteria = example.createCriteria();
criteria.andProjectPoolIdEqualTo(projectPoolId).andMethodIdEqualTo(2);
List<EduProjectValuation> projectValuationList = projectValuationMapper.selectByExample(example);
return projectValuationList;
}
@Override
public List<EduProjectValuation> getPS(String flowId) {
String projectPoolId = foundProjectMapper.selectByPrimaryKey(flowId).getProjectPoolId();
EduProjectValuationExample example = new EduProjectValuationExample();
EduProjectValuationExample.Criteria criteria = example.createCriteria();
criteria.andProjectPoolIdEqualTo(projectPoolId).andMethodIdEqualTo(3);
List<EduProjectValuation> projectValuationList = projectValuationMapper.selectByExample(example);
return projectValuationList;
}
}

@ -0,0 +1,193 @@
package com.sztzjy.fund_investment.util.pdfUtils;
import com.itextpdf.text.*;
import com.itextpdf.text.Font;
import com.itextpdf.text.Image;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.*;
import lombok.SneakyThrows;
import org.springframework.stereotype.Component;
import java.awt.*;
@Component
public class HeaderAndFooterEvent extends PdfPageEventHelper {
public static PdfTemplate tpl = null;
public static boolean PAGE_NUMBER = false;
public static Rectangle rect = PageSize.A4;
private static Font font;
public static String HeaderFooterFontName = "黑体";
public static int HeaderFooterFontSize = 10;
public static Color HeaderFooterFontColor = Color.BLACK;
public static String HeaderLeft;
public static String HeaderRight;
public static String FooterLeft;
public static String FooterRight;
public static void SetPageSize(String type) {
switch (type.trim()) {
case "A4":
rect = PageSize.A4;
break;
case "A8":
rect = PageSize.A8;
break;
}
}
@SneakyThrows
public static void SetFont(BaseColor color, String fontName, float size, int style) {
BaseFont baseFont;
String FONT_PATH="C:/Windows/Fonts/";
switch (fontName) {
case "黑体":
// baseFont = BaseFont.createFont("SIMHEI.TTF", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
baseFont = BaseFont.createFont(FONT_PATH+"simhei.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
break;
case "华文中宋":
// baseFont = BaseFont.createFont("STZHONGS.TTF", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
break;
case "宋体":
// baseFont = BaseFont.createFont("SIMYOU.TTF", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
break;
default:
// baseFont = BaseFont.createFont("SIMYOU.TTF", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
break;
}
font = new Font(baseFont, size, style,color);
}
@Override
public void onEndPage(PdfWriter writer, Document document) {
if (PAGE_NUMBER) {
Font HeaderFooterFont = new Font(font.getBaseFont(), HeaderFooterFontSize, Font.NORMAL);
Phrase header_left = new Phrase(HeaderLeft, HeaderFooterFont);
Phrase header_right = new Phrase(HeaderRight, HeaderFooterFont);
Phrase footer_left = new Phrase(FooterLeft, HeaderFooterFont);
Phrase footer_center = new Phrase("第" + (writer.getPageNumber()) + "页/共 页", HeaderFooterFont);
Phrase footer_right = new Phrase(FooterRight, HeaderFooterFont);
PdfContentByte cb = writer.getDirectContent();
cb.addTemplate(tpl, document.right() - 290 + document.leftMargin(), document.bottom() - 15);
ColumnText.showTextAligned(cb, Element.ALIGN_CENTER, header_right,
document.right() - 50 + document.leftMargin(), document.top() + 15, 0);
ColumnText.showTextAligned(cb, Element.ALIGN_CENTER, header_left,
document.right() - 500 + document.leftMargin(), document.top() + 15, 0);
ColumnText.showTextAligned(cb, Element.ALIGN_CENTER, footer_left,
document.right() - 535 + document.leftMargin(), document.bottom() - 15, 0);
ColumnText.showTextAligned(cb, Element.ALIGN_CENTER, footer_center,
document.right() - 300 + document.leftMargin(), document.bottom() - 15, 0);
ColumnText.showTextAligned(cb, Element.ALIGN_CENTER, footer_right,
document.right() - 80 + document.leftMargin(), document.bottom() - 15, 0);
}
}
@Override
public void onStartPage(PdfWriter writer, Document document) {
if (PAGE_NUMBER) {
writer.setPageCount(writer.getPageNumber());
}
}
@Override
public void onCloseDocument(PdfWriter writer, Document document) {
tpl.beginText();
tpl.setFontAndSize(font.getBaseFont(), HeaderFooterFontSize);
tpl.showText(String.valueOf(writer.getPageNumber()));
tpl.endText();
tpl.closePath();
}
public static Paragraph AddParagraph(String content, int Alignment, float SpacingAfter, float SpacingBefore, float MultipliedLeading) {
Paragraph pra = new Paragraph(content, font);
pra.setAlignment(Alignment);
pra.setSpacingAfter(SpacingAfter);
pra.setSpacingBefore(SpacingBefore);
// pra.setMultipliedLeading(MultipliedLeading);
return pra;
}
public static Paragraph AddParagraph(String content, int Alignment, float MultipliedLeading) {
Paragraph pra = new Paragraph(content, font);
pra.setAlignment(Alignment);
// pra.setMultipliedLeading(MultipliedLeading);
return pra;
}
public static Paragraph AddParagraph(String content, int Alignment) {
Paragraph pra = new Paragraph(content, font);
pra.setAlignment(Alignment);
return pra;
}
public static Paragraph AddParagraph(String content) {
Paragraph pra = new Paragraph(content, font);
return pra;
}
public static PdfPCell AddCell(String content, int horizontalAlignment, int verticalAlignment, float borderWidth) {
PdfPCell cell = new PdfPCell(new Phrase(content, font));
cell.setHorizontalAlignment(horizontalAlignment);
cell.setVerticalAlignment(verticalAlignment);
cell.setBorderWidth(borderWidth);
return cell;
}
public static PdfPCell AddCell(String content, int horizontalAlignment, int verticalAlignment) {
PdfPCell cell = new PdfPCell(new Phrase(content, font));
cell.setHorizontalAlignment(horizontalAlignment);
cell.setVerticalAlignment(verticalAlignment);
return cell;
}
public static PdfPCell AddCell(String content, int horizontalAlignment) {
PdfPCell cell = new PdfPCell(new Phrase(content, font));
cell.setHorizontalAlignment(horizontalAlignment);
return cell;
}
public static PdfPCell AddCell(String content) {
PdfPCell cell = new PdfPCell(new Phrase(content, font));
return cell;
}
public static PdfPCell AddCell(Image image, int horizontalAlignment, int verticalAlignment, float borderWidth) {
PdfPCell cell = new PdfPCell(image);
cell.setHorizontalAlignment(horizontalAlignment);
cell.setVerticalAlignment(verticalAlignment);
cell.setBorderWidth(borderWidth);
return cell;
}
public static PdfPCell AddCell(Image image, int horizontalAlignment, int verticalAlignment) {
PdfPCell cell = new PdfPCell(image);
cell.setHorizontalAlignment(horizontalAlignment);
cell.setVerticalAlignment(verticalAlignment);
return cell;
}
public static PdfPCell AddCell(Image image, int horizontalAlignment) {
PdfPCell cell = new PdfPCell(image);
cell.setHorizontalAlignment(horizontalAlignment);
return cell;
}
public static PdfPCell AddCell(Image image) {
PdfPCell cell = new PdfPCell(image);
return cell;
}
}

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.fund_investment.mapper.EduCompanyMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.EduCompany">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name
</sql>
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.EduCompanyExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from edu_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from edu_company
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from edu_company
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.EduCompanyExample">
delete from edu_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.EduCompany">
insert into edu_company (id, name)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.EduCompany">
insert into edu_company
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.EduCompanyExample" resultType="java.lang.Long">
select count(*) from edu_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update edu_company
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update edu_company
set id = #{record.id,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.EduCompany">
update edu_company
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.EduCompany">
update edu_company
set name = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

@ -0,0 +1,401 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.fund_investment.mapper.EduProjectValuationMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.EduProjectValuation">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="companyId" jdbcType="VARCHAR" property="companyid" />
<result column="project_pool_id" jdbcType="VARCHAR" property="projectPoolId" />
<result column="market_price" jdbcType="DECIMAL" property="marketPrice" />
<result column="earnings" jdbcType="DECIMAL" property="earnings" />
<result column="earnings1" jdbcType="DECIMAL" property="earnings1" />
<result column="growth_rate" jdbcType="DECIMAL" property="growthRate" />
<result column="growth_rate1" jdbcType="DECIMAL" property="growthRate1" />
<result column="net_worth" jdbcType="DECIMAL" property="netWorth" />
<result column="net_worth1" jdbcType="DECIMAL" property="netWorth1" />
<result column="net_interest" jdbcType="DECIMAL" property="netInterest" />
<result column="net_interest1" jdbcType="DECIMAL" property="netInterest1" />
<result column="operating_income" jdbcType="DECIMAL" property="operatingIncome" />
<result column="operating_income1" jdbcType="DECIMAL" property="operatingIncome1" />
<result column="net_operatinginterest_rate" jdbcType="DECIMAL" property="netOperatinginterestRate" />
<result column="net_operatinginterest_rate1" jdbcType="DECIMAL" property="netOperatinginterestRate1" />
<result column="method_id" jdbcType="INTEGER" property="methodId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, companyId, project_pool_id, market_price, earnings, earnings1, growth_rate, growth_rate1,
net_worth, net_worth1, net_interest, net_interest1, operating_income, operating_income1,
net_operatinginterest_rate, net_operatinginterest_rate1, method_id
</sql>
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from edu_project_valuation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from edu_project_valuation
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from edu_project_valuation
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationExample">
delete from edu_project_valuation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuation">
insert into edu_project_valuation (id, companyId, project_pool_id,
market_price, earnings, earnings1,
growth_rate, growth_rate1, net_worth,
net_worth1, net_interest, net_interest1,
operating_income, operating_income1, net_operatinginterest_rate,
net_operatinginterest_rate1, method_id)
values (#{id,jdbcType=VARCHAR}, #{companyid,jdbcType=VARCHAR}, #{projectPoolId,jdbcType=VARCHAR},
#{marketPrice,jdbcType=DECIMAL}, #{earnings,jdbcType=DECIMAL}, #{earnings1,jdbcType=DECIMAL},
#{growthRate,jdbcType=DECIMAL}, #{growthRate1,jdbcType=DECIMAL}, #{netWorth,jdbcType=DECIMAL},
#{netWorth1,jdbcType=DECIMAL}, #{netInterest,jdbcType=DECIMAL}, #{netInterest1,jdbcType=DECIMAL},
#{operatingIncome,jdbcType=DECIMAL}, #{operatingIncome1,jdbcType=DECIMAL}, #{netOperatinginterestRate,jdbcType=DECIMAL},
#{netOperatinginterestRate1,jdbcType=DECIMAL}, #{methodId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuation">
insert into edu_project_valuation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="companyid != null">
companyId,
</if>
<if test="projectPoolId != null">
project_pool_id,
</if>
<if test="marketPrice != null">
market_price,
</if>
<if test="earnings != null">
earnings,
</if>
<if test="earnings1 != null">
earnings1,
</if>
<if test="growthRate != null">
growth_rate,
</if>
<if test="growthRate1 != null">
growth_rate1,
</if>
<if test="netWorth != null">
net_worth,
</if>
<if test="netWorth1 != null">
net_worth1,
</if>
<if test="netInterest != null">
net_interest,
</if>
<if test="netInterest1 != null">
net_interest1,
</if>
<if test="operatingIncome != null">
operating_income,
</if>
<if test="operatingIncome1 != null">
operating_income1,
</if>
<if test="netOperatinginterestRate != null">
net_operatinginterest_rate,
</if>
<if test="netOperatinginterestRate1 != null">
net_operatinginterest_rate1,
</if>
<if test="methodId != null">
method_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="companyid != null">
#{companyid,jdbcType=VARCHAR},
</if>
<if test="projectPoolId != null">
#{projectPoolId,jdbcType=VARCHAR},
</if>
<if test="marketPrice != null">
#{marketPrice,jdbcType=DECIMAL},
</if>
<if test="earnings != null">
#{earnings,jdbcType=DECIMAL},
</if>
<if test="earnings1 != null">
#{earnings1,jdbcType=DECIMAL},
</if>
<if test="growthRate != null">
#{growthRate,jdbcType=DECIMAL},
</if>
<if test="growthRate1 != null">
#{growthRate1,jdbcType=DECIMAL},
</if>
<if test="netWorth != null">
#{netWorth,jdbcType=DECIMAL},
</if>
<if test="netWorth1 != null">
#{netWorth1,jdbcType=DECIMAL},
</if>
<if test="netInterest != null">
#{netInterest,jdbcType=DECIMAL},
</if>
<if test="netInterest1 != null">
#{netInterest1,jdbcType=DECIMAL},
</if>
<if test="operatingIncome != null">
#{operatingIncome,jdbcType=DECIMAL},
</if>
<if test="operatingIncome1 != null">
#{operatingIncome1,jdbcType=DECIMAL},
</if>
<if test="netOperatinginterestRate != null">
#{netOperatinginterestRate,jdbcType=DECIMAL},
</if>
<if test="netOperatinginterestRate1 != null">
#{netOperatinginterestRate1,jdbcType=DECIMAL},
</if>
<if test="methodId != null">
#{methodId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuationExample" resultType="java.lang.Long">
select count(*) from edu_project_valuation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update edu_project_valuation
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.companyid != null">
companyId = #{record.companyid,jdbcType=VARCHAR},
</if>
<if test="record.projectPoolId != null">
project_pool_id = #{record.projectPoolId,jdbcType=VARCHAR},
</if>
<if test="record.marketPrice != null">
market_price = #{record.marketPrice,jdbcType=DECIMAL},
</if>
<if test="record.earnings != null">
earnings = #{record.earnings,jdbcType=DECIMAL},
</if>
<if test="record.earnings1 != null">
earnings1 = #{record.earnings1,jdbcType=DECIMAL},
</if>
<if test="record.growthRate != null">
growth_rate = #{record.growthRate,jdbcType=DECIMAL},
</if>
<if test="record.growthRate1 != null">
growth_rate1 = #{record.growthRate1,jdbcType=DECIMAL},
</if>
<if test="record.netWorth != null">
net_worth = #{record.netWorth,jdbcType=DECIMAL},
</if>
<if test="record.netWorth1 != null">
net_worth1 = #{record.netWorth1,jdbcType=DECIMAL},
</if>
<if test="record.netInterest != null">
net_interest = #{record.netInterest,jdbcType=DECIMAL},
</if>
<if test="record.netInterest1 != null">
net_interest1 = #{record.netInterest1,jdbcType=DECIMAL},
</if>
<if test="record.operatingIncome != null">
operating_income = #{record.operatingIncome,jdbcType=DECIMAL},
</if>
<if test="record.operatingIncome1 != null">
operating_income1 = #{record.operatingIncome1,jdbcType=DECIMAL},
</if>
<if test="record.netOperatinginterestRate != null">
net_operatinginterest_rate = #{record.netOperatinginterestRate,jdbcType=DECIMAL},
</if>
<if test="record.netOperatinginterestRate1 != null">
net_operatinginterest_rate1 = #{record.netOperatinginterestRate1,jdbcType=DECIMAL},
</if>
<if test="record.methodId != null">
method_id = #{record.methodId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update edu_project_valuation
set id = #{record.id,jdbcType=VARCHAR},
companyId = #{record.companyid,jdbcType=VARCHAR},
project_pool_id = #{record.projectPoolId,jdbcType=VARCHAR},
market_price = #{record.marketPrice,jdbcType=DECIMAL},
earnings = #{record.earnings,jdbcType=DECIMAL},
earnings1 = #{record.earnings1,jdbcType=DECIMAL},
growth_rate = #{record.growthRate,jdbcType=DECIMAL},
growth_rate1 = #{record.growthRate1,jdbcType=DECIMAL},
net_worth = #{record.netWorth,jdbcType=DECIMAL},
net_worth1 = #{record.netWorth1,jdbcType=DECIMAL},
net_interest = #{record.netInterest,jdbcType=DECIMAL},
net_interest1 = #{record.netInterest1,jdbcType=DECIMAL},
operating_income = #{record.operatingIncome,jdbcType=DECIMAL},
operating_income1 = #{record.operatingIncome1,jdbcType=DECIMAL},
net_operatinginterest_rate = #{record.netOperatinginterestRate,jdbcType=DECIMAL},
net_operatinginterest_rate1 = #{record.netOperatinginterestRate1,jdbcType=DECIMAL},
method_id = #{record.methodId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuation">
update edu_project_valuation
<set>
<if test="companyid != null">
companyId = #{companyid,jdbcType=VARCHAR},
</if>
<if test="projectPoolId != null">
project_pool_id = #{projectPoolId,jdbcType=VARCHAR},
</if>
<if test="marketPrice != null">
market_price = #{marketPrice,jdbcType=DECIMAL},
</if>
<if test="earnings != null">
earnings = #{earnings,jdbcType=DECIMAL},
</if>
<if test="earnings1 != null">
earnings1 = #{earnings1,jdbcType=DECIMAL},
</if>
<if test="growthRate != null">
growth_rate = #{growthRate,jdbcType=DECIMAL},
</if>
<if test="growthRate1 != null">
growth_rate1 = #{growthRate1,jdbcType=DECIMAL},
</if>
<if test="netWorth != null">
net_worth = #{netWorth,jdbcType=DECIMAL},
</if>
<if test="netWorth1 != null">
net_worth1 = #{netWorth1,jdbcType=DECIMAL},
</if>
<if test="netInterest != null">
net_interest = #{netInterest,jdbcType=DECIMAL},
</if>
<if test="netInterest1 != null">
net_interest1 = #{netInterest1,jdbcType=DECIMAL},
</if>
<if test="operatingIncome != null">
operating_income = #{operatingIncome,jdbcType=DECIMAL},
</if>
<if test="operatingIncome1 != null">
operating_income1 = #{operatingIncome1,jdbcType=DECIMAL},
</if>
<if test="netOperatinginterestRate != null">
net_operatinginterest_rate = #{netOperatinginterestRate,jdbcType=DECIMAL},
</if>
<if test="netOperatinginterestRate1 != null">
net_operatinginterest_rate1 = #{netOperatinginterestRate1,jdbcType=DECIMAL},
</if>
<if test="methodId != null">
method_id = #{methodId,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.EduProjectValuation">
update edu_project_valuation
set companyId = #{companyid,jdbcType=VARCHAR},
project_pool_id = #{projectPoolId,jdbcType=VARCHAR},
market_price = #{marketPrice,jdbcType=DECIMAL},
earnings = #{earnings,jdbcType=DECIMAL},
earnings1 = #{earnings1,jdbcType=DECIMAL},
growth_rate = #{growthRate,jdbcType=DECIMAL},
growth_rate1 = #{growthRate1,jdbcType=DECIMAL},
net_worth = #{netWorth,jdbcType=DECIMAL},
net_worth1 = #{netWorth1,jdbcType=DECIMAL},
net_interest = #{netInterest,jdbcType=DECIMAL},
net_interest1 = #{netInterest1,jdbcType=DECIMAL},
operating_income = #{operatingIncome,jdbcType=DECIMAL},
operating_income1 = #{operatingIncome1,jdbcType=DECIMAL},
net_operatinginterest_rate = #{netOperatinginterestRate,jdbcType=DECIMAL},
net_operatinginterest_rate1 = #{netOperatinginterestRate1,jdbcType=DECIMAL},
method_id = #{methodId,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

@ -0,0 +1,434 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.fund_investment.mapper.ProBusinessInfoMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.ProBusinessInfo">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="project_pool_id" jdbcType="VARCHAR" property="projectPoolId" />
<result column="registered_capital" jdbcType="VARCHAR" property="registeredCapital" />
<result column="operating_state" jdbcType="VARCHAR" property="operatingState" />
<result column="credit_code" jdbcType="VARCHAR" property="creditCode" />
<result column="identification_number" jdbcType="VARCHAR" property="identificationNumber" />
<result column="business_term" jdbcType="VARCHAR" property="businessTerm" />
<result column="paidIn_capital" jdbcType="VARCHAR" property="paidinCapital" />
<result column="insurance_num" jdbcType="VARCHAR" property="insuranceNum" />
<result column="create_date" jdbcType="VARCHAR" property="createDate" />
<result column="registration_num" jdbcType="VARCHAR" property="registrationNum" />
<result column="orga_stru_code" jdbcType="VARCHAR" property="orgaStruCode" />
<result column="company_type" jdbcType="VARCHAR" property="companyType" />
<result column="industry" jdbcType="VARCHAR" property="industry" />
<result column="approval_date" jdbcType="VARCHAR" property="approvalDate" />
<result column="staff_size" jdbcType="VARCHAR" property="staffSize" />
<result column="registrar" jdbcType="VARCHAR" property="registrar" />
<result column="registered_address" jdbcType="VARCHAR" property="registeredAddress" />
<result column="business_scope" jdbcType="VARCHAR" property="businessScope" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, project_pool_id, registered_capital, operating_state, credit_code, identification_number,
business_term, paidIn_capital, insurance_num, create_date, registration_num, orga_stru_code,
company_type, industry, approval_date, staff_size, registrar, registered_address,
business_scope
</sql>
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.ProBusinessInfoExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pro_business_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pro_business_info
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from pro_business_info
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.ProBusinessInfoExample">
delete from pro_business_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.ProBusinessInfo">
insert into pro_business_info (id, project_pool_id, registered_capital,
operating_state, credit_code, identification_number,
business_term, paidIn_capital, insurance_num,
create_date, registration_num, orga_stru_code,
company_type, industry, approval_date,
staff_size, registrar, registered_address,
business_scope)
values (#{id,jdbcType=VARCHAR}, #{projectPoolId,jdbcType=VARCHAR}, #{registeredCapital,jdbcType=VARCHAR},
#{operatingState,jdbcType=VARCHAR}, #{creditCode,jdbcType=VARCHAR}, #{identificationNumber,jdbcType=VARCHAR},
#{businessTerm,jdbcType=VARCHAR}, #{paidinCapital,jdbcType=VARCHAR}, #{insuranceNum,jdbcType=VARCHAR},
#{createDate,jdbcType=VARCHAR}, #{registrationNum,jdbcType=VARCHAR}, #{orgaStruCode,jdbcType=VARCHAR},
#{companyType,jdbcType=VARCHAR}, #{industry,jdbcType=VARCHAR}, #{approvalDate,jdbcType=VARCHAR},
#{staffSize,jdbcType=VARCHAR}, #{registrar,jdbcType=VARCHAR}, #{registeredAddress,jdbcType=VARCHAR},
#{businessScope,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.ProBusinessInfo">
insert into pro_business_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="projectPoolId != null">
project_pool_id,
</if>
<if test="registeredCapital != null">
registered_capital,
</if>
<if test="operatingState != null">
operating_state,
</if>
<if test="creditCode != null">
credit_code,
</if>
<if test="identificationNumber != null">
identification_number,
</if>
<if test="businessTerm != null">
business_term,
</if>
<if test="paidinCapital != null">
paidIn_capital,
</if>
<if test="insuranceNum != null">
insurance_num,
</if>
<if test="createDate != null">
create_date,
</if>
<if test="registrationNum != null">
registration_num,
</if>
<if test="orgaStruCode != null">
orga_stru_code,
</if>
<if test="companyType != null">
company_type,
</if>
<if test="industry != null">
industry,
</if>
<if test="approvalDate != null">
approval_date,
</if>
<if test="staffSize != null">
staff_size,
</if>
<if test="registrar != null">
registrar,
</if>
<if test="registeredAddress != null">
registered_address,
</if>
<if test="businessScope != null">
business_scope,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="projectPoolId != null">
#{projectPoolId,jdbcType=VARCHAR},
</if>
<if test="registeredCapital != null">
#{registeredCapital,jdbcType=VARCHAR},
</if>
<if test="operatingState != null">
#{operatingState,jdbcType=VARCHAR},
</if>
<if test="creditCode != null">
#{creditCode,jdbcType=VARCHAR},
</if>
<if test="identificationNumber != null">
#{identificationNumber,jdbcType=VARCHAR},
</if>
<if test="businessTerm != null">
#{businessTerm,jdbcType=VARCHAR},
</if>
<if test="paidinCapital != null">
#{paidinCapital,jdbcType=VARCHAR},
</if>
<if test="insuranceNum != null">
#{insuranceNum,jdbcType=VARCHAR},
</if>
<if test="createDate != null">
#{createDate,jdbcType=VARCHAR},
</if>
<if test="registrationNum != null">
#{registrationNum,jdbcType=VARCHAR},
</if>
<if test="orgaStruCode != null">
#{orgaStruCode,jdbcType=VARCHAR},
</if>
<if test="companyType != null">
#{companyType,jdbcType=VARCHAR},
</if>
<if test="industry != null">
#{industry,jdbcType=VARCHAR},
</if>
<if test="approvalDate != null">
#{approvalDate,jdbcType=VARCHAR},
</if>
<if test="staffSize != null">
#{staffSize,jdbcType=VARCHAR},
</if>
<if test="registrar != null">
#{registrar,jdbcType=VARCHAR},
</if>
<if test="registeredAddress != null">
#{registeredAddress,jdbcType=VARCHAR},
</if>
<if test="businessScope != null">
#{businessScope,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.ProBusinessInfoExample" resultType="java.lang.Long">
select count(*) from pro_business_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update pro_business_info
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.projectPoolId != null">
project_pool_id = #{record.projectPoolId,jdbcType=VARCHAR},
</if>
<if test="record.registeredCapital != null">
registered_capital = #{record.registeredCapital,jdbcType=VARCHAR},
</if>
<if test="record.operatingState != null">
operating_state = #{record.operatingState,jdbcType=VARCHAR},
</if>
<if test="record.creditCode != null">
credit_code = #{record.creditCode,jdbcType=VARCHAR},
</if>
<if test="record.identificationNumber != null">
identification_number = #{record.identificationNumber,jdbcType=VARCHAR},
</if>
<if test="record.businessTerm != null">
business_term = #{record.businessTerm,jdbcType=VARCHAR},
</if>
<if test="record.paidinCapital != null">
paidIn_capital = #{record.paidinCapital,jdbcType=VARCHAR},
</if>
<if test="record.insuranceNum != null">
insurance_num = #{record.insuranceNum,jdbcType=VARCHAR},
</if>
<if test="record.createDate != null">
create_date = #{record.createDate,jdbcType=VARCHAR},
</if>
<if test="record.registrationNum != null">
registration_num = #{record.registrationNum,jdbcType=VARCHAR},
</if>
<if test="record.orgaStruCode != null">
orga_stru_code = #{record.orgaStruCode,jdbcType=VARCHAR},
</if>
<if test="record.companyType != null">
company_type = #{record.companyType,jdbcType=VARCHAR},
</if>
<if test="record.industry != null">
industry = #{record.industry,jdbcType=VARCHAR},
</if>
<if test="record.approvalDate != null">
approval_date = #{record.approvalDate,jdbcType=VARCHAR},
</if>
<if test="record.staffSize != null">
staff_size = #{record.staffSize,jdbcType=VARCHAR},
</if>
<if test="record.registrar != null">
registrar = #{record.registrar,jdbcType=VARCHAR},
</if>
<if test="record.registeredAddress != null">
registered_address = #{record.registeredAddress,jdbcType=VARCHAR},
</if>
<if test="record.businessScope != null">
business_scope = #{record.businessScope,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update pro_business_info
set id = #{record.id,jdbcType=VARCHAR},
project_pool_id = #{record.projectPoolId,jdbcType=VARCHAR},
registered_capital = #{record.registeredCapital,jdbcType=VARCHAR},
operating_state = #{record.operatingState,jdbcType=VARCHAR},
credit_code = #{record.creditCode,jdbcType=VARCHAR},
identification_number = #{record.identificationNumber,jdbcType=VARCHAR},
business_term = #{record.businessTerm,jdbcType=VARCHAR},
paidIn_capital = #{record.paidinCapital,jdbcType=VARCHAR},
insurance_num = #{record.insuranceNum,jdbcType=VARCHAR},
create_date = #{record.createDate,jdbcType=VARCHAR},
registration_num = #{record.registrationNum,jdbcType=VARCHAR},
orga_stru_code = #{record.orgaStruCode,jdbcType=VARCHAR},
company_type = #{record.companyType,jdbcType=VARCHAR},
industry = #{record.industry,jdbcType=VARCHAR},
approval_date = #{record.approvalDate,jdbcType=VARCHAR},
staff_size = #{record.staffSize,jdbcType=VARCHAR},
registrar = #{record.registrar,jdbcType=VARCHAR},
registered_address = #{record.registeredAddress,jdbcType=VARCHAR},
business_scope = #{record.businessScope,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.ProBusinessInfo">
update pro_business_info
<set>
<if test="projectPoolId != null">
project_pool_id = #{projectPoolId,jdbcType=VARCHAR},
</if>
<if test="registeredCapital != null">
registered_capital = #{registeredCapital,jdbcType=VARCHAR},
</if>
<if test="operatingState != null">
operating_state = #{operatingState,jdbcType=VARCHAR},
</if>
<if test="creditCode != null">
credit_code = #{creditCode,jdbcType=VARCHAR},
</if>
<if test="identificationNumber != null">
identification_number = #{identificationNumber,jdbcType=VARCHAR},
</if>
<if test="businessTerm != null">
business_term = #{businessTerm,jdbcType=VARCHAR},
</if>
<if test="paidinCapital != null">
paidIn_capital = #{paidinCapital,jdbcType=VARCHAR},
</if>
<if test="insuranceNum != null">
insurance_num = #{insuranceNum,jdbcType=VARCHAR},
</if>
<if test="createDate != null">
create_date = #{createDate,jdbcType=VARCHAR},
</if>
<if test="registrationNum != null">
registration_num = #{registrationNum,jdbcType=VARCHAR},
</if>
<if test="orgaStruCode != null">
orga_stru_code = #{orgaStruCode,jdbcType=VARCHAR},
</if>
<if test="companyType != null">
company_type = #{companyType,jdbcType=VARCHAR},
</if>
<if test="industry != null">
industry = #{industry,jdbcType=VARCHAR},
</if>
<if test="approvalDate != null">
approval_date = #{approvalDate,jdbcType=VARCHAR},
</if>
<if test="staffSize != null">
staff_size = #{staffSize,jdbcType=VARCHAR},
</if>
<if test="registrar != null">
registrar = #{registrar,jdbcType=VARCHAR},
</if>
<if test="registeredAddress != null">
registered_address = #{registeredAddress,jdbcType=VARCHAR},
</if>
<if test="businessScope != null">
business_scope = #{businessScope,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.ProBusinessInfo">
update pro_business_info
set project_pool_id = #{projectPoolId,jdbcType=VARCHAR},
registered_capital = #{registeredCapital,jdbcType=VARCHAR},
operating_state = #{operatingState,jdbcType=VARCHAR},
credit_code = #{creditCode,jdbcType=VARCHAR},
identification_number = #{identificationNumber,jdbcType=VARCHAR},
business_term = #{businessTerm,jdbcType=VARCHAR},
paidIn_capital = #{paidinCapital,jdbcType=VARCHAR},
insurance_num = #{insuranceNum,jdbcType=VARCHAR},
create_date = #{createDate,jdbcType=VARCHAR},
registration_num = #{registrationNum,jdbcType=VARCHAR},
orga_stru_code = #{orgaStruCode,jdbcType=VARCHAR},
company_type = #{companyType,jdbcType=VARCHAR},
industry = #{industry,jdbcType=VARCHAR},
approval_date = #{approvalDate,jdbcType=VARCHAR},
staff_size = #{staffSize,jdbcType=VARCHAR},
registrar = #{registrar,jdbcType=VARCHAR},
registered_address = #{registeredAddress,jdbcType=VARCHAR},
business_scope = #{businessScope,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

@ -241,4 +241,15 @@
last_three_year_value = #{lastThreeYearValue,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByProFinancialIndexIdListAndProjectPoolId" parameterType="java.util.Map" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM pro_financial_index_detail
WHERE financial_index_id IN
<foreach collection="proFinancialIndexIdList" item="proFinancialIndexId" open="(" separator="," close=")">
#{proFinancialIndexId}
</foreach>
AND project_pool_id = #{projectPoolId}
</select>
</mapper>

@ -178,4 +178,11 @@
parent_id = #{parentId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pro_financial_index
</select>
</mapper>

@ -69,7 +69,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, project_pool_id, financial_statement_id, name, last_year_value, last_tow_year_value,
id, project_pool_id, financial_statement_id, name, last_year_value, last_tow_year_value,
last_three_year_value
</sql>
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.ProFinancialStatementDetailExample" resultMap="BaseResultMap">
@ -87,7 +87,7 @@
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
select
<include refid="Base_Column_List" />
from pro_financial_statement_detail
where id = #{id,jdbcType=VARCHAR}
@ -103,11 +103,11 @@
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.ProFinancialStatementDetail">
insert into pro_financial_statement_detail (id, project_pool_id, financial_statement_id,
name, last_year_value, last_tow_year_value,
insert into pro_financial_statement_detail (id, project_pool_id, financial_statement_id,
name, last_year_value, last_tow_year_value,
last_three_year_value)
values (#{id,jdbcType=VARCHAR}, #{projectPoolId,jdbcType=VARCHAR}, #{financialStatementId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{lastYearValue,jdbcType=VARCHAR}, #{lastTowYearValue,jdbcType=VARCHAR},
values (#{id,jdbcType=VARCHAR}, #{projectPoolId,jdbcType=VARCHAR}, #{financialStatementId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{lastYearValue,jdbcType=VARCHAR}, #{lastTowYearValue,jdbcType=VARCHAR},
#{lastThreeYearValue,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.ProFinancialStatementDetail">
@ -241,4 +241,15 @@
last_three_year_value = #{lastThreeYearValue,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByproFinancialStatementIdListAndProjectPoolId" parameterType="java.util.Map" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM pro_financial_statement_detail
WHERE financial_statement_id IN
<foreach collection="proFinancialStatementIdList" item="proFinancialStatementId" open="(" separator="," close=")">
#{proFinancialStatementId}
</foreach>
AND project_pool_id = #{projectPoolId}
</select>
</mapper>

@ -178,4 +178,10 @@
name = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pro_financial_statement
</select>
</mapper>
Loading…
Cancel
Save