Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
20018c7d
Commit
20018c7d
authored
Nov 22, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化接口修改
parent
d9872f47
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
9 deletions
+38
-9
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+38
-9
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
20018c7d
...
...
@@ -277,7 +277,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
saveIncome
(
tIncomeDetail
);
}
else
{
// 核心判断
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
);
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
,
null
);
}
}
...
...
@@ -313,7 +313,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
// 核心判断
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
);
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
,
paymentInfo
);
}
}
...
...
@@ -570,10 +570,15 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @Date: 2022/9/2 10:22
* @return: boolean
**/
private
boolean
copyCore
(
TIncomeDetail
tIncomeDetail
,
List
<
TIncome
>
incomeList
,
List
<
TIncomeDetail
>
detailList
)
{
private
boolean
copyCore
(
TIncomeDetail
tIncomeDetail
,
List
<
TIncome
>
incomeList
,
List
<
TIncomeDetail
>
detailList
,
TPaymentInfo
paymentInfo
)
{
// 判断,比例,直接加
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
else
{
Map
<
String
,
Integer
>
numMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
incomeMap
=
new
HashMap
<>();
...
...
@@ -625,11 +630,21 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tIncomeDetail
.
getRedData
()))
{
if
(
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
// 红冲判断:当本类型是最大值,才可以红冲
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
// 商险。收费方式:2金额-人数
...
...
@@ -637,10 +652,20 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tIncomeDetail
.
getRedData
()))
{
if
(
insureMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
insureMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
}
else
{
// 各个模式累加逻辑:
...
...
@@ -651,8 +676,12 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
if
(
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
}
else
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
// 3金额-人次
// 各个模式累加逻辑:
...
...
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