提交参数录入

master
wanghb
parent c382c64818
commit 71dde6a5e3

@ -25,10 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.*;
@Service
public class ContractInvestmentServiceImpl implements ContractInvestmentService {
@ -295,18 +292,57 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
//发行总量和公司名称做校验
IssuanceInfoExample issuanceInfoExample = new IssuanceInfoExample();
issuanceInfoExample.createCriteria().andFlowIdEqualTo(issuanceInfo.getFlowId());
List<IssuanceInfo> issuanceInfos = issuanceInfoMapper.selectByExample(issuanceInfoExample);
//查询有无第一次录入的数据
if (issuanceInfos.size() > 0) {
if (!issuanceInfos.get(0).getSecurityCode().equals(issuanceInfo.getSecurityCode()))
{
issuanceInfo.setSecurityCode(issuanceInfos.get(0).getSecurityCode());
}
//获取上一次录入的数据和这一次录入的做对比
String s = compareFields(issuanceInfo, issuanceInfos.get(0));
if (!s.isEmpty()) {
issuanceInfoMapper.deleteByExample(issuanceInfoExample);
return new ResultEntity<>(HttpStatus.OK, s, "两次输入的" + s + ":" + "值不同!");
Map<String, String> map = new HashMap<>();
map.put("flowId","流程ID");
map.put("companyName","公司名称");
map.put("securityCode","证券代码");
map.put("minimumNonRestrictedASharesMarketValue","最低非限售A股市值");
map.put("initialInquiryStartDate","初步询价起始日期");
map.put("offlineSubscriptionStartDate","网下申购起始日期");
map.put("totalIssuanceVolume","发行总量");
map.put("minimumSubscriptionVolume","最低申购量");
map.put("minimumSubscriptionVolumeChangeUnit","申购量变动最小单位");
map.put("maximumPriceToMinimumPriceRatio","初步询价最高申报价格与最低申报价格的最大比值");
map.put("leadUnderwriterPeRatioValuationLowerLimit","主承销商市盈率估值区间下限");
map.put("settlementReserveAccountOpened","是否已在结算公司开立结算备付金账户");
map.put("remainingShareRegistrationAccountShenzhen","余股登记账户");
map.put("jointUnderwriters","联合承销商");
map.put("securityAbbreviation","证券简称");
map.put("pricingMethod","定价方式");
map.put("voluntaryLockupPeriod","是否设自愿锁定期");
map.put("initialInquiryDeadline","初步询价截止日期");
map.put("offlineSubscriptionDeadline","网下申购截止日期");
map.put("offlineIssuanceQuantity","网下发行数量");
map.put("maximumSubscriptionQuantity","最高由购量");
map.put("numberOfPriceLevelsInInitialInquiryStage","初步询价阶段的价格档位数量");
map.put("leadUnderwriterPeRatioValuationUpperLimit","主承销商市盈率估值区间上限");
map.put("reserveAccount","备付金账户");
map.put("remainingShareCustodianSeatShenzhen","余股托管席位(深市)");
int colonIndex = s.indexOf(":");
// 截取字符串
String key = s.substring(0, colonIndex);
String value = map.get(key);
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "两次输入的"+"(" + value + ")" + "不同!",s);
}
//完成新建发行申请3分
performanceScoreService.calculateScoreByModule("newPricingIssuanceScore", 3, issuanceInfo.getFlowId());
@ -355,7 +391,7 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
issuanceInfo.setId(IdUtil.fastSimpleUUID());
//插入数据
issuanceInfoMapper.insert(issuanceInfo);
return new ResultEntity(HttpStatus.OK);
return new ResultEntity(HttpStatus.OK,"",issuanceInfo.getSecurityCode());
} else {
return new ResultEntity(HttpStatus.BAD_REQUEST, "发行总量小于估值的25%");
@ -365,7 +401,8 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
}
}
}
return null;
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "第一次未录入");
}
@ -436,10 +473,32 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService
String s = compareFieldsTwo(issuanceParameterInput, issuanceParameterInputList.get(0));
if (!s.isEmpty()) {
issuanceParameterInputMapper.deleteByExample(issuanceParameterInputExample);
return new ResultEntity<>(HttpStatus.OK, s, "两次输入的" + s + ":" + "值不同!");
Map<String, String> map = new HashMap<>();
map.put("flowId","流程ID");
map.put("allotmentObjectCode","配售对象编码");
map.put("companyName","公司名称");
map.put("securityCode","证券代码");
map.put("securityAbbreviation","证券简称");
map.put("totalIssuanceVolume","发行总量");
map.put("issuancePrice","发行价格");
map.put("offlineIssuanceQuantity","网下发行数量");
map.put("minimumSubscriptionToShortlistedRatio","个配售对象申购数下限与入围数最之间的比值(%)");
map.put("maximumSubscriptionToShortlistedRatio","每个配售对象申购数上限与入围数最之间的比值");
map.put("dilutedPeRatio","摊薄前市盈率");
map.put("undilutedPeRatio","摊薄后市盈率");
int colonIndex = s.indexOf(":");
// 截取字符串
String key = s.substring(0, colonIndex);
String value = map.get(key);
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "两次输入的"+"(" + value + ")" + "不同!",s);
}
//询价结果查询及发行参数录入2分
performanceScoreService.calculateScoreByModule("pricingIssuanceEnteringScore", 2, issuanceParameterInput.getFlowId());
performanceScoreService.calculateScoreByModule("pricingIssuanceEnteringScore", 3, issuanceParameterInput.getFlowId());
PerformanceScore performanceScore = performanceScoreService.getByFlowId(issuanceParameterInput.getFlowId());
//询价发行完成时间

Loading…
Cancel
Save