Browse Source

个贷口估接口修改

wucl 3 months ago
parent
commit
4b0c9e03ab

+ 1 - 0
biz-base/src/main/java/com/dayou/controller/DyoaController.java

@@ -167,6 +167,7 @@ public class DyoaController {
         return RestResponse.data(ret);
     }
 
+    //todo  改成定时任务
     @IgnoreAuth
     @GetMapping("/update/commission/productionId")
     public RestResponse<Boolean> commissionProductionId(){

+ 3 - 2
biz-base/src/main/java/com/dayou/controller/PersonalFacePriceController.java

@@ -4,6 +4,7 @@ import com.dayou.common.RestResponse;
 import com.dayou.dto.PersonalFacePriceQueryDTO;
 import com.dayou.service.IPersonalFacePriceService;
 import com.dayou.vo.DayouPersonalPriceVO;
+import com.dayou.vo.ExternalFacePriceVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -38,8 +39,8 @@ public class PersonalFacePriceController extends BaseController {
      * @return
      */
     @PostMapping("/external/price")
-    public RestResponse<List<DayouPersonalPriceVO>> externalPersonalPrice(@RequestBody PersonalFacePriceQueryDTO facePriceQuery) {
-        List<DayouPersonalPriceVO> ret = personalFacePriceService.externalPersonalPrice(facePriceQuery);
+    public RestResponse<ExternalFacePriceVO> externalPersonalPrice(@RequestBody PersonalFacePriceQueryDTO facePriceQuery) {
+        ExternalFacePriceVO ret = personalFacePriceService.externalPersonalPrice(facePriceQuery);
         return RestResponse.success(ret);
     }
 }

+ 2 - 1
common/src/main/java/com/dayou/utils/AddressUtil.java

@@ -158,8 +158,9 @@ public class AddressUtil {
 
 
     public static void main(String[] args) {
-        String location = "成都市天府新区万安镇麓山大道二段20号附9号麓山国际社区3栋2单元2层3号住宅";
+        String location = "四川省成都市锦江区四海逸家三期四海逸家三期2号楼2单元1101";
         //String location = "成都市天府新区万安镇麓山大道二段20号附9号麓山国际3栋2单元2层3号住宅";
+        System.out.println(getRoadNumberAddress(location));
         AddressDTO addressDTO = AddressUtil.parseAddress(location);
         String roadAndRoadNumber = AddressUtil.getRoadAndRoadNumber(location);
         System.out.println(roadAndRoadNumber);

+ 27 - 0
common/src/main/java/com/dayou/utils/DateUtils.java

@@ -2,6 +2,7 @@ package com.dayou.utils;
 
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
 import org.apache.commons.lang3.time.DateFormatUtils;
 
 import java.lang.management.ManagementFactory;
@@ -519,5 +520,31 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
         return (eYear-sYear)*12 + (eMonth-sMonth);
     }
 
+    /**
+     *
+     * @param limit : 两年、一年、半年、三个月、一个月
+     * @return
+     */
+    public static Date facePriceLimitDate(String limit){
+        if (StrUtil.isBlank(limit)){
+            return DateUtils.addYears(new Date(),-1);
+        }
+        switch (limit){
+            case "两年内":
+                return DateUtils.addYears(new Date(),-2);
+            case "一年内":
+                return DateUtils.addYears(new Date(),-1);
+            case "半年内":
+                return DateUtils.addMonths(new Date(),-6);
+            case "三月内":
+                return DateUtils.addMonths(new Date(),-3);
+            case "一月内":
+                return DateUtils.addMonths(new Date(),-1);
+            default:
+                return DateUtils.addYears(new Date(),-1);
+        }
+
+    }
+
 
 }

+ 5 - 4
dao/src/main/java/com/dayou/mapper/ExternalDyDataBaseMapper.java

@@ -3,15 +3,16 @@ package com.dayou.mapper;
 import com.dayou.vo.ExternalPersonalVO;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Date;
 import java.util.List;
 
 public interface ExternalDyDataBaseMapper {
 
-    List<ExternalPersonalVO> queryQiYuDealPrice(@Param("communityNames") List<String> communityNames);
+    List<ExternalPersonalVO> queryQiYuDealPrice(@Param("communityNames") List<String> communityNames,@Param("startDate") Date startDate);
 
-    List<ExternalPersonalVO> queryQiYuUpPrice(@Param("communityNames") List<String> communityNames);
+    List<ExternalPersonalVO> queryQiYuUpPrice(@Param("communityNames") List<String> communityNames,@Param("startDate")Date startDate);
 
-    List<ExternalPersonalVO> queryLianJiaDealPrice(@Param("communityNames") List<String> communityNames);
+    List<ExternalPersonalVO> queryLianJiaDealPrice(@Param("communityNames") List<String> communityNames,@Param("startDate")Date startDate);
 
-    List<ExternalPersonalVO> queryLianJiaUpPrice(@Param("communityNames") List<String> communityNames);
+    List<ExternalPersonalVO> queryLianJiaUpPrice(@Param("communityNames") List<String> communityNames,@Param("startDate")Date startDate);
 }

+ 80 - 9
dao/src/main/resources/mapper/ExternalDyDataBaseMapper.xml

@@ -2,21 +2,92 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.dayou.mapper.ExternalDyDataBaseMapper">
 
-    <select id="queryQiYuDealPrice" parameterType="java.util.List" resultType="com.dayou.vo.ExternalPersonalVO">
-        select * from data_data_qiyu_deal
-            <where>
-                <foreach collection="communityNames" index="index" separator="or" item="item">
-                   houses like concat('%', #{item},'%')
-                </foreach>
-            </where>
+    <select id="queryQiYuDealPrice"  resultType="com.dayou.vo.ExternalPersonalVO">
+        SELECT
+            cityName,
+            areaName,
+            houses AS communityName,
+            buildArea AS acreage,
+            decoration,
+            dealDate,
+            floor,
+            roomType AS houseType,
+            price,
+            ROUND(price * buildArea,2) as amount,
+            orientation,
+            structure,
+            usages AS useType ,
+            '七鱼成交' as dataResource
+        FROM
+            data_data_qiyu_deal
+        WHERE
+            dealDate &gt;= #{startDate} and price is not null
+          AND (
+        <foreach collection="communityNames" index="index" separator="or" item="item">
+            houses like concat('%', #{item},'%')
+        </foreach>
+            )
+        ORDER BY
+            dealDate DESC
+            limit 10
     </select>
 
     <select id="queryQiYuUpPrice" parameterType="java.util.List" resultType="com.dayou.vo.ExternalPersonalVO">
-
+        SELECT
+        cityName,
+        areaName,
+        houses AS communityName,
+        buildArea AS acreage,
+        decoration,
+        up_date,
+        floorInfo as floor,
+        roomType AS houseType,
+        price,
+        orientation,
+        structure,
+        usages AS useType ,
+        ROUND(price * buildArea,2) as amount,
+        '七鱼挂牌' as dataResource
+        FROM
+        data_data_qiyu_up
+        WHERE
+        up_date &gt;= #{startDate} and price is not null
+        AND (
+        <foreach collection="communityNames" index="index" separator="or" item="item">
+            houses like concat('%', #{item},'%')
+        </foreach>
+        )
+        ORDER BY
+        up_date DESC
+        limit 10
     </select>
 
     <select id="queryLianJiaDealPrice" parameterType="java.util.List" resultType="com.dayou.vo.ExternalPersonalVO">
-
+        SELECT
+        cityName,
+        areaName,
+        bizName as businessName,
+        houses AS communityName,
+        buildArea AS acreage,
+        decorate as decoration,
+        dealDate,
+        dealMoney as amount,
+        floorInfo,
+        roomType AS houseType,
+        dealPrice as price,
+        '链家成交' as dataResource
+        FROM
+        db_data_lianjia
+        WHERE
+        dealDate &gt;= #{startDate} and dealPrice is not null
+        AND (
+        <foreach collection="communityNames" index="index" separator="or" item="item">
+            houses like concat('%', #{item},'%')
+        </foreach>
+        )
+        ORDER BY
+        dealDate DESC
+        limit 10
     </select>
 
     <select id="queryLianJiaUpPrice" parameterType="java.util.List" resultType="com.dayou.vo.ExternalPersonalVO">

+ 3 - 4
domain/src/main/java/com/dayou/dto/PersonalFacePriceQueryDTO.java

@@ -4,8 +4,6 @@ import com.github.liangbaika.validate.annations.AbcValidate;
 import com.github.liangbaika.validate.enums.Check;
 import lombok.Data;
 
-import java.math.BigDecimal;
-import java.util.Date;
 
 @Data
 public class PersonalFacePriceQueryDTO {
@@ -17,8 +15,9 @@ public class PersonalFacePriceQueryDTO {
     private String location;
 
     /**
-     * 面积
+     * 时间范围
      */
-    private BigDecimal acreage;
+    @AbcValidate(required = true,message = "时间范围不能为空" , fun = Check.NotEmpty)
+    private String limit;
 
 }

+ 3 - 2
domain/src/main/java/com/dayou/enums/GlobalConfigEnum.java

@@ -51,8 +51,9 @@ public enum GlobalConfigEnum implements CodeMsgEnumInterface<String,CodeMsgEnumI
     }
 
     public enum Sys implements CodeMsgEnumInterface<String,String>{
-
-
+        FACE_PRICE_TIME_PARAM("FACE_PRICE_TIME_PARAM","1","个贷口估时间修正参数"),
+        FACE_PRICE_ACREAGE_PARAM("FACE_PRICE_ACREAGE_PARAM","1","个贷口估面积修正参数"),
+        FACE_PRICE_OVERALL_PARAM("FACE_PRICE_OVERALL_PARAM","1","个贷口估综合修正参数")
         ;
         private String filed;
 

+ 2 - 1
domain/src/main/java/com/dayou/vo/DayouPersonalPriceVO.java

@@ -3,6 +3,7 @@ package com.dayou.vo;
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.*;
 
 /**
@@ -34,7 +35,7 @@ public class DayouPersonalPriceVO implements Comparable<DayouPersonalPriceVO> {
     /**
      * 价值时点
      */
-    private Date valueTiming;
+    private LocalDate valueTiming;
 
     /**
      * 评估单价

+ 50 - 0
domain/src/main/java/com/dayou/vo/ExternalFacePriceVO.java

@@ -0,0 +1,50 @@
+package com.dayou.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class ExternalFacePriceVO {
+
+    /**
+     * 系统成交价
+     */
+    private BigDecimal dealPrice;
+    /**
+     * 系统挂牌价
+     */
+    private BigDecimal upPrice;
+
+    /**
+     * 成交均价
+     */
+    private BigDecimal dealAvgPrice;
+
+    /**
+     * 挂牌均价
+     */
+    private BigDecimal upAvgPrice;
+    /**
+     * 成交数据
+     */
+    private List<ExternalPersonalVO> deals;
+
+    /**
+     * 挂牌数据
+     */
+    private List<ExternalPersonalVO> ups;
+    /**
+     * 时间修正参数
+     */
+    private String timeParam;
+    /**
+     * 面积修正参数
+     */
+    private String acreageParam;
+    /**
+     * 综合修正参数
+     */
+    private String overAllParam;
+}

+ 13 - 2
domain/src/main/java/com/dayou/vo/ExternalPersonalVO.java

@@ -3,6 +3,7 @@ package com.dayou.vo;
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.Date;
 
 @Data
@@ -20,6 +21,11 @@ public class ExternalPersonalVO {
      * 区域名字
      */
     private String areaName;
+
+    /**
+     * 板块名称
+     */
+    private String businessName;
     /**
      * 城市名字
      */
@@ -52,6 +58,11 @@ public class ExternalPersonalVO {
      * 户型
      */
     private String houseType;
+
+    /**
+     * 朝向
+     */
+    private String orientation;
     /**
      * 建筑结构
      */
@@ -59,11 +70,11 @@ public class ExternalPersonalVO {
     /**
      * 成交日期
      */
-    private Date dealDate;
+    private LocalDate dealDate;
     /**
      * 挂牌日期
      */
-    private Date upDate;
+    private LocalDate upDate;
 
     /**
      * 数据源类型

+ 2 - 1
service/src/main/java/com/dayou/dyoa/DyoaHistoryServiceImpl.java

@@ -1663,7 +1663,8 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
     public Boolean updateMajorProduction() {
         List<HisMajorProduction> allProductionNo = dyoaHistoryMapper.findAllProductionNo();
         for (HisMajorProduction productionNo : allProductionNo){
-            List<MajorProduction> list = majorProductionService.list(new LambdaQueryWrapper<MajorProduction>().select(BaseEntity::getId).eq(MajorProduction::getReportNo, productionNo.getReportNo()));
+            List<MajorProduction> list = majorProductionService.list(new LambdaQueryWrapper<MajorProduction>()
+                    .select(BaseEntity::getId,MajorProduction::getSaveFileDate,MajorProduction::getDeliveryDate).eq(MajorProduction::getReportNo, productionNo.getReportNo()));
             if (CollectionUtil.isEmpty(list)){
                 DyoaRecord record = dyoaRecordService.getOne(new LambdaQueryWrapper<DyoaRecord>().eq(DyoaRecord::getDyoaId, productionNo.getId()).eq(DyoaRecord::getMbsType, "MAJOR_ORDER"));
                 if (record != null){

+ 9 - 1
service/src/main/java/com/dayou/service/IExternalDyDataBaseService.java

@@ -2,6 +2,7 @@ package com.dayou.service;
 
 import com.dayou.vo.ExternalPersonalVO;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -10,5 +11,12 @@ import java.util.List;
 public interface IExternalDyDataBaseService {
 
 
-    List<ExternalPersonalVO> externalPriceByCommunityName(List<String> communityNames);
+    List<ExternalPersonalVO> externalPriceQiYuDeal(List<String> communityNames, Date startDate);
+
+    List<ExternalPersonalVO> externalPriceQiYuUp(List<String> communityNames, Date startDate);
+
+    List<ExternalPersonalVO> externalPriceLianJiaDeal(List<String> communityNames, Date startDate);
+
+    List<ExternalPersonalVO> externalPriceLianJiaUp(List<String> communityNames, Date startDate);
+
 }

+ 2 - 1
service/src/main/java/com/dayou/service/IPersonalFacePriceService.java

@@ -2,6 +2,7 @@ package com.dayou.service;
 
 import com.dayou.dto.PersonalFacePriceQueryDTO;
 import com.dayou.vo.DayouPersonalPriceVO;
+import com.dayou.vo.ExternalFacePriceVO;
 
 import java.util.List;
 
@@ -19,5 +20,5 @@ public interface IPersonalFacePriceService {
      * @param facePriceQuery
      * @return
      */
-    List<DayouPersonalPriceVO> externalPersonalPrice(PersonalFacePriceQueryDTO facePriceQuery);
+    ExternalFacePriceVO externalPersonalPrice(PersonalFacePriceQueryDTO facePriceQuery);
 }

+ 1 - 1
service/src/main/java/com/dayou/service/impl/AssetsServiceImpl.java

@@ -711,7 +711,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
 
     @Override
     public List<Assets> getMembersIsNull() {
-        return assetsMapper.selectList(new LambdaQueryWrapper<Assets>().isNull(Assets::getMembers).select(BaseEntity::getId,Assets::getOrderId));
+        return assetsMapper.selectList(new LambdaQueryWrapper<Assets>().select(BaseEntity::getId,Assets::getOrderId));
     }
 
     @Override

+ 21 - 16
service/src/main/java/com/dayou/service/impl/ExternalDyDataBaseServiceImpl.java

@@ -1,16 +1,12 @@
 package com.dayou.service.impl;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
-import com.dayou.dto.PersonalFacePriceQueryDTO;
 import com.dayou.mapper.ExternalDyDataBaseMapper;
 import com.dayou.service.IExternalDyDataBaseService;
-import com.dayou.vo.DayouPersonalPriceVO;
 import com.dayou.vo.ExternalPersonalVO;
-import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
@@ -22,17 +18,26 @@ public class ExternalDyDataBaseServiceImpl implements IExternalDyDataBaseService
     private ExternalDyDataBaseMapper externalDyDataBaseMapper;
 
     @Override
-    public List<ExternalPersonalVO> externalPriceByCommunityName(List<String> communityNames){
-
-        //1.七鱼成交
-        List<ExternalPersonalVO> qyDeals = externalDyDataBaseMapper.queryQiYuDealPrice(communityNames);
-        //2.七鱼挂牌
-        List<ExternalPersonalVO> qyUps = externalDyDataBaseMapper.queryQiYuUpPrice(communityNames);
-        //3.链家成交
-        List<ExternalPersonalVO> ljDeals = externalDyDataBaseMapper.queryLianJiaDealPrice(communityNames);
-        //4.链家挂牌
-        List<ExternalPersonalVO> ljUps = externalDyDataBaseMapper.queryLianJiaUpPrice(communityNames);
-
-        return Collections.emptyList();
+    public List<ExternalPersonalVO> externalPriceQiYuDeal(List<String> communityNames, Date startDate) {
+        //七鱼成交
+        return externalDyDataBaseMapper.queryQiYuDealPrice(communityNames,startDate);
+    }
+
+    @Override
+    public List<ExternalPersonalVO> externalPriceQiYuUp(List<String> communityNames, Date startDate) {
+        //七鱼挂牌
+        return externalDyDataBaseMapper.queryQiYuUpPrice(communityNames,startDate);
+    }
+
+    @Override
+    public List<ExternalPersonalVO> externalPriceLianJiaDeal(List<String> communityNames, Date startDate) {
+        //链家成交
+        return externalDyDataBaseMapper.queryLianJiaDealPrice(communityNames,startDate);
+    }
+
+    @Override
+    public List<ExternalPersonalVO> externalPriceLianJiaUp(List<String> communityNames, Date startDate) {
+        //链家挂牌
+        return externalDyDataBaseMapper.queryLianJiaUpPrice(communityNames,startDate);
     }
 }

+ 56 - 8
service/src/main/java/com/dayou/service/impl/PersonalFacePriceServiceImpl.java

@@ -4,19 +4,27 @@ import cn.hutool.core.util.StrUtil;
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.dayou.dto.AddressDTO;
 import com.dayou.dto.PersonalFacePriceQueryDTO;
+import com.dayou.enums.GlobalConfigEnum;
 import com.dayou.mapper.PersonalFacePriceMapper;
 import com.dayou.service.IExternalDyDataBaseService;
+import com.dayou.service.IGlobalConfigService;
 import com.dayou.service.IPersonalFacePriceService;
 import com.dayou.utils.AddressUtil;
 import com.dayou.utils.DateUtils;
 import com.dayou.vo.DayouPersonalPriceVO;
+import com.dayou.vo.ExternalFacePriceVO;
 import com.dayou.vo.ExternalPersonalVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.*;
 import java.util.stream.Collectors;
 
+import static com.dayou.enums.GlobalConfigEnum.SYS;
+import static com.dayou.enums.GlobalConfigEnum.Sys.*;
+
 @Service
 public class PersonalFacePriceServiceImpl implements IPersonalFacePriceService {
 
@@ -26,10 +34,13 @@ public class PersonalFacePriceServiceImpl implements IPersonalFacePriceService {
     @Autowired
     private IExternalDyDataBaseService externalDyDataBaseService;
 
+    @Autowired
+    private IGlobalConfigService globalConfigService;
+
     @Override
     public List<DayouPersonalPriceVO> dayouPersonalPrice(PersonalFacePriceQueryDTO facePriceQuery) {
         //获取配置的价值点范围
-        Date startDate = DateUtils.addYears(new Date(),-1);
+        Date startDate = DateUtils.facePriceLimitDate(facePriceQuery.getLimit());
         //查询策略1:全地址查询
         String location = facePriceQuery.getLocation();
         AddressDTO targetAddress = AddressUtil.parseAddress(location);
@@ -70,12 +81,10 @@ public class PersonalFacePriceServiceImpl implements IPersonalFacePriceService {
     }
 
     @Override
-    public List<DayouPersonalPriceVO> externalPersonalPrice(PersonalFacePriceQueryDTO facePriceQuery) {
-        //获取配置的价值点范围
-        Date startDate = DateUtils.addYears(new Date(),-1);
-        String location = facePriceQuery.getLocation();
+    public ExternalFacePriceVO externalPersonalPrice(PersonalFacePriceQueryDTO facePriceQuery) {
 
-        AddressDTO targetAddress = AddressUtil.parseAddress(location);
+        Date startDate = DateUtils.facePriceLimitDate(facePriceQuery.getLimit());
+        String location = facePriceQuery.getLocation();
 
         //获取全路名 查询小区名称
         String roadNumberAddress = AddressUtil.getRoadNumberAddress(location);
@@ -95,8 +104,47 @@ public class PersonalFacePriceServiceImpl implements IPersonalFacePriceService {
         }
 
         List<String> communityNames = communityName1.stream().distinct().collect(Collectors.toList());
-        List<ExternalPersonalVO> externalPersonalVOS = externalDyDataBaseService.externalPriceByCommunityName(communityNames);
-        return null;
+
+        //成交价
+        List<ExternalPersonalVO> qiYuDeal = externalDyDataBaseService.externalPriceQiYuDeal(communityNames,startDate);
+        List<ExternalPersonalVO> lianJiaDeal = externalDyDataBaseService.externalPriceLianJiaDeal(communityNames, startDate);
+
+        //挂牌价
+        List<ExternalPersonalVO> qiYuUp = externalDyDataBaseService.externalPriceQiYuUp(communityNames, startDate);
+
+        //时间修正参数、面价修正参数、综合修正参数
+        String time = StrUtil.isBlank(globalConfigService.getValue(SYS.getCode(), FACE_PRICE_TIME_PARAM.getCode()))?"1":globalConfigService.getValue(SYS.getCode(), FACE_PRICE_TIME_PARAM.getCode());
+        String acreage = StrUtil.isBlank(globalConfigService.getValue(SYS.getCode(), FACE_PRICE_ACREAGE_PARAM.getCode()))?"1":globalConfigService.getValue(SYS.getCode(), FACE_PRICE_ACREAGE_PARAM.getCode());
+        String overall = StrUtil.isBlank(globalConfigService.getValue(SYS.getCode(), FACE_PRICE_OVERALL_PARAM.getCode()))?"1":globalConfigService.getValue(SYS.getCode(), FACE_PRICE_OVERALL_PARAM.getCode());
+
+        //修正成交价
+        qiYuDeal.addAll(lianJiaDeal);
+        List<BigDecimal> dealPrices = qiYuDeal.stream().map(ExternalPersonalVO::getPrice).collect(Collectors.toList());
+        double reduce = dealPrices.stream().mapToDouble(BigDecimal::doubleValue).reduce(0, Double::sum);
+        //成交价均值
+        BigDecimal dealPrice = BigDecimal.valueOf(reduce).divide(BigDecimal.valueOf(qiYuDeal.size()==0?1:qiYuDeal.size()), 0, RoundingMode.HALF_UP);
+        //修正
+        BigDecimal xDealPrice = dealPrice.multiply(new BigDecimal(time)).multiply(new BigDecimal(acreage)).multiply(new BigDecimal(overall)).setScale(2, RoundingMode.HALF_UP);
+
+        //修正挂牌价
+        List<BigDecimal> upPrices = qiYuUp.stream().map(ExternalPersonalVO::getPrice).collect(Collectors.toList());
+        double reduce2 = upPrices.stream().mapToDouble(BigDecimal::doubleValue).reduce(0, Double::sum);
+        //成交价均值
+        BigDecimal upPrice = BigDecimal.valueOf(reduce2).divide(BigDecimal.valueOf(upPrices.size()==0?1: upPrices.size()), 0, RoundingMode.HALF_UP);
+        //修正
+        BigDecimal xUplPrice = upPrice.multiply(new BigDecimal(time)).multiply(new BigDecimal(acreage)).multiply(new BigDecimal(overall)).setScale(0, BigDecimal.ROUND_HALF_UP);
+
+        ExternalFacePriceVO facePriceVO = new ExternalFacePriceVO();
+        facePriceVO.setDealPrice(xDealPrice);
+        facePriceVO.setUpPrice(xUplPrice);
+        facePriceVO.setDeals(qiYuDeal);
+        facePriceVO.setUps(qiYuUp);
+        facePriceVO.setTimeParam(time);
+        facePriceVO.setAcreageParam(acreage);
+        facePriceVO.setOverAllParam(overall);
+        facePriceVO.setDealAvgPrice(dealPrice);
+        facePriceVO.setUpAvgPrice(upPrice);
+        return facePriceVO;
     }