@t2652009480 1 year ago
commit 59afaea9a8

@ -296,62 +296,59 @@ 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) {
if (!issuanceInfos.get(0).getSecurityCode().equals(issuanceInfo.getSecurityCode())) // if (!issuanceInfos.get(0).getSecurityCode().equals(issuanceInfo.getSecurityCode()))
{ // {
issuanceInfo.setSecurityCode(issuanceInfos.get(0).getSecurityCode()); // issuanceInfo.setSecurityCode(issuanceInfos.get(0).getSecurityCode());
} // }
//
//获取上一次录入的数据和这一次录入的做对比 // //获取上一次录入的数据和这一次录入的做对比
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);
Map<String, String> map = new HashMap<>(); // Map<String, String> map = new HashMap<>();
map.put("flowId","流程ID"); // map.put("flowId","流程ID");
map.put("companyName","公司名称"); // map.put("companyName","公司名称");
map.put("securityCode","证券代码"); // map.put("securityCode","证券代码");
map.put("minimumNonRestrictedASharesMarketValue","最低非限售A股市值"); // map.put("minimumNonRestrictedASharesMarketValue","最低非限售A股市值");
map.put("initialInquiryStartDate","初步询价起始日期"); // map.put("initialInquiryStartDate","初步询价起始日期");
map.put("offlineSubscriptionStartDate","网下申购起始日期"); // map.put("offlineSubscriptionStartDate","网下申购起始日期");
map.put("totalIssuanceVolume","发行总量"); // map.put("totalIssuanceVolume","发行总量");
map.put("minimumSubscriptionVolume","最低申购量"); // map.put("minimumSubscriptionVolume","最低申购量");
map.put("minimumSubscriptionVolumeChangeUnit","申购量变动最小单位"); // map.put("minimumSubscriptionVolumeChangeUnit","申购量变动最小单位");
map.put("maximumPriceToMinimumPriceRatio","初步询价最高申报价格与最低申报价格的最大比值"); // map.put("maximumPriceToMinimumPriceRatio","初步询价最高申报价格与最低申报价格的最大比值");
map.put("leadUnderwriterPeRatioValuationLowerLimit","主承销商市盈率估值区间下限"); // map.put("leadUnderwriterPeRatioValuationLowerLimit","主承销商市盈率估值区间下限");
map.put("settlementReserveAccountOpened","是否已在结算公司开立结算备付金账户"); // map.put("settlementReserveAccountOpened","是否已在结算公司开立结算备付金账户");
map.put("remainingShareRegistrationAccountShenzhen","余股登记账户"); // map.put("remainingShareRegistrationAccountShenzhen","余股登记账户");
map.put("jointUnderwriters","联合承销商"); // map.put("jointUnderwriters","联合承销商");
map.put("securityAbbreviation","证券简称"); // map.put("securityAbbreviation","证券简称");
map.put("pricingMethod","定价方式"); // map.put("pricingMethod","定价方式");
map.put("voluntaryLockupPeriod","是否设自愿锁定期"); // map.put("voluntaryLockupPeriod","是否设自愿锁定期");
map.put("initialInquiryDeadline","初步询价截止日期"); // map.put("initialInquiryDeadline","初步询价截止日期");
map.put("offlineSubscriptionDeadline","网下申购截止日期"); // map.put("offlineSubscriptionDeadline","网下申购截止日期");
map.put("offlineIssuanceQuantity","网下发行数量"); // map.put("offlineIssuanceQuantity","网下发行数量");
map.put("maximumSubscriptionQuantity","最高由购量"); // map.put("maximumSubscriptionQuantity","最高由购量");
map.put("numberOfPriceLevelsInInitialInquiryStage","初步询价阶段的价格档位数量"); // map.put("numberOfPriceLevelsInInitialInquiryStage","初步询价阶段的价格档位数量");
map.put("leadUnderwriterPeRatioValuationUpperLimit","主承销商市盈率估值区间上限"); // map.put("leadUnderwriterPeRatioValuationUpperLimit","主承销商市盈率估值区间上限");
map.put("reserveAccount","备付金账户"); // map.put("reserveAccount","备付金账户");
map.put("remainingShareCustodianSeatShenzhen","余股托管席位(深市)"); // map.put("remainingShareCustodianSeatShenzhen","余股托管席位(深市)");
//
int colonIndex = s.indexOf(":"); // int colonIndex = s.indexOf(":");
// 截取字符串 // // 截取字符串
String key = s.substring(0, colonIndex); // String key = s.substring(0, colonIndex);
//
String value = map.get(key); // String value = map.get(key);
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "两次输入的"+"(" + value + ")" + "不同!",s); // return new ResultEntity<>(HttpStatus.BAD_REQUEST, "两次输入的"+"(" + value + ")" + "不同!",s);
} // }
//完成新建发行申请3分 // //完成新建发行申请3分
performanceScoreService.calculateScoreByModule("newPricingIssuanceScore", 3, issuanceInfo.getFlowId()); // performanceScoreService.calculateScoreByModule("newPricingIssuanceScore", 3, issuanceInfo.getFlowId());
return new ResultEntity<>(HttpStatus.OK, s, "添加成功"); // return new ResultEntity<>(HttpStatus.OK, s, "添加成功");
return new ResultEntity(HttpStatus.BAD_REQUEST, "请勿重复录入!");
} }
//第一次录入和估值做计算 //第一次录入和估值做计算
else { // else {
//查询立项公司估值 //查询立项公司估值
FoundProjectExample foundProjectExample = new FoundProjectExample(); FoundProjectExample foundProjectExample = new FoundProjectExample();
foundProjectExample.createCriteria().andFlowIdEqualTo(issuanceInfo.getFlowId()); foundProjectExample.createCriteria().andFlowIdEqualTo(issuanceInfo.getFlowId());
@ -381,6 +378,8 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
issuanceInfo.setId(IdUtil.fastSimpleUUID()); issuanceInfo.setId(IdUtil.fastSimpleUUID());
//插入数据 //插入数据
issuanceInfoMapper.insert(issuanceInfo); issuanceInfoMapper.insert(issuanceInfo);
//加分
performanceScoreService.calculateScoreByModule("newPricingIssuanceScore", 3, issuanceInfo.getFlowId());
return new ResultEntity(HttpStatus.OK); return new ResultEntity(HttpStatus.OK);
} else { } else {
@ -390,18 +389,21 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
if (info / aLong > 0.25) { if (info / aLong > 0.25) {
issuanceInfo.setId(IdUtil.fastSimpleUUID()); issuanceInfo.setId(IdUtil.fastSimpleUUID());
//插入数据 //插入数据
performanceScoreService.calculateScoreByModule("newPricingIssuanceScore", 3, issuanceInfo.getFlowId());
issuanceInfoMapper.insert(issuanceInfo); issuanceInfoMapper.insert(issuanceInfo);
return new ResultEntity(HttpStatus.OK,"",issuanceInfo.getSecurityCode()); return new ResultEntity(HttpStatus.OK);
} else { } else {
return new ResultEntity(HttpStatus.BAD_REQUEST, "发行总量小于估值的25%"); return new ResultEntity(HttpStatus.BAD_REQUEST, "发行总量小于估值的25%");
} }
} }
//取出发行总量 //取出发行总量
} }
} }
}
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "第一次未录入"); return null;
} }
@ -469,49 +471,50 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
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);
//
Map<String, String> map = new HashMap<>(); // Map<String, String> map = new HashMap<>();
map.put("flowId","流程ID"); // map.put("flowId","流程ID");
map.put("allotmentObjectCode","配售对象编码"); // map.put("allotmentObjectCode","配售对象编码");
map.put("companyName","公司名称"); // map.put("companyName","公司名称");
map.put("securityCode","证券代码"); // map.put("securityCode","证券代码");
map.put("securityAbbreviation","证券简称"); // map.put("securityAbbreviation","证券简称");
map.put("totalIssuanceVolume","发行总量"); // map.put("totalIssuanceVolume","发行总量");
map.put("issuancePrice","发行价格"); // map.put("issuancePrice","发行价格");
map.put("offlineIssuanceQuantity","网下发行数量"); // map.put("offlineIssuanceQuantity","网下发行数量");
map.put("minimumSubscriptionToShortlistedRatio","个配售对象申购数下限与入围数最之间的比值(%)"); // map.put("minimumSubscriptionToShortlistedRatio","个配售对象申购数下限与入围数最之间的比值(%)");
map.put("maximumSubscriptionToShortlistedRatio","每个配售对象申购数上限与入围数最之间的比值"); // map.put("maximumSubscriptionToShortlistedRatio","每个配售对象申购数上限与入围数最之间的比值");
map.put("dilutedPeRatio","摊薄前市盈率"); // map.put("dilutedPeRatio","摊薄前市盈率");
map.put("undilutedPeRatio","摊薄后市盈率"); // map.put("undilutedPeRatio","摊薄后市盈率");
//
int colonIndex = s.indexOf(":"); // int colonIndex = s.indexOf(":");
// 截取字符串 // // 截取字符串
String key = s.substring(0, colonIndex); // String key = s.substring(0, colonIndex);
//
String value = map.get(key); // String value = map.get(key);
//
//
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "两次输入的"+"(" + value + ")" + "不同!",s); // return new ResultEntity<>(HttpStatus.BAD_REQUEST, "两次输入的"+"(" + value + ")" + "不同!",s);
} // }
//询价结果查询及发行参数录入2分 // //询价结果查询及发行参数录入2分
performanceScoreService.calculateScoreByModule("pricingIssuanceEnteringScore", 3, issuanceParameterInput.getFlowId()); // performanceScoreService.calculateScoreByModule("pricingIssuanceEnteringScore", 2, issuanceParameterInput.getFlowId());
//
PerformanceScore performanceScore = performanceScoreService.getByFlowId(issuanceParameterInput.getFlowId()); // PerformanceScore performanceScore = performanceScoreService.getByFlowId(issuanceParameterInput.getFlowId());
//询价发行完成时间 // //询价发行完成时间
performanceScore.setPricingIssuanceTime(new Date()); // performanceScore.setPricingIssuanceTime(new Date());
performanceScoreMapper.updateByPrimaryKey(performanceScore); // performanceScoreMapper.updateByPrimaryKey(performanceScore);
return new ResultEntity<>(HttpStatus.OK, s, "添加成功"); return new ResultEntity(HttpStatus.BAD_REQUEST, "请勿重复录入!");
} }
//第一次录入和估值做计算 //第一次录入和估值做计算
else { else {
issuanceParameterInput.setId(IdUtil.fastSimpleUUID()); issuanceParameterInput.setId(IdUtil.fastSimpleUUID());
issuanceParameterInputMapper.insertSelective(issuanceParameterInput); issuanceParameterInputMapper.insertSelective(issuanceParameterInput);
performanceScoreService.calculateScoreByModule("pricingIssuanceEnteringScore", 2, issuanceParameterInput.getFlowId());
return new ResultEntity<>(HttpStatus.OK); return new ResultEntity<>(HttpStatus.OK);
} }

@ -552,7 +552,8 @@ public class ClassScoreServiceImpl implements ClassScoreService {
.add(Optional.ofNullable(performanceScore.getProfitManagementMarketValueExitScore()).orElse(BigDecimal.ZERO)) .add(Optional.ofNullable(performanceScore.getProfitManagementMarketValueExitScore()).orElse(BigDecimal.ZERO))
); );
performanceTrainingScoreDto.setProfitDistributionScore(Optional.ofNullable(performanceScore.getProfitDistributionScore()).orElse(BigDecimal.ZERO)); performanceTrainingScoreDto.setProfitDistributionScore(Optional.ofNullable(performanceScore.getProfitDistributionScore()).orElse(BigDecimal.ZERO)
.add(Optional.ofNullable(performanceScore.getProfitDistributionAvailablefundsScore()).orElse(BigDecimal.ZERO)));
performanceTrainingScoreDto.setInvestmentReportScore(Optional.ofNullable(performanceScore.getInvestmentReportScore()).orElse(BigDecimal.ZERO).add(Optional.ofNullable(performanceScore.getExperienceScore()).orElse(BigDecimal.ZERO))); performanceTrainingScoreDto.setInvestmentReportScore(Optional.ofNullable(performanceScore.getInvestmentReportScore()).orElse(BigDecimal.ZERO).add(Optional.ofNullable(performanceScore.getExperienceScore()).orElse(BigDecimal.ZERO)));
performanceTrainingScoreDto.setTotalScore(Optional.ofNullable(performanceScore.getTotalScore()).orElse(BigDecimal.ZERO)); performanceTrainingScoreDto.setTotalScore(Optional.ofNullable(performanceScore.getTotalScore()).orElse(BigDecimal.ZERO));

Loading…
Cancel
Save