询价发行--整体修改

master
@t2652009480 1 year ago
parent 61337238af
commit 2d6cb45ef3

@ -47,10 +47,8 @@ public class InquiryIssuanceController {
@AnonymousAccess
@GetMapping("/queryInquiryInvestors")
@ApiOperation("询价投资者查看")
public ResultEntity<PageInfo<AllotmentObjectDTO>> queryInquiryInvestors(@ApiParam("流程ID") String flowId,
@ApiParam("每页条数") Integer size,
@ApiParam("当前页") Integer index){
PageInfo<AllotmentObjectDTO> pageInfo=inquiryIssuanceService.queryInquiryInvestors(flowId,size,index);
public ResultEntity<PageInfo<AllotmentObjectDTO>> queryInquiryInvestors(String flowId){
PageInfo<AllotmentObjectDTO> 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,"保存成功");

@ -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;
}

@ -29,4 +29,6 @@ public interface AllotmentObjectMapper {
int updateByPrimaryKeySelective(AllotmentObject record);
int updateByPrimaryKey(AllotmentObject record);
List<AllotmentObject> selectByFlowId(String flowId);
}

@ -13,7 +13,7 @@ import java.util.List;
* @date 2023/12/5 8:58
*/
public interface InquiryIssuanceService {
PageInfo<AllotmentObjectDTO> queryInquiryInvestors(String flowId, Integer size, Integer index);
PageInfo<AllotmentObjectDTO> queryInquiryInvestors(String flowId);
// List<AllotmentObject> queryBuiltIn(String flowId);

@ -44,30 +44,16 @@ public class InquiryIssuanceServiceImpl implements InquiryIssuanceService {
PerformanceScoreMapper performanceScoreMapper;
@Override
public PageInfo<AllotmentObjectDTO> queryInquiryInvestors(String flowId, Integer size, Integer index) {
//开启分页
PageHelper.startPage(size,index);
public PageInfo<AllotmentObjectDTO> queryInquiryInvestors(String flowId) {
AllotmentObjectExample allotmentObjectExample=new AllotmentObjectExample();
allotmentObjectExample.createCriteria().andFlowIdEqualTo(flowId);
List<AllotmentObject> allotmentObjects = allotmentObjectMapper.selectByExample(allotmentObjectExample);
List<AllotmentObjectDTO> allotmentObjectDTOS =new ArrayList<>();
if(allotmentObjects.isEmpty()){
AllotmentObjectExample allotmentObjectExample1=new AllotmentObjectExample();
allotmentObjectExample1.createCriteria().andFlowIdIsNull();
List<AllotmentObject> 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<AllotmentObjectDTO> 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<PerformanceScore> 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());
}
}

@ -1,291 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.fund_investment.mapper.AllotmentObjectMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.AllotmentObject">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="allotment_object_code" jdbcType="VARCHAR" property="allotmentObjectCode" />
<result column="flow_id" jdbcType="VARCHAR" property="flowId" />
<result column="allotment_object_name" jdbcType="VARCHAR" property="allotmentObjectName" />
<result column="allotment_object_type" jdbcType="VARCHAR" property="allotmentObjectType" />
<result column="investor_code" jdbcType="INTEGER" property="investorCode" />
<result column="investor_name" jdbcType="VARCHAR" property="investorName" />
<result column="investor_type" jdbcType="VARCHAR" property="investorType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="logic" jdbcType="INTEGER" property="logic" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, allotment_object_code, flow_id, allotment_object_name, allotment_object_type,
investor_code, investor_name, investor_type, create_time, logic
</sql>
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.AllotmentObjectExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from allotment_object
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from allotment_object
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from allotment_object
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.AllotmentObjectExample">
delete from allotment_object
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.AllotmentObject">
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>
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.AllotmentObject">
insert into allotment_object
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="allotmentObjectCode != null">
allotment_object_code,
</if>
<if test="flowId != null">
flow_id,
</if>
<if test="allotmentObjectName != null">
allotment_object_name,
</if>
<if test="allotmentObjectType != null">
allotment_object_type,
</if>
<if test="investorCode != null">
investor_code,
</if>
<if test="investorName != null">
investor_name,
</if>
<if test="investorType != null">
investor_type,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="logic != null">
logic,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="allotmentObjectCode != null">
#{allotmentObjectCode,jdbcType=VARCHAR},
</if>
<if test="flowId != null">
#{flowId,jdbcType=VARCHAR},
</if>
<if test="allotmentObjectName != null">
#{allotmentObjectName,jdbcType=VARCHAR},
</if>
<if test="allotmentObjectType != null">
#{allotmentObjectType,jdbcType=VARCHAR},
</if>
<if test="investorCode != null">
#{investorCode,jdbcType=INTEGER},
</if>
<if test="investorName != null">
#{investorName,jdbcType=VARCHAR},
</if>
<if test="investorType != null">
#{investorType,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="logic != null">
#{logic,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.AllotmentObjectExample" resultType="java.lang.Long">
select count(*) from allotment_object
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update allotment_object
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.allotmentObjectCode != null">
allotment_object_code = #{record.allotmentObjectCode,jdbcType=VARCHAR},
</if>
<if test="record.flowId != null">
flow_id = #{record.flowId,jdbcType=VARCHAR},
</if>
<if test="record.allotmentObjectName != null">
allotment_object_name = #{record.allotmentObjectName,jdbcType=VARCHAR},
</if>
<if test="record.allotmentObjectType != null">
allotment_object_type = #{record.allotmentObjectType,jdbcType=VARCHAR},
</if>
<if test="record.investorCode != null">
investor_code = #{record.investorCode,jdbcType=INTEGER},
</if>
<if test="record.investorName != null">
investor_name = #{record.investorName,jdbcType=VARCHAR},
</if>
<if test="record.investorType != null">
investor_type = #{record.investorType,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.logic != null">
logic = #{record.logic,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.AllotmentObject">
update allotment_object
<set>
<if test="allotmentObjectCode != null">
allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR},
</if>
<if test="flowId != null">
flow_id = #{flowId,jdbcType=VARCHAR},
</if>
<if test="allotmentObjectName != null">
allotment_object_name = #{allotmentObjectName,jdbcType=VARCHAR},
</if>
<if test="allotmentObjectType != null">
allotment_object_type = #{allotmentObjectType,jdbcType=VARCHAR},
</if>
<if test="investorCode != null">
investor_code = #{investorCode,jdbcType=INTEGER},
</if>
<if test="investorName != null">
investor_name = #{investorName,jdbcType=VARCHAR},
</if>
<if test="investorType != null">
investor_type = #{investorType,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="logic != null">
logic = #{logic,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.AllotmentObject">
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}
</update>
</mapper>
Loading…
Cancel
Save