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
71ef381e
Commit
71ef381e
authored
Sep 12, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成收入接口修改
parent
bf195c6c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
566 additions
and
215 deletions
+566
-215
TIncomeService.java
...ifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
+8
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+9
-6
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+59
-48
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+345
-18
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+145
-143
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
View file @
71ef381e
...
...
@@ -57,6 +57,14 @@ public interface TIncomeService extends IService<TIncome> {
**/
boolean
saveDetail
(
TIncomeDetail
tIncomeDetail
);
/**
* @Description: 新增收入明细-详情表,同时统计;
* @Author: huyc
* @Date: 2022/9/9 11:42
* @return:
**/
void
saveBathDetail
(
List
<
TIncomeDetail
>
tIncomeDetail
);
void
pushDetail
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
71ef381e
...
...
@@ -4029,7 +4029,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
//判断是否存在当月的
社保或
公积金收入数据
//判断是否存在当月的公积金收入数据
Boolean
isExist
=
false
;
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
...
...
@@ -4047,6 +4047,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
...
...
@@ -4067,11 +4068,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
}
else
{
isSum
=
1
;
gMoney
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getManagementFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
THRE
E_INT
,
BigDecimal
.
ROUND_HALF_UP
));
CommonConstants
.
FIV
E_INT
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(!
isExist
)
{
if
(!
isExist
||
isSum
==
1
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
);
}
...
...
@@ -4093,14 +4095,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
BigDecimal
money
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
get
Management
Type
()))
{
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
get
RiskFund
Type
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
{
isSum
=
2
;
money
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
THRE
E_INT
,
BigDecimal
.
ROUND_HALF_UP
));
CommonConstants
.
FIV
E_INT
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(!
isExist
)
{
if
(!
isExist
||
isSum
==
2
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
71ef381e
...
...
@@ -2183,22 +2183,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
isSaveAndUpdate
=
true
;
}
if
((
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
//社保收入
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
||
(
Common
.
isNotNull
(
socialFundInfo
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getFundStatus
())))
{
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
//获取所有的预估数据
List
<
TForecastLibrary
>
librarySocialInfoList
=
null
;
librarySocialInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
.
and
(
obj
->
obj
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
or
()
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
))
);
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
));
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
...
...
@@ -2207,6 +2202,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
//公积金收入
if
(
Common
.
isNotNull
(
socialFundInfo
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getFundStatus
()))
{
//获取所有的预估数据
List
<
TForecastLibrary
>
libraryFundInfoList
=
null
;
libraryFundInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
));
if
(
Common
.
isNotNull
(
libraryFundInfoList
))
{
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
}
}
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
}
else
{
...
...
@@ -2288,6 +2302,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public
void
initEkpPushSocialParam
(
List
<
TForecastLibrary
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
for
(
TForecastLibrary
library
:
unPushInfo
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
...
...
@@ -2520,6 +2535,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
map
.
get
(
body
)
>
0
)
{
int
i
=
map
.
get
(
body
)
+
1
;
map
.
put
(
body
,
i
);
idMap
.
put
(
body
,
library
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updatePushStatus
(
pushList
);
...
...
@@ -2531,30 +2547,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
Error
(
error
);
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
i
);
tSendEkpErrorService
.
saveError
(
error
);
}
else
{
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
}
}
}
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
1
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
error
.
setTitle
(
key
);
error
.
setLinkId
(
idMap
.
get
(
key
));
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
//更新推送状态
if
(
Common
.
isNotNull
(
pushList
))
{
...
...
@@ -2565,6 +2576,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public
void
initEkpPushFundParam
(
List
<
TForecastLibrary
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
for
(
TForecastLibrary
library
:
unPushInfo
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
...
...
@@ -2693,6 +2705,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
map
.
get
(
body
)
>
0
)
{
int
i
=
map
.
get
(
body
)
+
1
;
map
.
put
(
body
,
i
);
idMap
.
put
(
body
,
library
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updatePushStatus
(
pushList
);
...
...
@@ -2704,30 +2717,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
Error
(
error
);
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
i
);
tSendEkpErrorService
.
saveError
(
error
);
}
else
{
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
}
}
}
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
1
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
error
.
setLinkId
(
idMap
.
get
(
key
));
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
//更新推送状态
if
(
Common
.
isNotNull
(
pushList
))
{
...
...
@@ -2780,6 +2788,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
...
...
@@ -2800,11 +2809,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
}
else
{
isSum
=
1
;
gMoney
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getManagementFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
THRE
E_INT
,
BigDecimal
.
ROUND_HALF_UP
));
CommonConstants
.
FIV
E_INT
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(!
isExist
)
{
if
(!
isExist
||
isSum
==
1
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
,
sourceType
);
...
...
@@ -2828,14 +2838,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
BigDecimal
money
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
get
Management
Type
()))
{
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
get
RiskFund
Type
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
{
isSum
=
2
;
money
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
THRE
E_INT
,
BigDecimal
.
ROUND_HALF_UP
));
CommonConstants
.
FIV
E_INT
,
BigDecimal
.
ROUND_HALF_UP
));
}
if
(!
isExist
)
{
if
(!
isExist
||
isSum
==
2
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
,
sourceType
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
71ef381e
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
71ef381e
This diff is collapsed.
Click to expand it.
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