修改收益管理,新增基金募资金额字段

master
xiaoCJ 1 year ago
parent dcdc378c4b
commit 9169429ce8

@ -127,8 +127,7 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
trainingReport.setStep(reportNameType.getReportNameType()); trainingReport.setStep(reportNameType.getReportNameType());
trainingReportMapper.insert(trainingReport); trainingReportMapper.insert(trainingReport);
count++; count++;
if (count == 1) if (count == 1) {
{
performanceScoreService.calculateScoreByModule("investmentSigningVlauationReportScore", 2, reportNameType.getFlowId()); performanceScoreService.calculateScoreByModule("investmentSigningVlauationReportScore", 2, reportNameType.getFlowId());
} }
} }
@ -243,7 +242,6 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
long sumMoney = aLong1 + aDouble1; long sumMoney = aLong1 + aDouble1;
//第三条注册资本增加至 //第三条注册资本增加至
investmentAgreementDto.setRegisteredCapitalIncrease(String.valueOf(sumMoney)); investmentAgreementDto.setRegisteredCapitalIncrease(String.valueOf(sumMoney));
@ -289,6 +287,7 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
/** /**
* *
*
* @return * @return
*/ */
@Override @Override
@ -302,12 +301,10 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
issuanceInfoExample.createCriteria().andFlowIdEqualTo(issuanceInfo.getFlowId()); issuanceInfoExample.createCriteria().andFlowIdEqualTo(issuanceInfo.getFlowId());
List<IssuanceInfo> issuanceInfos = issuanceInfoMapper.selectByExample(issuanceInfoExample); List<IssuanceInfo> issuanceInfos = issuanceInfoMapper.selectByExample(issuanceInfoExample);
//查询有无第一次录入的数据 //查询有无第一次录入的数据
if (issuanceInfos.size()>0) if (issuanceInfos.size() > 0) {
{
//获取上一次录入的数据和这一次录入的做对比 //获取上一次录入的数据和这一次录入的做对比
String s = compareFields(issuanceInfo, issuanceInfos.get(0)); String s = compareFields(issuanceInfo, issuanceInfos.get(0));
if (!s.isEmpty()) if (!s.isEmpty()) {
{
issuanceInfoMapper.deleteByExample(issuanceInfoExample); issuanceInfoMapper.deleteByExample(issuanceInfoExample);
return new ResultEntity<>(HttpStatus.OK, s, "两次输入的" + s + ":" + "值不同!"); return new ResultEntity<>(HttpStatus.OK, s, "两次输入的" + s + ":" + "值不同!");
} }
@ -374,6 +371,7 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
/** /**
* *
*
* @param flowId * @param flowId
* @return * @return
*/ */
@ -433,12 +431,10 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
issuanceParameterInputExample.createCriteria().andFlowIdEqualTo(issuanceParameterInput.getFlowId()); issuanceParameterInputExample.createCriteria().andFlowIdEqualTo(issuanceParameterInput.getFlowId());
List<IssuanceParameterInput> issuanceParameterInputList = issuanceParameterInputMapper.selectByExample(issuanceParameterInputExample); List<IssuanceParameterInput> issuanceParameterInputList = issuanceParameterInputMapper.selectByExample(issuanceParameterInputExample);
//查询有无第一次录入的数据 //查询有无第一次录入的数据
if (issuanceParameterInputList.size()>0) if (issuanceParameterInputList.size() > 0) {
{
//获取上一次录入的数据和这一次录入的做对比 //获取上一次录入的数据和这一次录入的做对比
String s = compareFieldsTwo(issuanceParameterInput, issuanceParameterInputList.get(0)); String s = compareFieldsTwo(issuanceParameterInput, issuanceParameterInputList.get(0));
if (!s.isEmpty()) if (!s.isEmpty()) {
{
issuanceParameterInputMapper.deleteByExample(issuanceParameterInputExample); issuanceParameterInputMapper.deleteByExample(issuanceParameterInputExample);
return new ResultEntity<>(HttpStatus.OK, s, "两次输入的" + s + ":" + "值不同!"); return new ResultEntity<>(HttpStatus.OK, s, "两次输入的" + s + ":" + "值不同!");
} }
@ -465,6 +461,7 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
/** /**
* *
*
* @param flowId * @param flowId
* @return * @return
*/ */
@ -530,8 +527,7 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
if (!formattedThisValue.equals(formattedOtherValue)) { if (!formattedThisValue.equals(formattedOtherValue)) {
differences.append(field.getName()).append(": ").append(formattedThisValue).append(" -> ").append(formattedOtherValue).append("/n"); differences.append(field.getName()).append(": ").append(formattedThisValue).append(" -> ").append(formattedOtherValue).append("/n");
} }
} } else {
else {
// 对于非浮点数,直接使用 equals 进行比较 // 对于非浮点数,直接使用 equals 进行比较
if ((thisValue == null && otherValue != null) || (thisValue != null && !thisValue.equals(otherValue))) { if ((thisValue == null && otherValue != null) || (thisValue != null && !thisValue.equals(otherValue))) {
differences.append(field.getName()).append(": ").append(thisValue).append(" -> ").append(otherValue).append("/n"); differences.append(field.getName()).append(": ").append(thisValue).append(" -> ").append(otherValue).append("/n");
@ -547,8 +543,6 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
} }
// 比较两个Student对象的字段返回不相同的字段 // 比较两个Student对象的字段返回不相同的字段
public String compareFields(IssuanceInfo newInfo, IssuanceInfo other) { public String compareFields(IssuanceInfo newInfo, IssuanceInfo other) {
IssuanceInfoExample issuanceInfoExample = new IssuanceInfoExample(); IssuanceInfoExample issuanceInfoExample = new IssuanceInfoExample();
@ -594,8 +588,7 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
if (!formattedThisValue.equals(formattedOtherValue)) { if (!formattedThisValue.equals(formattedOtherValue)) {
differences.append(field.getName()).append(": ").append(formattedThisValue).append(" -> ").append(formattedOtherValue).append("/n"); differences.append(field.getName()).append(": ").append(formattedThisValue).append(" -> ").append(formattedOtherValue).append("/n");
} }
} } else {
else {
// 对于非浮点数,直接使用 equals 进行比较 // 对于非浮点数,直接使用 equals 进行比较
if ((thisValue == null && otherValue != null) || (thisValue != null && !thisValue.equals(otherValue))) { if ((thisValue == null && otherValue != null) || (thisValue != null && !thisValue.equals(otherValue))) {
differences.append(field.getName()).append(": ").append(thisValue).append(" -> ").append(otherValue).append("/n"); differences.append(field.getName()).append(": ").append(thisValue).append(" -> ").append(otherValue).append("/n");
@ -611,12 +604,6 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
} }
public List<TrainingReport> getTrainingReports(String flowId, String reportName) { public List<TrainingReport> getTrainingReports(String flowId, String reportName) {
TrainingReportExample trainingReportExample = new TrainingReportExample(); TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andFlowIdEqualTo(flowId).andStepEqualTo(reportName); trainingReportExample.createCriteria().andFlowIdEqualTo(flowId).andStepEqualTo(reportName);

@ -92,7 +92,7 @@ public class InvestmentReportServiceImpl implements InvestmentReportService {
@Override @Override
public List<TrainingReport> getTrainingReports(String flowId) { public List<TrainingReport> getTrainingReports(String flowId) {
TrainingReportExample trainingReportExample = new TrainingReportExample(); TrainingReportExample trainingReportExample = new TrainingReportExample();
trainingReportExample.createCriteria().andFlowIdEqualTo(flowId); trainingReportExample.createCriteria().andFlowIdEqualTo(flowId).andStepEqualTo(Constant.TZBG);
return trainingReportMapper.selectByExampleWithBLOBs(trainingReportExample); return trainingReportMapper.selectByExampleWithBLOBs(trainingReportExample);
} }

@ -179,8 +179,8 @@ public class ProfitDistributionServiceImpl implements ProfitDistributionService
BigDecimal userRemainingEarningsPreferredLp = profitDistribution.getRemainingEarningsPreferredLp();//用户/第二轮优先级LP BigDecimal userRemainingEarningsPreferredLp = profitDistribution.getRemainingEarningsPreferredLp();//用户/第二轮优先级LP
BigDecimal rightOwnFunds = fundraising.getOwnFunds();//正确/第一轮自有资金 BigDecimal rightOwnFunds = fundraising.getOwnFunds();//正确/第一轮自有资金
Integer type = fundraising.getType(); Integer type = fundraising.getType();
//计算可用资金是否正确 //计算可用资金是否正确 基金募集总金额-投资金额+退出时投资收益
BigDecimal rightAvailableFunds = fundraisingAmount.add(exitFundEarnings).setScale(2, RoundingMode.HALF_UP);//可用资金 BigDecimal rightAvailableFunds = fundraisingAmount.subtract(exitTime.getInvestmentAmount()).add(exitFundEarnings).setScale(2, RoundingMode.HALF_UP);//可用资金
profitDistribution.setAvailableFunds(rightAvailableFunds); //设置可用资金 profitDistribution.setAvailableFunds(rightAvailableFunds); //设置可用资金
if (profitDistribution.getUserAvailableFunds().compareTo(rightAvailableFunds) == 0) { if (profitDistribution.getUserAvailableFunds().compareTo(rightAvailableFunds) == 0) {
performanceScoreService.calculateScoreByModule("profitDistributionAvailablefundsScore", 1, flowId); performanceScoreService.calculateScoreByModule("profitDistributionAvailablefundsScore", 1, flowId);

Loading…
Cancel
Save