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
4ec4186c
Commit
4ec4186c
authored
Sep 07, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
f50328f2
38182755
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
46 deletions
+40
-46
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+40
-46
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
4ec4186c
...
@@ -29,11 +29,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -29,11 +29,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
...
@@ -538,21 +535,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -538,21 +535,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
}
else
{
Integer
myNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
socialNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
ONE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
fundNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
TWO_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
insureNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
THREE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
salaryNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
// 红冲判断:当本类型是最大值,才可以红冲
// 红冲判断:当本类型是最大值,才可以红冲
if
(
myNum
!=
null
&&
myNum
>
ifNullToZero
(
socialNum
)
&&
myNum
>
ifNullToZero
(
fundNum
)
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
&&
myNum
>
ifNullToZero
(
insureNum
)
&&
myNum
>
ifNullToZero
(
salaryNum
))
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
// 商险。收费方式:2金额-人数
// 商险。收费方式:2金额-人数
...
@@ -563,21 +547,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -563,21 +547,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
}
else
{
Integer
myNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getSourceType
()
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
socialNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
ONE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
fundNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
TWO_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
insureNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
THREE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
salaryNum
=
numMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
// 红冲判断:当本类型是最大值,才可以红冲
if
(
myNum
!=
null
&&
myNum
>
ifNullToZero
(
socialNum
)
&&
myNum
>
ifNullToZero
(
fundNum
)
&&
myNum
>
ifNullToZero
(
insureNum
)
&&
myNum
>
ifNullToZero
(
salaryNum
))
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
}
else
{
}
else
{
// 各个模式累加逻辑:
// 各个模式累加逻辑:
...
@@ -600,6 +570,43 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -600,6 +570,43 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
true
;
return
true
;
}
}
/**
* @Description: 红冲判断
* @Author: hgw
* @Date: 2022/9/7 17:27
* @return: boolean
**/
private
boolean
redDateJudge
(
TIncomeDetail
tIncomeDetail
,
Map
<
String
,
Integer
>
numMap
)
{
Integer
socialNum
=
CommonConstants
.
ZERO_INT
;
Integer
fundNum
=
CommonConstants
.
ZERO_INT
;
Integer
insureNum
=
CommonConstants
.
ZERO_INT
;
Integer
salaryNum
=
CommonConstants
.
ZERO_INT
;
Integer
myNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
socialNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
ONE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
}
if
(!
CommonConstants
.
TWO_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
fundNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
TWO_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
}
if
(!
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
insureNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
THREE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
}
if
(!
CommonConstants
.
FOUR_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
salaryNum
=
numMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
}
// 红冲判断:当本类型是最大值,才可以红冲
if
(
myNum
!=
null
&&
myNum
>
ifNullToZero
(
socialNum
)
&&
myNum
>
ifNullToZero
(
fundNum
)
&&
myNum
>
ifNullToZero
(
insureNum
)
&&
myNum
>
ifNullToZero
(
salaryNum
))
{
return
true
;
}
return
false
;
}
private
int
ifNullToZero
(
Integer
num
)
{
private
int
ifNullToZero
(
Integer
num
)
{
if
(
num
==
null
)
{
if
(
num
==
null
)
{
return
CommonConstants
.
ZERO_INT
;
return
CommonConstants
.
ZERO_INT
;
...
@@ -627,21 +634,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -627,21 +634,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
this
.
saveIncome
(
tIncomeDetail
);
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
else
{
}
else
{
Integer
myNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
socialNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
ONE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
fundNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
TWO_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
insureNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
THREE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
Integer
salaryNum
=
numMap
.
get
(
month
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
FOUR_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
());
// 红冲判断:当本类型是最大值,才可以红冲
// 红冲判断:当本类型是最大值,才可以红冲
if
(
myNum
!=
null
&&
myNum
>
ifNullToZero
(
socialNum
)
&&
myNum
>
ifNullToZero
(
fundNum
)
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
return
this
.
saveIncome
(
tIncomeDetail
);
&&
myNum
>
ifNullToZero
(
insureNum
)
&&
myNum
>
ifNullToZero
(
salaryNum
))
{
return
this
.
saveIncome
(
tIncomeDetail
);
}
}
}
return
false
;
return
false
;
}
}
...
...
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