diff --git a/src/main/java/com/sztzjy/fund_investment/controller/ContractInvestmentController.java b/src/main/java/com/sztzjy/fund_investment/controller/ContractInvestmentController.java index e59690d..f1927b8 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/ContractInvestmentController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/ContractInvestmentController.java @@ -194,23 +194,39 @@ public class ContractInvestmentController { List<ProBusinessInfoShareholder> list = projectDueDiligenceService.getBusinessInfoShareholderListByFlowId(flowId); List<ProBusinessInfo> businessInfoList = projectDueDiligenceService.getBusinessInfoList(flowId); - InvestIntentionDetailedDto intentionDetailedDto = InvestIntentionDetailedDto.builder(). - contactPersonB(list.get(0).getLegalPerson()). - addressB(businessInfoList.get(0).getRegisteredAddress()) - .build(); - return new ResultEntity<>(HttpStatus.OK, intentionDetailedDto); + + //获取乙方数据 + FoundProjectExample foundProjectExample = new FoundProjectExample(); + foundProjectExample.createCriteria().andFlowIdEqualTo(flowId); + List<FoundProject> foundProjects = foundProjectMapper.selectByExample(foundProjectExample); + + //立项项目ID + String projectPoolId = foundProjects.get(0).getProjectPoolId(); + + ProjectPoolExample projectPoolExample = new ProjectPoolExample(); + projectPoolExample.createCriteria().andProjectPoolIdEqualTo(projectPoolId); + List<ProjectPool> projectPools = projectPoolMapper.selectByExample(projectPoolExample); + + InvestIntentionDetailedDto intentionDetailedDto = InvestIntentionDetailedDto.builder(). + contactPersonB(list.get(0).getLegalPerson()). + addressB(businessInfoList.get(0).getRegisteredAddress()).companyB(projectPools.get(0).getCompanyName()+"有限公司") + .build(); + + return new ResultEntity<>(HttpStatus.OK, intentionDetailedDto); + + } @AnonymousAccess @GetMapping("/sealA") - @ApiOperation("生成甲方公章") + @ApiOperation("投资意向书:生成甲方公章") public ResponseEntity<byte[]> getSealImageA(@ApiParam("流程ID") @RequestParam String flowId) throws Exception { String s = null; //生成公章 - s = sealUtil.genertSealA("天泽股权投资基金"); + s = sealUtil.genertSealA("皖西学院基金管理有限公司"); // FileInputStream fileInputStream = new FileInputStream(filePath+"/seal/"+ s +".png"); // // MultipartFile multipartFile = new MockMultipartFile( @@ -234,7 +250,7 @@ public class ContractInvestmentController { @AnonymousAccess @GetMapping("/sealB") - @ApiOperation("投资意向书乙方公章和投资协议甲方公章") + @ApiOperation("投资意向书乙方公章和投资协议甲方公章(同一个接口)") public ResponseEntity<byte[]> getSealImage(@ApiParam("流程ID") @RequestParam String flowId) throws Exception { String s = null; //获取乙方数据 diff --git a/src/main/java/com/sztzjy/fund_investment/entity/dto/InvestIntentionDetailedDto.java b/src/main/java/com/sztzjy/fund_investment/entity/dto/InvestIntentionDetailedDto.java index cda3a44..bdfd755 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/dto/InvestIntentionDetailedDto.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/dto/InvestIntentionDetailedDto.java @@ -24,7 +24,7 @@ public class InvestIntentionDetailedDto { @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") private Date signingTime; - @ApiModelProperty("甲方联系人") + @ApiModelProperty("甲方联系人(甲法定代表人)") private String contactPersonA; @ApiModelProperty("甲方联系方式") @@ -34,17 +34,22 @@ public class InvestIntentionDetailedDto { private String addressA; - @ApiModelProperty("乙方联系人") + @ApiModelProperty("乙方联系人(乙法定代表人)") private String contactPersonB; + @ApiModelProperty("乙方地址") private String addressB; - public InvestIntentionDetailedDto(Date signingTime, String contactPersonA, String contactInformationA, String addressA, String contactPersonB, String addressB) { + @ApiModelProperty("乙方公司") + private String companyB; + + public InvestIntentionDetailedDto(Date signingTime, String contactPersonA, String contactInformationA, String addressA, String contactPersonB, String addressB,String companyB) { this.signingTime = new Date(); this.contactPersonA = "皖西学院基金管理有限公司"; this.contactInformationA = "0755-02103100"; this.addressA = "广东省深圳市宝安区"; this.contactPersonB = contactPersonB; this.addressB = addressB; + this.companyB = companyB; } }