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
19b3f83f
Commit
19b3f83f
authored
Apr 29, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
8af5cb04
5a30fd12
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
83 additions
and
9 deletions
+83
-9
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFortuneController.java
+3
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+6
-5
yd-csf-feign/src/main/java/com/yd/csf/feign/request/expectedfortune/ExpectedFortuneAddRequest.java
+6
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/ExpectedFortune.java
+18
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/Fortune.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+41
-2
yd-csf-service/src/main/java/com/yd/csf/service/vo/FortuneVO.java
+6
-0
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
+1
-0
yd-csf-service/src/main/resources/mappers/FortuneMapper.xml
+1
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFortuneController.java
View file @
19b3f83f
...
...
@@ -464,6 +464,9 @@ public class ApiFortuneController {
if
(
editExchangeRateRequest
.
getExchangeRate
()
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"exchangeRate 不能为空"
);
}
if
(
editExchangeRateRequest
.
getHkdAmount
()
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"hkdAmount 不能为空"
);
}
return
Result
.
success
(
fortuneService
.
editExchangeRate
(
editExchangeRateRequest
));
}
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
19b3f83f
...
...
@@ -952,10 +952,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
expectedFortune
.
setFortuneName
(
queryByDict
(
expectedFortuneDto
.
getFortuneType
()));
// 应付款编号(序号递增)
expectedFortune
.
setPayableNo
(
this
.
createPayableNo
(
expectedFortune
.
getFortuneBizType
(),
++
currentSeq
));
// 计算金额
expectedFortune
.
setAmount
(
NumberUtil
.
div
(
expectedFortuneDto
.
getHkdAmount
(),
expectedFortuneDto
.
getDefaultExchangeRate
(),
2
)
);
// 已出帐金额、待出帐金额、已出帐比例、待出帐比例
expectedFortune
.
setPaidAmount
(
BigDecimal
.
ZERO
);
...
...
@@ -1018,7 +1015,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getCurrency
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"预计出账币种不能为空"
);
}
if
(
Objects
.
isNull
(
expectedFortuneDto
.
get
Default
ExchangeRate
()))
{
if
(
Objects
.
isNull
(
expectedFortuneDto
.
getExchangeRate
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"结算汇率不能为空"
);
}
}
...
...
@@ -1167,6 +1164,10 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
if
(
request
==
null
)
{
return
queryWrapper
;
}
// 默认查询条件 是否分期出账 1-是 0-否 2-拆分的原纪录
queryWrapper
.
in
(
"is_part"
,
0
,
1
);
// 获取参数
String
payableNo
=
request
.
getPayableNo
();
String
policyNo
=
request
.
getPolicyNo
();
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/request/expectedfortune/ExpectedFortuneAddRequest.java
View file @
19b3f83f
...
...
@@ -79,7 +79,7 @@ public class ExpectedFortuneAddRequest {
* 结算汇率
*/
@Schema
(
description
=
"结算汇率"
)
private
BigDecimal
defaultE
xchangeRate
;
private
BigDecimal
e
xchangeRate
;
/**
* 出账金额 单位:港币
...
...
@@ -113,4 +113,9 @@ public class ExpectedFortuneAddRequest {
@Schema
(
description
=
"出账状态 0=待出账 1=可出帐,待检核 2=完成出账 3=部分出账 4=保留 5=已失效 6=可出帐,检核完成 7=未找到当前预计发佣对应的来佣, 字典值: csf_expected_fortune_status"
)
private
String
status
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
}
yd-csf-service/src/main/java/com/yd/csf/service/model/ExpectedFortune.java
View file @
19b3f83f
...
...
@@ -193,6 +193,24 @@ public class ExpectedFortune implements Serializable {
private
BigDecimal
defaultExchangeRate
;
/**
* 出账原币种金额
*/
@TableField
(
"payout_amount"
)
private
BigDecimal
payoutAmount
;
/**
* 出账原币种
*/
@TableField
(
"payout_currency"
)
private
String
payoutCurrency
;
/**
* 出账原币种结算汇率(出账原币种 → 港币的结算汇率)
*/
@TableField
(
"payout_exchange_rate"
)
private
BigDecimal
payoutExchangeRate
;
/**
* 港币预计出账金额
*/
@TableField
(
"hkd_amount"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/Fortune.java
View file @
19b3f83f
...
...
@@ -43,7 +43,7 @@ public class Fortune implements Serializable {
private
String
fortuneBizType
;
/**
* 是否
部分出账拆分出来的出账记录 0=No, 1=Yes
* 是否
拆分出来的出账 1-是 0-否 2-拆分的原纪录
*/
private
Integer
isPart
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
19b3f83f
...
...
@@ -79,6 +79,11 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
if
(
fortuneQueryRequest
==
null
)
{
return
queryWrapper
;
}
// 默认查询条件 是否分期出账 1-是 0-否 2-拆分的原纪录
queryWrapper
.
in
(
"is_part"
,
0
,
1
);
// 获取参数
String
reconciliationYearMonth
=
fortuneQueryRequest
.
getReconciliationYearMonth
();
List
<
String
>
statusList
=
fortuneQueryRequest
.
getStatusList
();
String
policyNo
=
fortuneQueryRequest
.
getPolicyNo
();
...
...
@@ -368,7 +373,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
List
<
FortuneAccountExportDTO
>
accountExportDTOList
=
new
ArrayList
<>();
// 设置出账年月(实)
LocalDate
actualPayoutDate
=
LocalDate
.
parse
(
fortuneDownloadRequest
.
getActualPayoutDate
());
LocalDate
actualPayoutDate
=
LocalDate
.
parse
(
fortuneDownloadRequest
.
getActualPayoutDate
()
+
"-01"
);
fortuneList
.
forEach
(
fortune
->
fortune
.
setActualPayoutDate
(
actualPayoutDate
));
// 处理每个分组的数据
...
...
@@ -1031,7 +1036,41 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
@Override
public
Boolean
editExchangeRate
(
EditExchangeRateRequest
editExchangeRateRequest
)
{
return
null
;
String
fortuneBizId
=
editExchangeRateRequest
.
getFortuneBizId
();
Fortune
fortune
=
this
.
getByFortuneBizId
(
fortuneBizId
);
if
(
fortune
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"出账记录不存在"
);
}
if
(
FortuneStatusEnum
.
SENT
.
getItemValue
().
equals
(
fortune
.
getStatus
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAM_CHECK_ERROR
.
getCode
(),
"已完成出账状态的记录不能修改结算汇率"
);
}
ExpectedFortune
originalExpectedFortune
=
expectedFortuneService
.
getByBizId
(
fortune
.
getExpectedFortuneBizId
());
if
(
originalExpectedFortune
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"对应的预计出账记录不存在"
);
}
// 获取入参
BigDecimal
exchangeRate
=
editExchangeRateRequest
.
getExchangeRate
();
BigDecimal
hkdAmount
=
editExchangeRateRequest
.
getHkdAmount
();
// 更新 fortune 的结算汇率、港币金额
this
.
lambdaUpdate
()
.
set
(
Fortune:
:
getExchangeRate
,
exchangeRate
)
.
set
(
Fortune:
:
getHkdAmount
,
hkdAmount
)
.
eq
(
Fortune:
:
getId
,
fortune
.
getId
())
.
update
();
// 更新 expected fortune 的出账原币种结算汇率、港币金额
expectedFortuneService
.
lambdaUpdate
()
.
set
(
ExpectedFortune:
:
getPayoutExchangeRate
,
exchangeRate
)
.
set
(
ExpectedFortune:
:
getHkdAmount
,
hkdAmount
)
.
set
(
ExpectedFortune:
:
getUnpaidAmount
,
hkdAmount
)
.
eq
(
ExpectedFortune:
:
getId
,
originalExpectedFortune
.
getId
())
.
update
();
return
true
;
}
private
void
validSplitFortune
(
FortuneSplitRequest
fortuneSplitRequest
)
{
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/FortuneVO.java
View file @
19b3f83f
...
...
@@ -42,6 +42,12 @@ public class FortuneVO implements Serializable {
private
String
fortuneBizType
;
/**
* 是否拆分出来的出账 1-是 0-否 2-拆分的原纪录
*/
@Schema
(
description
=
"是否拆分出来的出账 1-是 0-否 2-拆分的原纪录"
)
private
Integer
isPart
;
/**
* 预计出账业务ID
*/
@Schema
(
description
=
"预计出账业务ID"
)
...
...
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
View file @
19b3f83f
...
...
@@ -48,6 +48,7 @@
#{item}
</foreach>
</if>
AND ef.is_part in (0,1)
</where>
</select>
...
...
yd-csf-service/src/main/resources/mappers/FortuneMapper.xml
View file @
19b3f83f
...
...
@@ -80,6 +80,7 @@
#{fortuneId}
</foreach>
</if>
AND f.is_part in (0,1)
GROUP BY f.policy_no
</select>
...
...
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