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