Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
dd60f236
Commit
dd60f236
authored
May 13, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
f3fa45a0
d44cd6bc
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
52 deletions
+83
-52
yd-csf-feign/src/main/java/com/yd/csf/feign/response/expectedfortune/ApiExpectedFortunePageResponse.java
+43
-28
yd-csf-service/src/main/java/com/yd/csf/service/dto/FortuneAddRequest.java
+9
-2
yd-csf-service/src/main/java/com/yd/csf/service/dto/FortuneQueryRequest.java
+6
-8
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+17
-6
yd-csf-service/src/main/java/com/yd/csf/service/vo/FortuneVO.java
+5
-5
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
+3
-3
No files found.
yd-csf-feign/src/main/java/com/yd/csf/feign/response/expectedfortune/ApiExpectedFortunePageResponse.java
View file @
dd60f236
...
...
@@ -158,36 +158,57 @@ public class ApiExpectedFortunePageResponse {
private
String
ruleCurrency
;
/**
* 出账币种名称
*/
@Schema
(
description
=
"出账币种名称"
)
private
String
currencyName
;
/**
* 保单币种 -> 港币汇率
* 预计出账-默认保单币种汇率(保单币种 -> 港币汇率)
*/
@Schema
(
description
=
"
保单币种 -> 港币汇率
"
)
@Schema
(
description
=
"
预计出账-默认保单币种汇率(保单币种 -> 港币汇率)
"
)
private
BigDecimal
defaultExchangeRate
;
/**
* HKD应出账金额
*
预计出账-
HKD应出账金额
*/
@Schema
(
description
=
"HKD应出账金额"
)
@Schema
(
description
=
"
预计出账-
HKD应出账金额"
)
private
BigDecimal
hkdAmount
;
// ========== 原币种及金额 ==========
@Schema
(
description
=
"原币种"
)
private
String
originalCurrency
;
@Schema
(
description
=
"原币种金额"
)
private
BigDecimal
originalAmount
;
@Schema
(
description
=
"原币→港币汇率"
)
private
BigDecimal
originalToHkdRate
;
// ========== 发放币种及金额 ==========
@Schema
(
description
=
"发放币种"
)
private
String
payoutCurrency
;
@Schema
(
description
=
"发放币种金额"
)
private
BigDecimal
payoutAmount
;
@Schema
(
description
=
"港币→发放币汇率"
)
private
BigDecimal
hkdToPayoutRate
;
/**
* 本次出账金额(HKD)
*
实际出账-
本次出账金额(HKD)
*/
@Schema
(
description
=
"本次出账金额(HKD)"
)
@Schema
(
description
=
"
实际出账-
本次出账金额(HKD)"
)
private
BigDecimal
currentPaymentHkdAmount
;
/**
* 本期结算汇率
*
实际出账-
本期结算汇率
*/
@Schema
(
description
=
"本期结算汇率"
)
@Schema
(
description
=
"
实际出账-
本期结算汇率"
)
private
BigDecimal
exchangeRate
;
/**
* 出账币种名称
*/
@Schema
(
description
=
"出账币种名称"
)
private
String
currencyName
;
/**
* 出账状态
*/
@Schema
(
description
=
"出账状态 0=待出账 1=可出帐,待检核 2=完成出账 3=部分出账 4=保留 5=已失效 6=可出账, 已检核 7=未找到当前预计出账对应的来佣 字典值: csf_expected_fortune_status"
)
...
...
@@ -214,36 +235,30 @@ public class ApiExpectedFortunePageResponse {
private
LocalDate
actualPayoutDate
;
/**
* 已出账金额(HKD)
*
预计出账-
已出账金额(HKD)
*/
@Schema
(
description
=
"已出账金额(HKD)"
)
@Schema
(
description
=
"
预计出账-
已出账金额(HKD)"
)
private
BigDecimal
paidAmount
;
/**
* 待出账金额
*
预计出账-
待出账金额
*/
@Schema
(
description
=
"待出账金额"
)
@Schema
(
description
=
"
预计出账-
待出账金额"
)
private
BigDecimal
unpaidAmount
;
/**
*
已出账
比例 已出账金额/应出账金额
*
预计出账-已出账金额
比例 已出账金额/应出账金额
*/
@Schema
(
description
=
"
已出账
比例 已出账金额/应出账金额"
)
@Schema
(
description
=
"
预计出账-已出账金额
比例 已出账金额/应出账金额"
)
private
BigDecimal
paidRatio
;
/**
* 待出账比例 待出账金额/应出账金额
*
预计出账-
待出账比例 待出账金额/应出账金额
*/
@Schema
(
description
=
"待出账比例 待出账金额/应出账金额"
)
@Schema
(
description
=
"
预计出账-
待出账比例 待出账金额/应出账金额"
)
private
BigDecimal
unpaidRatio
;
/**
* 基本法项目配置表唯一业务ID
*/
@Schema
(
description
=
"rule item biz id"
)
private
String
ruleItemBizId
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/FortuneAddRequest.java
View file @
dd60f236
package
com
.
yd
.
csf
.
service
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -143,12 +144,18 @@ public class FortuneAddRequest implements Serializable {
private
BigDecimal
hkdAmount
;
/**
* 出账年月
yyyy-MM
* 出账年月
(估)
*/
@Schema
(
description
=
"出账年月
yyyy-MM
"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@Schema
(
description
=
"出账年月
(估)
"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
payoutDate
;
/**
* 出账年月(实)
*/
@Schema
(
description
=
"出账年月(实)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
actualPayoutDate
;
/**
* 出账备注
*/
@Schema
(
description
=
"出账备注"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/FortuneQueryRequest.java
View file @
dd60f236
...
...
@@ -60,18 +60,16 @@ public class FortuneQueryRequest extends PageDto implements Serializable {
private
List
<
String
>
productLaunchBizIdList
;
/**
* 出账
日
(估)开始
* 出账
年月
(估)开始
*/
@Schema
(
description
=
"出账日(估)开始 格式:yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
LocalDate
payoutDateStart
;
@Schema
(
description
=
"出账年月(估)开始 格式:yyyy-MM"
)
private
String
payoutDateStart
;
/**
* 出账
日
(估)结束
* 出账
年月
(估)结束
*/
@Schema
(
description
=
"出账日(估)结束 格式:yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
LocalDate
payoutDateEnd
;
@Schema
(
description
=
"出账年月(估)结束 格式:yyyy-MM"
)
private
String
payoutDateEnd
;
/**
* 检核年月
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
dd60f236
...
...
@@ -2,8 +2,6 @@ package com.yd.csf.service.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -20,7 +18,6 @@ import com.yd.common.exception.BusinessException;
import
com.yd.common.result.Result
;
import
com.yd.common.utils.RandomStringGenerator
;
import
com.yd.common.utils.RedisUtil
;
import
com.yd.csf.feign.response.expectedfortune.ApiExpectedFortunePageResponse
;
import
com.yd.csf.service.dto.*
;
import
com.yd.csf.service.enums.FortuneStatusEnum
;
import
com.yd.csf.service.model.*
;
...
...
@@ -45,6 +42,8 @@ import java.math.RoundingMode;
import
java.net.URLEncoder
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.YearMonth
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -93,8 +92,19 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
String
policyNo
=
fortuneQueryRequest
.
getPolicyNo
();
List
<
String
>
insuranceCompanyBizIdList
=
fortuneQueryRequest
.
getInsuranceCompanyBizIdList
();
List
<
String
>
productLaunchBizIdList
=
fortuneQueryRequest
.
getProductLaunchBizIdList
();
LocalDate
payoutDateStart
=
fortuneQueryRequest
.
getPayoutDateStart
();
LocalDate
payoutDateEnd
=
fortuneQueryRequest
.
getPayoutDateEnd
();
// 出账年月(估)开始
LocalDate
payoutDateStart
=
null
;
if
(
StringUtils
.
isNotBlank
(
fortuneQueryRequest
.
getPayoutDateStart
()))
{
payoutDateStart
=
LocalDate
.
parse
(
fortuneQueryRequest
.
getPayoutDateStart
()
+
"-01"
);
}
// 出账年月(估)结束 月最后一天
LocalDate
payoutDateEnd
=
null
;
if
(
StringUtils
.
isNotBlank
(
fortuneQueryRequest
.
getPayoutDateEnd
()))
{
// 1. 先解析为 YearMonth (专门处理年月)
YearMonth
yearMonth
=
YearMonth
.
parse
(
fortuneQueryRequest
.
getPayoutDateEnd
(),
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
));
// 2. 获取该月的最后一天
payoutDateEnd
=
yearMonth
.
atEndOfMonth
();
}
String
brokerName
=
fortuneQueryRequest
.
getBrokerName
();
// 入账状态
...
...
@@ -805,7 +815,8 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
// 生成发佣业务ID
fortune
.
setFortuneBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_FORTUNE
.
getCode
()));
fortune
.
setCurrentPaymentAmount
(
fortuneAddRequest
.
getPayoutAmount
());
fortune
.
setActualPayoutDate
(
LocalDate
.
parse
(
fortuneAddRequest
.
getPayoutDate
()
+
"-01"
));
fortune
.
setPayoutDate
(
LocalDate
.
parse
(
fortuneAddRequest
.
getPayoutDate
()
+
"-01"
));
fortune
.
setActualPayoutDate
(
LocalDate
.
parse
(
fortuneAddRequest
.
getActualPayoutDate
()
+
"-01"
));
fortune
.
setIsPart
(
0
);
fortuneList
.
add
(
fortune
);
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/FortuneVO.java
View file @
dd60f236
...
...
@@ -282,17 +282,17 @@ public class FortuneVO implements Serializable {
private
String
status
;
/**
* 出账
日
(估) / 预计发佣月
* 出账
年月
(估) / 预计发佣月
*/
@Schema
(
description
=
"出账
日
(估) / 预计发佣月"
)
@Schema
(
description
=
"出账
年月
(估) / 预计发佣月"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
LocalDate
payoutDate
;
/**
* 出账
日
(实)
* 出账
年月
(实)
*/
@Schema
(
description
=
"出账
日
(实)"
)
@JsonFormat
(
pattern
=
"yyyy-MM
-dd
"
,
timezone
=
"GMT+8"
)
@Schema
(
description
=
"出账
年月
(实)"
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
LocalDate
actualPayoutDate
;
/**
...
...
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
View file @
dd60f236
...
...
@@ -255,9 +255,9 @@
f.current_payment_amount,
f.exchange_rate,
NULL as paid_amount,
0
as unpaid_amount,
f.current_payment_ratio
as paid_ratio,
0
as unpaid_ratio,
NULL
as unpaid_amount,
NULL
as paid_ratio,
NULL
as unpaid_ratio,
f.is_tax,
f.tax_amount,
f.net_amount,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment