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
ef78da01
Commit
ef78da01
authored
May 13, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出账检核-增加币种44
parent
1a474817
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
106 deletions
+89
-106
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+23
-20
yd-csf-feign/src/main/java/com/yd/csf/feign/request/expectedfortune/ExpectedFortuneAddRequest.java
+52
-86
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyService.java
+3
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyServiceImpl.java
+11
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
ef78da01
...
...
@@ -1022,14 +1022,10 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
// 查询保单信息
Set
<
String
>
policyNoSet
=
fortuneAddRequestList
.
stream
()
.
map
(
ExpectedFortuneAddRequest:
:
getPolicyNo
)
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toSet
());
.
filter
(
StringUtils:
:
isNotBlank
)
.
collect
(
Collectors
.
toSet
());
Map
<
String
,
Policy
>
policyMap
=
new
HashMap
<>();
if
(
CollUtil
.
isNotEmpty
(
policyNoSet
))
{
List
<
Policy
>
policyList
=
policyService
.
lambdaQuery
().
in
(
Policy:
:
getPolicyNo
,
policyNoSet
).
list
();
// 保单映射
policyMap
=
policyList
.
stream
().
collect
(
Collectors
.
toMap
(
Policy:
:
getPolicyNo
,
Function
.
identity
()));
}
Map
<
String
,
Policy
>
policyMap
=
policyService
.
queryPolicyMap
(
policyNoSet
);
// 查询最新一条有 payableNo 记录
// int currentSeq = iExpectedFortuneService.getPayableNoCurrentSeq();
...
...
@@ -1085,13 +1081,6 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
}
private
String
queryByDict
(
String
fortuneType
)
{
//查询redis缓存的字典列表信息
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
=
redisUtil
.
getCacheObject
(
RedisConstants
.
DICT_LIST
);
String
fortuneName
=
GetDictItemListByDictTypeResponse
.
getItemLabel
(
dictTypeResponses
,
"csf_fortune_type"
,
fortuneType
);
if
(
ObjectUtils
.
isNotEmpty
(
fortuneName
))
{
return
fortuneName
;
}
Result
<
List
<
GetDictItemListByDictTypeResponse
>>
result
=
apiSysDictFeignClient
.
getDictItemListByDictType
(
"csf_fortune_type"
);
if
(
ObjectUtils
.
isNotEmpty
(
result
.
getData
()))
{
for
(
GetDictItemListByDictTypeResponse
dictItem
:
result
.
getData
())
{
...
...
@@ -1127,15 +1116,29 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
private
void
validateAdd
(
List
<
ExpectedFortuneAddRequest
>
fortuneAddRequestList
)
{
for
(
ExpectedFortuneAddRequest
expectedFortuneDto
:
fortuneAddRequestList
)
{
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getHkdAmount
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"预计出账金额不能为空"
);
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getOriginalAmount
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"原币种金额不能为空"
);
}
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getOriginalCurrency
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"原币种不能为空"
);
}
if
(
Objects
.
isNull
(
expectedFortuneDto
.
get
Currency
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"
预计出账币种
不能为空"
);
if
(
Objects
.
isNull
(
expectedFortuneDto
.
get
OriginalToHkdRate
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"
原币种→港币汇率
不能为空"
);
}
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getExchangeRate
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"结算汇率不能为空"
);
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getRuleAmount
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"保单币种金额不能为空"
);
}
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getRuleCurrency
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"保单币种不能为空"
);
}
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getDefaultExchangeRate
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"预计出账汇率不能为空"
);
}
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getHkdAmount
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"预计出账金额不能为空"
);
}
}
}
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/request/expectedfortune/ExpectedFortuneAddRequest.java
View file @
ef78da01
...
...
@@ -5,118 +5,84 @@ import io.swagger.v3.oas.annotations.media.Schema;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.Date
;
@Data
public
class
ExpectedFortuneAddRequest
{
/**
* 应付款类型 R-关联保单应付款 U-非关联保单应付款
*/
@Schema
(
description
=
"应付款类型 R-关联保单应付款 U-非关联保单应付款"
)
@Schema
(
description
=
"应付款类型 R-关联保单应付款 U-非关联保单应付款"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
fortuneBizType
;
/**
* 关联保单号
*/
@Schema
(
description
=
"出账年月 (估)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
String
payoutDate
;
@Schema
(
description
=
"出账年月 (实)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
String
actualPayoutDate
;
@Schema
(
description
=
"关联保单号"
)
private
String
policyNo
;
/**
* 产品计划 ID
*/
@Schema
(
description
=
"
产品计划 ID
"
)
private
String
productLaunchBizId
;
@Schema
(
description
=
"出账状态 0=待出账 1=可出帐,待检核 2=完成出账 3=部分出账 4=保留 5=已失效 6=可出帐,检核完成 7=未找到当前预计发佣对应的来佣, 字典值: csf_expected_fortune_status"
)
private
String
status
;
@Schema
(
description
=
"
出账状态-修改理由
"
)
private
String
statusDesc
;
/**
* 佣金期数
*/
@Schema
(
description
=
"佣金期数"
)
@Schema
(
description
=
"出账项目"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
fortuneName
;
@Schema
(
description
=
"出账项目类型 字典值:csf_fortune_type"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
fortuneType
;
@Schema
(
description
=
"出账期数"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
Integer
fortunePeriod
;
/**
* 总期数
*/
@Schema
(
description
=
"总期数"
)
@Schema
(
description
=
"出账总期数"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
Integer
fortuneTotalPeriod
;
/**
* 转介人名称
*/
@Schema
(
description
=
"转介人名称"
)
@Schema
(
description
=
"转介人名称"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
broker
;
/**
* 转介人业务ID
*/
@Schema
(
description
=
"broker biz id"
)
@Schema
(
description
=
"broker biz id"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
brokerBizId
;
/**
* 团队名称
*/
@Schema
(
description
=
"团队名称"
)
@Schema
(
description
=
"所属团队"
)
private
String
team
;
/**
* 所属团队业务ID
*/
@Schema
(
description
=
"所属团队 biz id"
)
@Schema
(
description
=
"所属团队业务ID"
)
private
String
teamBizId
;
/**
* 出账项目
*/
@Schema
(
description
=
"出账项目"
)
private
String
fortuneName
;
@Schema
(
description
=
"保单币种金额"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
BigDecimal
ruleAmount
;
/**
* 出账项目类型
*/
@Schema
(
description
=
"出账项目类型 字典值:csf_fortune_type"
)
private
String
fortuneType
;
@Schema
(
description
=
"保单币种"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
ruleCurrency
;
/**
* 结算汇率
*/
@Schema
(
description
=
"结算汇率"
)
private
BigDecimal
exchangeRate
;
@Schema
(
description
=
"保单币种→港币汇率(默认保单币种汇率)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
BigDecimal
defaultExchangeRate
;
/**
* 出账金额 单位:港币
*/
@Schema
(
description
=
"出账金额 单位:港币"
)
private
BigDecimal
hkdAmount
;
@Schema
(
description
=
"原币种"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
originalCurrency
;
/**
* 出账币种
*/
@Schema
(
description
=
"出账币种"
)
private
String
currency
;
/**
* 出账日 (估)
*/
@Schema
(
description
=
"出账日 (估)"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
LocalDate
payoutDate
;
/**
* 出账日 (实)
*/
@Schema
(
description
=
"出账日 (实)"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
actualPayoutDate
;
/**
* 出账状态
*/
@Schema
(
description
=
"出账状态 0=待出账 1=可出帐,待检核 2=完成出账 3=部分出账 4=保留 5=已失效 6=可出帐,检核完成 7=未找到当前预计发佣对应的来佣, 字典值: csf_expected_fortune_status"
)
private
String
status
;
@Schema
(
description
=
"原币种金额"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
BigDecimal
originalAmount
;
@Schema
(
description
=
"原币种→港币汇率"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
BigDecimal
originalToHkdRate
;
@Schema
(
description
=
"发放币种"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
String
payoutCurrency
;
@Schema
(
description
=
"发放币种金额"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
BigDecimal
payoutAmount
;
@Schema
(
description
=
"港币→发放币种汇率"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
BigDecimal
hkdToPayoutRate
;
@Schema
(
description
=
"港币金额"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
BigDecimal
hkdAmount
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
}
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyService.java
View file @
ef78da01
...
...
@@ -10,6 +10,7 @@ import com.yd.csf.service.vo.PolicyVO;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
/**
* @author Zhang Jianan
...
...
@@ -33,4 +34,6 @@ public interface PolicyService extends IService<Policy> {
List
<
PolicyProductInfo
>
getPolicyProductInfo
(
List
<
String
>
productLaunchBizIdList
);
Map
<
String
,
PolicyProductInfo
>
getPolicyProductInfoMap
(
Collection
<
String
>
productLaunchBizIdList
);
Map
<
String
,
Policy
>
queryPolicyMap
(
Collection
<
String
>
policyNoList
);
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyServiceImpl.java
View file @
ef78da01
...
...
@@ -388,6 +388,17 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyMapper, Policy>
.
collect
(
Collectors
.
toMap
(
PolicyProductInfo:
:
getProductLaunchBizId
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
newValue
));
}
@Override
public
Map
<
String
,
Policy
>
queryPolicyMap
(
Collection
<
String
>
policyNoList
)
{
// 校验参数
if
(
CollectionUtils
.
isEmpty
(
policyNoList
))
{
return
Collections
.
emptyMap
();
}
return
this
.
lambdaQuery
().
in
(
Policy:
:
getPolicyNo
,
policyNoList
).
list
()
.
stream
().
collect
(
Collectors
.
toMap
(
Policy:
:
getPolicyNo
,
Function
.
identity
()));
}
/**
* 从JSON数组中解析自定义属性
*/
...
...
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