发出投资意向书

master
wanghb 1 year ago
parent 660e869256
commit bb6fa0ae17

@ -127,28 +127,53 @@ public class ContractInvestmentController {
@GetMapping("/getInvestIntentionDetailedInfo")
@ApiOperation("投资意向书甲乙双方详细信息")
public ResultEntity<InvestIntentionDetailedDto> getInvestIntentionDetailedInfo(@ApiParam("流程ID") @RequestParam String flowId) {
//获取乙方数据
//获取乙方法定代表
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();
// InvestIntentionDetailedDto intentionDetailedDto = InvestIntentionDetailedDto.builder().
// contactPersonB(list.get(0).getLegalPerson()).
// addressB()
// .build();
//
// return new ResultEntity<>(HttpStatus.OK, intentionDetailedDto);
return null;
return new ResultEntity<>(HttpStatus.OK, intentionDetailedDto);
}
@AnonymousAccess
@GetMapping("/sealA")
@ApiOperation("生成甲方公章")
public ResponseEntity<byte[]> getSealImageA(@ApiParam("流程ID") @RequestParam String flowId) throws Exception {
String s = null;
//生成公章
s = sealUtil.genertSealA("天泽股权投资基金");
// FileInputStream fileInputStream = new FileInputStream(filePath+"/seal/"+ s +".png");
//
// MultipartFile multipartFile = new MockMultipartFile(
// "example.png", // 文件名
// s + ".png", // 原始文件名
// "png", // 文件类型
// fileInputStream
// );
// String upload = fileUtil.upload(multipartFile);
// 模拟加载公章图片的数据(假设在硬盘上的某个路径下)
String imagePath = filePath + "/seal/" + s + ".png"; // 替换为你的实际路径
byte[] sealBytes = Files.readAllBytes(Paths.get(imagePath));
// 构建HTTP响应设置Content-Type为image/png
return ResponseEntity.ok()
.contentType(MediaType.IMAGE_PNG)
.body(sealBytes);
}
@AnonymousAccess
@GetMapping("/seal")
@GetMapping("/sealB")
@ApiOperation("生成乙方公章")
public ResponseEntity<byte[]> getSealImage(@ApiParam("流程ID") @RequestParam String flowId) throws Exception {
String s = null;
@ -167,7 +192,7 @@ public class ContractInvestmentController {
//项目估值
ProjectPool projectPool = projectPools.get(0);
//生成公章
s = sealUtil.genertSeal(projectPool.getCompanyName());
s = sealUtil.genertSealB(projectPool.getCompanyName());
// FileInputStream fileInputStream = new FileInputStream(filePath+"/seal/"+ s +".png");
//
// MultipartFile multipartFile = new MockMultipartFile(
@ -189,7 +214,6 @@ public class ContractInvestmentController {
return ResponseEntity.ok()
.contentType(MediaType.IMAGE_PNG)
.body(sealBytes);
}
}

@ -24,7 +24,7 @@ public class SealUtil {
@Value("${file.path}")
private String filePath;
public String genertSeal(String name) throws Exception{
public String genertSealB(String name) throws Exception{
String file = filePath+"/seal/";
// 创建 File 对象
File infoFile = new File(file);
@ -35,7 +35,7 @@ public class SealUtil {
com.sztzjy.fund_investment.util.seal.SealUtil.builder()
.size(200)
.borderCircle(SealCircle.builder().line(4).width(95).height(95).build())
.mainFont(SealFont.builder().text(name+"有限公司").size(22).space(22.0).margin(4).build())
.mainFont(SealFont.builder().text(name+"有限公司").size(22).space(30.0).margin(4).build())
.centerFont(SealFont.builder().text("★").size(60).build())
.titleFont(SealFont.builder().text("电子签章").size(16).space(8.0).margin(54).build())
.build()
@ -43,4 +43,23 @@ public class SealUtil {
System.out.println(name+"公章已生成");
return s;
}
public String genertSealA(String name) throws Exception{
String file = filePath+"/seal/";
// 创建 File 对象
File infoFile = new File(file);
if (!infoFile.exists()) {
infoFile.mkdir();
}
String s = IdUtil.fastSimpleUUID();
com.sztzjy.fund_investment.util.seal.SealUtil.builder()
.size(200)
.borderCircle(SealCircle.builder().line(4).width(95).height(95).build())
.mainFont(SealFont.builder().text(name).size(22).space(30.0).margin(4).build())
.centerFont(SealFont.builder().text("★").size(60).build())
.titleFont(SealFont.builder().text("电子签章").size(16).space(8.0).margin(54).build())
.build()
.draw(filePath+"/seal/"+ s +".png");
System.out.println(name+"公章已生成");
return s;
}
}

Loading…
Cancel
Save