From a26b572d21f183bd63434bc99d2907e139d1f17b Mon Sep 17 00:00:00 2001 From: wanghb <17803890193@163.com> Date: Tue, 5 Mar 2024 17:04:46 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=A2=E4=BB=B7?= =?UTF-8?q?=E5=8F=91=E8=A1=8C=E5=8F=82=E6=95=B0=E5=BD=95=E5=85=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContractInvestmentServiceImpl.java | 187 +++++++++--------- 1 file changed, 95 insertions(+), 92 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ContractInvestmentServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ContractInvestmentServiceImpl.java index 2a1893c..c08cf8f 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ContractInvestmentServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ContractInvestmentServiceImpl.java @@ -296,62 +296,59 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService issuanceInfoExample.createCriteria().andFlowIdEqualTo(issuanceInfo.getFlowId()); List 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); - Map 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()); - return new ResultEntity<>(HttpStatus.OK, s, "添加成功"); - - +// 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); +// Map 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()); +// return new ResultEntity<>(HttpStatus.OK, s, "添加成功"); + + return new ResultEntity(HttpStatus.BAD_REQUEST, "请勿重复录入!"); } //第一次录入和估值做计算 - else { +// else { //查询立项公司估值 FoundProjectExample foundProjectExample = new FoundProjectExample(); foundProjectExample.createCriteria().andFlowIdEqualTo(issuanceInfo.getFlowId()); @@ -381,6 +378,8 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService issuanceInfo.setId(IdUtil.fastSimpleUUID()); //插入数据 issuanceInfoMapper.insert(issuanceInfo); + //加分 + performanceScoreService.calculateScoreByModule("newPricingIssuanceScore", 3, issuanceInfo.getFlowId()); return new ResultEntity(HttpStatus.OK); } else { @@ -390,18 +389,21 @@ public class ContractInvestmentServiceImpl implements ContractInvestmentService if (info / aLong > 0.25) { issuanceInfo.setId(IdUtil.fastSimpleUUID()); //插入数据 + performanceScoreService.calculateScoreByModule("newPricingIssuanceScore", 3, issuanceInfo.getFlowId()); issuanceInfoMapper.insert(issuanceInfo); - return new ResultEntity(HttpStatus.OK,"",issuanceInfo.getSecurityCode()); + return new ResultEntity(HttpStatus.OK); } else { 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 issuanceParameterInputList = issuanceParameterInputMapper.selectByExample(issuanceParameterInputExample); //查询有无第一次录入的数据 if (issuanceParameterInputList.size() > 0) { - //获取上一次录入的数据和这一次录入的做对比 - String s = compareFieldsTwo(issuanceParameterInput, issuanceParameterInputList.get(0)); - if (!s.isEmpty()) { - issuanceParameterInputMapper.deleteByExample(issuanceParameterInputExample); - - Map 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", 3, issuanceParameterInput.getFlowId()); - - PerformanceScore performanceScore = performanceScoreService.getByFlowId(issuanceParameterInput.getFlowId()); - //询价发行完成时间 - performanceScore.setPricingIssuanceTime(new Date()); - performanceScoreMapper.updateByPrimaryKey(performanceScore); - - return new ResultEntity<>(HttpStatus.OK, s, "添加成功"); +// //获取上一次录入的数据和这一次录入的做对比 +// String s = compareFieldsTwo(issuanceParameterInput, issuanceParameterInputList.get(0)); +// if (!s.isEmpty()) { +// issuanceParameterInputMapper.deleteByExample(issuanceParameterInputExample); +// +// Map 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()); +// +// PerformanceScore performanceScore = performanceScoreService.getByFlowId(issuanceParameterInput.getFlowId()); +// //询价发行完成时间 +// performanceScore.setPricingIssuanceTime(new Date()); +// performanceScoreMapper.updateByPrimaryKey(performanceScore); + + return new ResultEntity(HttpStatus.BAD_REQUEST, "请勿重复录入!"); } //第一次录入和估值做计算 else { issuanceParameterInput.setId(IdUtil.fastSimpleUUID()); issuanceParameterInputMapper.insertSelective(issuanceParameterInput); + performanceScoreService.calculateScoreByModule("pricingIssuanceEnteringScore", 2, issuanceParameterInput.getFlowId()); return new ResultEntity<>(HttpStatus.OK); } From 2d6cb45ef3526c1db5e8ec4fd896d181a9aec813 Mon Sep 17 00:00:00 2001 From: "@t2652009480" <2652009480@qq.com> Date: Wed, 6 Mar 2024 08:30:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=AF=A2=E4=BB=B7=E5=8F=91=E8=A1=8C--?= =?UTF-8?q?=E6=95=B4=E4=BD=93=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/InquiryIssuanceController.java | 19 +- .../entity/AllotmentObject.java | 17 + .../mapper/AllotmentObjectMapper.java | 2 + .../service/InquiryIssuanceService.java | 2 +- .../InquiryIssuanceServiceImpl.java | 37 +-- .../mappers/AllotmentObjectMapper.xml | 291 ------------------ 6 files changed, 37 insertions(+), 331 deletions(-) delete mode 100644 src/main/resources/mappers/AllotmentObjectMapper.xml diff --git a/src/main/java/com/sztzjy/fund_investment/controller/InquiryIssuanceController.java b/src/main/java/com/sztzjy/fund_investment/controller/InquiryIssuanceController.java index a320fc1..fc06218 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/InquiryIssuanceController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/InquiryIssuanceController.java @@ -47,10 +47,8 @@ public class InquiryIssuanceController { @AnonymousAccess @GetMapping("/queryInquiryInvestors") @ApiOperation("询价投资者查看") - public ResultEntity> queryInquiryInvestors(@ApiParam("流程ID") String flowId, - @ApiParam("每页条数") Integer size, - @ApiParam("当前页") Integer index){ - PageInfo pageInfo=inquiryIssuanceService.queryInquiryInvestors(flowId,size,index); + public ResultEntity> queryInquiryInvestors(String flowId){ + PageInfo pageInfo=inquiryIssuanceService.queryInquiryInvestors(flowId); return new ResultEntity<>(HttpStatus.OK,"成功",pageInfo); } @@ -144,13 +142,12 @@ public class InquiryIssuanceController { @AnonymousAccess @GetMapping("/basicInformationStorage") @ApiOperation("投资者参与询价--基本信息保存") - public ResultEntity basicInformationStorage(@RequestBody JSONObject jsonObject){ - String objectivityEvaluation = jsonObject.getString("objectivityEvaluation"); - String valuationMethodRationalityEvaluation = jsonObject.getString("valuationMethodRationalityEvaluation"); - Integer overallEvaluation = jsonObject.getInteger("overallEvaluation"); - String operator = jsonObject.getString("operator"); - BigDecimal declarationPrice = jsonObject.getBigDecimal("declarationPrice"); - String flowId = jsonObject.getString("flowId"); + public ResultEntity basicInformationStorage(@RequestParam @ApiParam("客观性评价") String objectivityEvaluation, + @RequestParam @ApiParam("估值方法合理性评价") String valuationMethodRationalityEvaluation, + @RequestParam @ApiParam("总体评价(1-100整数)") Integer overallEvaluation, + @RequestParam @ApiParam("经办人") String operator, + @RequestParam @ApiParam("申报价格") BigDecimal declarationPrice, + @RequestParam @ApiParam("流程ID") String flowId){ inquiryIssuanceService.basicInformationStorage(objectivityEvaluation,overallEvaluation, valuationMethodRationalityEvaluation,operator,declarationPrice,flowId); return new ResultEntity<>(HttpStatus.OK,"保存成功"); diff --git a/src/main/java/com/sztzjy/fund_investment/entity/AllotmentObject.java b/src/main/java/com/sztzjy/fund_investment/entity/AllotmentObject.java index 76ac914..cb8d8fb 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/AllotmentObject.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/AllotmentObject.java @@ -1,6 +1,7 @@ package com.sztzjy.fund_investment.entity; import java.util.Date; +import java.util.UUID; import io.swagger.annotations.ApiModelProperty; /** @@ -39,6 +40,22 @@ public class AllotmentObject { @ApiModelProperty("逻辑删除(0、不展示 1、展示)") private Integer logic; + public AllotmentObject(){ + + } + + public AllotmentObject(String flowId){ + this.id= String.valueOf(UUID.randomUUID()); + this.flowId=flowId; + this.allotmentObjectName="测试"; + this.allotmentObjectType="其他"; + this.investorCode=3; + this.investorName="测试"; + this.investorType="合格境外机构投资者"; + this.logic=1; + this.allotmentObjectCode="I000030001"; + } + public String getId() { return id; } diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/AllotmentObjectMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/AllotmentObjectMapper.java index 894835e..37354af 100644 --- a/src/main/java/com/sztzjy/fund_investment/mapper/AllotmentObjectMapper.java +++ b/src/main/java/com/sztzjy/fund_investment/mapper/AllotmentObjectMapper.java @@ -29,4 +29,6 @@ public interface AllotmentObjectMapper { int updateByPrimaryKeySelective(AllotmentObject record); int updateByPrimaryKey(AllotmentObject record); + + List selectByFlowId(String flowId); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/service/InquiryIssuanceService.java b/src/main/java/com/sztzjy/fund_investment/service/InquiryIssuanceService.java index 1614266..c5aad72 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/InquiryIssuanceService.java +++ b/src/main/java/com/sztzjy/fund_investment/service/InquiryIssuanceService.java @@ -13,7 +13,7 @@ import java.util.List; * @date 2023/12/5 8:58 */ public interface InquiryIssuanceService { - PageInfo queryInquiryInvestors(String flowId, Integer size, Integer index); + PageInfo queryInquiryInvestors(String flowId); // List queryBuiltIn(String flowId); diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InquiryIssuanceServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InquiryIssuanceServiceImpl.java index e709791..7a94ae6 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InquiryIssuanceServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InquiryIssuanceServiceImpl.java @@ -44,30 +44,16 @@ public class InquiryIssuanceServiceImpl implements InquiryIssuanceService { PerformanceScoreMapper performanceScoreMapper; @Override - public PageInfo queryInquiryInvestors(String flowId, Integer size, Integer index) { - //开启分页 - PageHelper.startPage(size,index); + public PageInfo queryInquiryInvestors(String flowId) { + AllotmentObjectExample allotmentObjectExample=new AllotmentObjectExample(); allotmentObjectExample.createCriteria().andFlowIdEqualTo(flowId); List allotmentObjects = allotmentObjectMapper.selectByExample(allotmentObjectExample); List allotmentObjectDTOS =new ArrayList<>(); - if(allotmentObjects.isEmpty()){ - AllotmentObjectExample allotmentObjectExample1=new AllotmentObjectExample(); - allotmentObjectExample1.createCriteria().andFlowIdIsNull(); - List list = allotmentObjectMapper.selectByExample(allotmentObjectExample1); - if(list.size()>0){ - for (int i = 0; i < list.size(); i++) { - list.get(i).setId(String.valueOf(UUID.randomUUID())); - list.get(i).setLogic(1); - list.get(i).setFlowId(flowId); - allotmentObjectMapper.insert(list.get(i)); - AllotmentObjectDTO allotmentObjectDTO = convertUtil.entityToDTO(list.get(i), AllotmentObjectDTO.class); - allotmentObjectDTO.setSure("是"); - allotmentObjectDTOS.add(allotmentObjectDTO); - } - } - PageInfo pageInfo=new PageInfo<>(allotmentObjectDTOS); - return pageInfo; + if(allotmentObjects.isEmpty()) { + AllotmentObject allotmentObject = new AllotmentObject(flowId); + allotmentObjectMapper.insert(allotmentObject); + allotmentObjects.add(allotmentObject); } for (int i = 0; i < allotmentObjects.size(); i++) { AllotmentObjectDTO allotmentObjectDTO = convertUtil.entityToDTO(allotmentObjects.get(i), AllotmentObjectDTO.class); @@ -345,15 +331,10 @@ public class InquiryIssuanceServiceImpl implements InquiryIssuanceService { inquiryParticipation.setRemark(inquiryParticipation.getRemark()); inquiryParticipation1.setDeclarationPrice(inquiryParticipation.getDeclarationPrice()); inquiryParticipation1.setIntendedSubscriptionQuantity(inquiryParticipation.getIntendedSubscriptionQuantity()); + inquiryParticipation1.setStatus("1"); inquiryParticipationMapper.updateByPrimaryKey(inquiryParticipation1); - PerformanceScoreExample performanceScoreExample=new PerformanceScoreExample(); - performanceScoreExample.createCriteria().andFlowIdEqualTo(inquiryParticipation.getFlowId()); - List performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); - if(performanceScores.size()>0){ - if(performanceScores.get(0).getInitPricingIssuanceScore()==null){ - performanceScoreService.calculateScoreByModule("initPricingIssuanceScore",2,inquiryParticipation.getFlowId()); - } - } + //计入分数 + performanceScoreService.calculateScoreByModule("initPricingIssuanceScore",2,inquiryParticipation.getFlowId()); } } diff --git a/src/main/resources/mappers/AllotmentObjectMapper.xml b/src/main/resources/mappers/AllotmentObjectMapper.xml deleted file mode 100644 index df4bdf0..0000000 --- a/src/main/resources/mappers/AllotmentObjectMapper.xml +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, allotment_object_code, flow_id, allotment_object_name, allotment_object_type, - investor_code, investor_name, investor_type, create_time, logic - - - - - delete from allotment_object - where id = #{id,jdbcType=VARCHAR} - - - delete from allotment_object - - - - - - insert into allotment_object (id, allotment_object_code, flow_id, - allotment_object_name, allotment_object_type, - investor_code, investor_name, investor_type, - create_time, logic) - values (#{id,jdbcType=VARCHAR}, #{allotmentObjectCode,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, - #{allotmentObjectName,jdbcType=VARCHAR}, #{allotmentObjectType,jdbcType=VARCHAR}, - #{investorCode,jdbcType=INTEGER}, #{investorName,jdbcType=VARCHAR}, #{investorType,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, #{logic,jdbcType=INTEGER}) - - - insert into allotment_object - - - id, - - - allotment_object_code, - - - flow_id, - - - allotment_object_name, - - - allotment_object_type, - - - investor_code, - - - investor_name, - - - investor_type, - - - create_time, - - - logic, - - - - - #{id,jdbcType=VARCHAR}, - - - #{allotmentObjectCode,jdbcType=VARCHAR}, - - - #{flowId,jdbcType=VARCHAR}, - - - #{allotmentObjectName,jdbcType=VARCHAR}, - - - #{allotmentObjectType,jdbcType=VARCHAR}, - - - #{investorCode,jdbcType=INTEGER}, - - - #{investorName,jdbcType=VARCHAR}, - - - #{investorType,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{logic,jdbcType=INTEGER}, - - - - - - update allotment_object - - - id = #{record.id,jdbcType=VARCHAR}, - - - allotment_object_code = #{record.allotmentObjectCode,jdbcType=VARCHAR}, - - - flow_id = #{record.flowId,jdbcType=VARCHAR}, - - - allotment_object_name = #{record.allotmentObjectName,jdbcType=VARCHAR}, - - - allotment_object_type = #{record.allotmentObjectType,jdbcType=VARCHAR}, - - - investor_code = #{record.investorCode,jdbcType=INTEGER}, - - - investor_name = #{record.investorName,jdbcType=VARCHAR}, - - - investor_type = #{record.investorType,jdbcType=VARCHAR}, - - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - - - logic = #{record.logic,jdbcType=INTEGER}, - - - - - - - - update allotment_object - set id = #{record.id,jdbcType=VARCHAR}, - allotment_object_code = #{record.allotmentObjectCode,jdbcType=VARCHAR}, - flow_id = #{record.flowId,jdbcType=VARCHAR}, - allotment_object_name = #{record.allotmentObjectName,jdbcType=VARCHAR}, - allotment_object_type = #{record.allotmentObjectType,jdbcType=VARCHAR}, - investor_code = #{record.investorCode,jdbcType=INTEGER}, - investor_name = #{record.investorName,jdbcType=VARCHAR}, - investor_type = #{record.investorType,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - logic = #{record.logic,jdbcType=INTEGER} - - - - - - update allotment_object - - - allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR}, - - - flow_id = #{flowId,jdbcType=VARCHAR}, - - - allotment_object_name = #{allotmentObjectName,jdbcType=VARCHAR}, - - - allotment_object_type = #{allotmentObjectType,jdbcType=VARCHAR}, - - - investor_code = #{investorCode,jdbcType=INTEGER}, - - - investor_name = #{investorName,jdbcType=VARCHAR}, - - - investor_type = #{investorType,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - logic = #{logic,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=VARCHAR} - - - update allotment_object - set allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR}, - flow_id = #{flowId,jdbcType=VARCHAR}, - allotment_object_name = #{allotmentObjectName,jdbcType=VARCHAR}, - allotment_object_type = #{allotmentObjectType,jdbcType=VARCHAR}, - investor_code = #{investorCode,jdbcType=INTEGER}, - investor_name = #{investorName,jdbcType=VARCHAR}, - investor_type = #{investorType,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - logic = #{logic,jdbcType=INTEGER} - where id = #{id,jdbcType=VARCHAR} - - \ No newline at end of file From 71194f4d8af2f6260c0f58a654660cb86807bf68 Mon Sep 17 00:00:00 2001 From: "@t2652009480" <2652009480@qq.com> Date: Thu, 7 Mar 2024 13:56:56 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=A2=E4=BB=B7=E5=8F=91=E8=A1=8C--?= =?UTF-8?q?=E6=95=B4=E4=BD=93=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InquiryIssuanceServiceImpl.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InquiryIssuanceServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InquiryIssuanceServiceImpl.java index 7a94ae6..43e36ac 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InquiryIssuanceServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InquiryIssuanceServiceImpl.java @@ -271,7 +271,11 @@ public class InquiryIssuanceServiceImpl implements InquiryIssuanceService { @Override public void basicInformationStorage(String objectivityEvaluation, Integer overallEvaluation, String valuationMethodRationalityEvaluation, String operator, BigDecimal declarationPrice,String flowId) { - InquiryParticipation inquiryParticipation=new InquiryParticipation(); + InquiryParticipationExample example = new InquiryParticipationExample(); + example.createCriteria().andFlowIdEqualTo(flowId); + List inquiryParticipations = inquiryParticipationMapper.selectByExample(example); + if(inquiryParticipations.isEmpty()){ + InquiryParticipation inquiryParticipation = new InquiryParticipation(); inquiryParticipation.setId(String.valueOf(UUID.randomUUID())); inquiryParticipation.setObjectivityEvaluation(objectivityEvaluation); inquiryParticipation.setValuationMethodRationalityEvaluation(valuationMethodRationalityEvaluation); @@ -281,6 +285,20 @@ public class InquiryIssuanceServiceImpl implements InquiryIssuanceService { inquiryParticipation.setFlowId(flowId); inquiryParticipation.setStatus("0"); inquiryParticipationMapper.insert(inquiryParticipation); + }else { + InquiryParticipation inquiryParticipation = inquiryParticipations.get(0); + if(!inquiryParticipation.getStatus().equals("0")){ + throw new RuntimeException("已提交报价无法更改"); + } + inquiryParticipation.setObjectivityEvaluation(objectivityEvaluation); + inquiryParticipation.setValuationMethodRationalityEvaluation(valuationMethodRationalityEvaluation); + inquiryParticipation.setOverallEvaluation(overallEvaluation); + inquiryParticipation.setOperator(operator); + inquiryParticipation.setDeclarationPrice(declarationPrice); + inquiryParticipation.setFlowId(flowId); + inquiryParticipationMapper.updateByPrimaryKey(inquiryParticipation); + } + } @Override