Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gsc
/
gsc-vcp-pad-facade
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ed4fcf6f
authored
Apr 01, 2026
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v5.7.0' into 'master'
上线合并 See merge request
!8
2 parents
99a11cff
c68bcff6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
2 deletions
pom.xml
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/service/evalorder/EvalOrderService.java
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/vo/evalorder/CarLicenseOcrVO.java
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/vo/evalorder/EvalOrderDetailVO.java
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/vo/evalorder/EvalPriceHistoryRoundVO.java
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/vo/evalorder/EvalPriceHistoryVO.java
pom.xml
View file @
ed4fcf6
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<dependency>
<dependency>
<groupId>
com.gsc4cloud
</groupId>
<groupId>
com.gsc4cloud
</groupId>
<artifactId>
gsc-vcp-api
</artifactId>
<artifactId>
gsc-vcp-api
</artifactId>
<version>
1.0.
5
-SNAPSHOT
</version>
<version>
1.0.
7
-SNAPSHOT
</version>
</dependency>
</dependency>
<!--feign 调用-->
<!--feign 调用-->
<dependency>
<dependency>
...
...
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/service/evalorder/EvalOrderService.java
View file @
ed4fcf6
...
@@ -11,6 +11,7 @@ import com.gsc4cloud.gsc.facade.vpcpad.vo.evalorder.*;
...
@@ -11,6 +11,7 @@ import com.gsc4cloud.gsc.facade.vpcpad.vo.evalorder.*;
import
com.gsc4cloud.gsc.vpc.api.dto.entitydto.evalorder.EvalOrderDTO
;
import
com.gsc4cloud.gsc.vpc.api.dto.entitydto.evalorder.EvalOrderDTO
;
import
com.gsc4cloud.gsc.vpc.api.dto.entitydto.evalorder.EvalOrderSimpleDTO
;
import
com.gsc4cloud.gsc.vpc.api.dto.entitydto.evalorder.EvalOrderSimpleDTO
;
import
com.gsc4cloud.gsc.vpc.api.dto.entitydto.evalorder.EvalPriceHistoryDTO
;
import
com.gsc4cloud.gsc.vpc.api.dto.entitydto.evalorder.EvalPriceHistoryDTO
;
import
com.gsc4cloud.gsc.vpc.api.enums.EvalPriceHistroyOptTypeEnum
;
import
com.gsc4cloud.gsc.vpc.api.dto.pad.reqdto.evalorder.EvalOrderBasicReqDTO
;
import
com.gsc4cloud.gsc.vpc.api.dto.pad.reqdto.evalorder.EvalOrderBasicReqDTO
;
import
com.gsc4cloud.gsc.vpc.api.dto.pad.resdto.evalorder.*
;
import
com.gsc4cloud.gsc.vpc.api.dto.pad.resdto.evalorder.*
;
import
com.gsc4cloud.gsc.vpc.api.dto.web.resdto.evalorder.SalesAgreementPreviewResDTO
;
import
com.gsc4cloud.gsc.vpc.api.dto.web.resdto.evalorder.SalesAgreementPreviewResDTO
;
...
@@ -106,8 +107,10 @@ public class EvalOrderService {
...
@@ -106,8 +107,10 @@ public class EvalOrderService {
if
(
result
.
getData
()
!=
null
&&
!
CollectionUtils
.
isEmpty
(
result
.
getData
().
getPriceHistoryListDTO
()))
{
if
(
result
.
getData
()
!=
null
&&
!
CollectionUtils
.
isEmpty
(
result
.
getData
().
getPriceHistoryListDTO
()))
{
List
<
EvalPriceHistoryVO
>
mergedPriceHistory
=
mergePriceHistoryByRoundNo
(
result
.
getData
().
getPriceHistoryListDTO
());
List
<
EvalPriceHistoryVO
>
mergedPriceHistory
=
mergePriceHistoryByRoundNo
(
result
.
getData
().
getPriceHistoryListDTO
());
data
.
setPriceHistory
(
mergedPriceHistory
);
data
.
setPriceHistory
(
mergedPriceHistory
);
// 按轮次分组的报价历史
data
.
setPriceHistoryByRound
(
buildPriceHistoryByRoundNo
(
result
.
getData
().
getPriceHistoryListDTO
()));
}
}
return
R
.
ok
(
data
);
return
R
.
ok
(
data
);
}
}
...
@@ -203,6 +206,83 @@ public class EvalOrderService {
...
@@ -203,6 +206,83 @@ public class EvalOrderService {
return
mergedList
;
return
mergedList
;
}
}
/**
* 按 roundNo 分组报价历史,返回按轮次倒序排列的 EvalPriceHistoryRoundVO 列表。
* 过滤规则与 mergePriceHistoryByRoundNo 保持一致:
* 1. 过滤掉评估师驳回记录(opType=APPRAISER_REJECT),驳回记录不展示给用户
* 2. 客户报价(opType=CUSTOMER_QUOTE)只保留轮次号 <= 评估师最大轮次的记录,
* 防止客户领先一轮的报价被提前展示
* 分组后每个轮次内的记录按 id 倒序(即录入时间倒序)排列。
* 字段映射通过 BeanUtils.copyProperties 完成,仅额外补充万元展示字段。
*
* @param priceHistoryListDTO biz 层返回的原始报价历史列表(已按报价时间倒序)
* @return 按轮次倒序分组的报价历史列表
*/
private
List
<
EvalPriceHistoryRoundVO
>
buildPriceHistoryByRoundNo
(
List
<
EvalPriceHistoryDTO
>
priceHistoryListDTO
)
{
if
(
CollectionUtils
.
isEmpty
(
priceHistoryListDTO
))
{
return
new
ArrayList
<>();
}
// Step 1:过滤掉评估师驳回记录(APPRAISER_REJECT),驳回记录仅用于内部流转,不对外展示
List
<
EvalPriceHistoryDTO
>
filteredRecords
=
priceHistoryListDTO
.
stream
()
.
filter
(
record
->
!
EvalPriceHistroyOptTypeEnum
.
APPRAISER_REJECT
.
getCode
().
equals
(
record
.
getOpType
()))
.
collect
(
Collectors
.
toList
());
// Step 2:找出评估师(APPRAISER_QUOTE)已完成报价的最大轮次号,作为客户报价的展示上限
Integer
maxEvalRoundNo
=
filteredRecords
.
stream
()
.
filter
(
record
->
EvalPriceHistroyOptTypeEnum
.
APPRAISER_QUOTE
.
getCode
().
equals
(
record
.
getOpType
()))
// 只看评估师报价
.
mapToInt
(
EvalPriceHistoryDTO:
:
getRoundNo
)
.
max
()
.
orElse
(
0
);
// 评估师尚未报价时为 0,客户报价全部被过滤
// Step 3:二次过滤——评估师报价、核价全部保留,客户报价只保留轮次号不超过评估师最大轮次的记录
// 原因:客户可以先于评估师发起下一轮报价,但在评估师未完成该轮报价前不应提前展示
List
<
EvalPriceHistoryDTO
>
validRecords
=
filteredRecords
.
stream
()
.
filter
(
record
->
{
if
(
EvalPriceHistroyOptTypeEnum
.
APPRAISER_QUOTE
.
getCode
().
equals
(
record
.
getOpType
())
||
EvalPriceHistroyOptTypeEnum
.
CHECK_PRICE_APPROVE
.
getCode
().
equals
(
record
.
getOpType
()))
{
// 评估师报价、核价:全部保留
return
true
;
}
else
if
(
EvalPriceHistroyOptTypeEnum
.
CUSTOMER_QUOTE
.
getCode
().
equals
(
record
.
getOpType
()))
{
// 客户报价:只展示到评估师已完成的最新一轮
return
record
.
getRoundNo
()
<=
maxEvalRoundNo
;
}
// 其它 opType 不预期出现(Step 1 已过滤驳回),默认不展示
return
false
;
})
.
collect
(
Collectors
.
toList
());
// Step 4:按 roundNo 分组,每组对应一个谈价轮次
Map
<
Integer
,
List
<
EvalPriceHistoryDTO
>>
groupedByRound
=
validRecords
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
EvalPriceHistoryDTO:
:
getRoundNo
));
// Step 5:按轮次倒序(最新轮次排最前),每轮内的明细按 id 正序(最新录入的排最后)
// 字段通过 BeanUtils.copyProperties 直接映射,额外补充万元格式化展示字段(VO 独有)
return
groupedByRound
.
entrySet
().
stream
()
.
sorted
(
Map
.
Entry
.<
Integer
,
List
<
EvalPriceHistoryDTO
>>
comparingByKey
().
reversed
())
// 轮次倒序
.
map
(
entry
->
{
// 轮次内明细:按 id 正序
List
<
EvalPriceHistoryVO
>
historyVOList
=
entry
.
getValue
().
stream
()
.
sorted
(
Comparator
.
comparing
(
EvalPriceHistoryDTO:
:
getId
))
.
map
(
dto
->
{
EvalPriceHistoryVO
vo
=
new
EvalPriceHistoryVO
();
// 复制同名字段(roundNo、opType、evalPrice、evalOpinion、
// customerTargetPrice、customerTargetPriceFeedback、quoteTime 等)
org
.
springframework
.
beans
.
BeanUtils
.
copyProperties
(
dto
,
vo
);
// 补充万元展示字段(VO 特有,DTO/Entity 中无此字段)
vo
.
setEvalPriceDisplay
(
NumberUtils
.
formatAsWan
(
dto
.
getEvalPrice
()));
vo
.
setCustomerTargetPriceDisplay
(
NumberUtils
.
formatAsWan
(
dto
.
getCustomerTargetPrice
()));
return
vo
;
})
.
collect
(
Collectors
.
toList
());
// 组装轮次 VO
EvalPriceHistoryRoundVO
roundVO
=
new
EvalPriceHistoryRoundVO
();
roundVO
.
setRoundNo
(
entry
.
getKey
());
roundVO
.
setPriceHistoryList
(
historyVOList
);
return
roundVO
;
})
.
collect
(
Collectors
.
toList
());
}
public
R
<
SalesAgreementPreviewResDTO
>
salesAgreementPreviewByCondition
(
SalesAgreementPreviewRequest
request
)
{
public
R
<
SalesAgreementPreviewResDTO
>
salesAgreementPreviewByCondition
(
SalesAgreementPreviewRequest
request
)
{
return
eSignRemote
.
generateCarESignContract
(
request
);
return
eSignRemote
.
generateCarESignContract
(
request
);
}
}
...
...
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/vo/evalorder/CarLicenseOcrVO.java
View file @
ed4fcf6
...
@@ -89,4 +89,10 @@ public class CarLicenseOcrVO implements Serializable {
...
@@ -89,4 +89,10 @@ public class CarLicenseOcrVO implements Serializable {
*/
*/
@Schema
(
description
=
"品牌型号"
)
@Schema
(
description
=
"品牌型号"
)
private
String
completeBrandModel
;
private
String
completeBrandModel
;
/**
* OCR识别-行驶证住址
*/
@Schema
(
description
=
"OCR识别-行驶证住址"
)
private
String
licenseAddress
;
}
}
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/vo/evalorder/EvalOrderDetailVO.java
View file @
ed4fcf6
...
@@ -24,6 +24,9 @@ public class EvalOrderDetailVO {
...
@@ -24,6 +24,9 @@ public class EvalOrderDetailVO {
@Schema
(
description
=
"评估信息"
)
@Schema
(
description
=
"评估信息"
)
private
List
<
EvalPriceHistoryVO
>
priceHistory
;
private
List
<
EvalPriceHistoryVO
>
priceHistory
;
@Schema
(
description
=
"按轮次分组的报价历史列表(按轮次倒序)"
)
private
List
<
EvalPriceHistoryRoundVO
>
priceHistoryByRound
;
@Schema
(
description
=
"签约信息"
)
@Schema
(
description
=
"签约信息"
)
private
EvalSigningInfoVO
signingInfo
;
private
EvalSigningInfoVO
signingInfo
;
...
...
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/vo/evalorder/EvalPriceHistoryRoundVO.java
0 → 100644
View file @
ed4fcf6
package
com
.
gsc4cloud
.
gsc
.
facade
.
vpcpad
.
vo
.
evalorder
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.util.List
;
@Schema
(
description
=
"按轮次分组的报价历史"
)
@Data
public
class
EvalPriceHistoryRoundVO
{
@Schema
(
description
=
"报价轮次"
)
private
Integer
roundNo
;
@Schema
(
description
=
"该轮次的报价历史列表(按报价时间正序)"
)
private
List
<
EvalPriceHistoryVO
>
priceHistoryList
;
}
src/main/java/com/gsc4cloud/gsc/facade/vpcpad/vo/evalorder/EvalPriceHistoryVO.java
View file @
ed4fcf6
...
@@ -34,4 +34,10 @@ public class EvalPriceHistoryVO {
...
@@ -34,4 +34,10 @@ public class EvalPriceHistoryVO {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@Schema
(
description
=
"报价时间"
)
@Schema
(
description
=
"报价时间"
)
private
Date
quoteTime
;
private
Date
quoteTime
;
@Schema
(
description
=
"操作类型:10评估师报价,20客户报价,30评估师驳回,40核价师核价,50核价师驳回"
)
private
Integer
opType
;
@Schema
(
description
=
"操作人"
)
private
String
createdBy
;
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment