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
f50328f2
Commit
f50328f2
authored
Sep 07, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成收入接口修改
parent
474bc11c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
229 additions
and
82 deletions
+229
-82
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+5
-7
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+135
-46
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+76
-15
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+13
-14
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
f50328f2
...
...
@@ -5875,6 +5875,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
socialDaprUtils
.
createTIncomeDetail
(
detail
);
}
...
...
@@ -5887,13 +5888,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
for
(
TIncomeDetail
detail
:
detailList
.
getData
().
getDetailList
())
{
TIncomeDetail
detail1
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
detail
,
detail1
);
socialDaprUtils
.
deleteById
(
detail
);
//已推送的数据生成红冲数据
if
(
settle
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
||
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
)
{
detail1
.
setMoney
(
detail1
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
detail1
.
setId
(
CommonConstants
.
NULL
);
detail1
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail1
.
setMoney
(
detail1
.
getMoney
().
negate
());
socialDaprUtils
.
createTIncomeDetail
(
detail1
);
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
f50328f2
...
...
@@ -49,6 +49,8 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -104,7 +106,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
final
TForecastLibraryService
forecastLibraryService
;
private
final
TIncomeDetailMapper
detailMapper
;
private
final
TIncomeDetailService
detailService
;
private
final
TIncomeService
incomeService
;
/**
* 派单信息记录表简单分页查询
...
...
@@ -3138,6 +3142,30 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf
.
setFundStatus
(
CommonConstants
.
FOUR_STRING
);
}
fundMapper
.
updateById
(
providentFund
);
//公积金办理成功增加收入
if
(
Common
.
isNotNull
(
dis
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getFundStatus
())){
int
monthDiff
;
// 获取最小的起缴月
Date
minStartDate
=
this
.
getMinDate
(
sf
);
// 再计算月份
monthDiff
=
DateUtil
.
getMonthDiff
(
minStartDate
,
new
Date
())
+
2
;
for
(
int
i
=
0
;
i
<
monthDiff
;
i
++)
{
//获取所有的预估数据
List
<
TForecastLibrary
>
libraryFundInfoList
=
null
;
libraryFundInfoList
=
forecastLibraryService
.
list
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
sf
.
getEmpIdcard
())
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
sf
.
getSettleDomain
())
.
eq
(
TForecastLibrary:
:
getProvidentPayMonth
,
DateUtil
.
addMonth
(
1
-
i
)));
if
(
Common
.
isNotNull
(
libraryFundInfoList
))
{
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
}
}
}
}
dis
.
setFundHandleRemark
(
ServiceUtil
.
ifNullToEmpty
(
handleRemark
));
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
initAuditInfo
(
auditInfo
,
(
DispatchConstants
.
DISPATCH_FUND_ADD_SUCCESS
+
handleRemark
),
CommonConstants
.
THREE_STRING
,
user
,
DispatchConstants
.
DISPATCH_FUND_ADD_SUCCESS
,
remark
);
...
...
@@ -3318,20 +3346,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
||
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getSocialStatus
())){
forecastLibraryService
.
updateForecastLibaryByDispatch
(
sf
);
}
//公积金办理成功增加收入
if
(
Common
.
isNotNull
(
dis
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
sf
.
getFundStatus
())){
int
monthDiff
;
// 获取最小的起缴月
Date
minStartDate
=
this
.
getMinDate
(
sf
);
// 再计算月份
monthDiff
=
DateUtil
.
getMonthDiff
(
minStartDate
,
new
Date
())
+
2
;
for
(
int
i
=
0
;
i
<
monthDiff
;
i
++)
{
//生成收入
createIncomeInfo
(
sf
,
DateUtil
.
addMonth
(
1
-
i
));
}
}
}
// 2.派减办理成功 处理预估 (不管社保还是公积金办理失败)
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
())
...
...
@@ -3999,12 +4013,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
minStartDate
;
}
public
void
createIncomeInfo
(
T
SocialFundInfo
library
,
String
createMonth
)
{
public
void
createIncomeInfo
(
T
ForecastLibrary
library
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
=
null
;
R
<
TSettleDomainListVo
>
listVo
=
null
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomain
());
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomain
Id
());
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
...
...
@@ -4014,44 +4028,119 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
}
//判断是否存在当月的社保或公积金收入数据
Boolean
isExist
=
false
;
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
incomeDetail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
incomeDetail
.
setDeptNo
(
library
.
getDeptNo
());
incomeDetail
.
setSourceType
(
CommonConstants
.
TWO_STRING
);
List
<
TIncomeDetail
>
detailList
=
detailService
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
))
{
BigDecimal
sumMoney
=
BigDecimal
.
ZERO
;
for
(
TIncomeDetail
income
:
detailList
)
{
sumMoney
=
BigDecimalUtils
.
safeAdd
(
income
.
getMoney
(),
sumMoney
);
}
if
(
sumMoney
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConstants
.
ONE_INT
)
{
isExist
=
true
;
}
}
//判断是否为按人次收费
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
.
contains
(
CommonConstants
.
TWO_STRING
))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
//预估模式只有按人次和人数收费
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
isSum
=
1
;
}
if
(!
isExist
||
isSum
==
1
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
());
}
}
}
else
{
BigDecimal
gMoney
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
isSum
=
2
;
}
else
{
gMoney
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getManagementFee
());
}
if
(!
isExist
||
isSum
==
2
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
);
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
settleDomain
.
getRiskServerItem
()
.
contains
(
CommonConstants
.
TWO_STRING
))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
isSum
=
3
;
}
if
(!
isExist
||
isSum
==
3
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
());
}
}
else
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
BigDecimal
money
=
BigDecimal
.
ZERO
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
money
=
settleDomain
.
getRiskFundFee
();
isSum
=
4
;
}
else
{
money
=
BigDecimalUtils
.
safeMultiply
(
library
.
getSumAll
(),
settleDomain
.
getRiskFundFee
());
}
if
(!
isExist
||
isSum
==
4
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
);
}
}
}
}
}
}
public
void
createIncomeInsurance
(
TForecastLibrary
library
,
TSettleDomain
settleDomain
,
String
feeType
,
String
charges
,
String
feeMode
,
BigDecimal
money
)
{
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setDeptName
(
library
.
getSettleDomain
Name
());
detail
.
setDeptNo
(
library
.
getSettleDomainCode
());
detail
.
setDeptId
(
library
.
getSettleDomain
());
detail
.
setDeptName
(
settleDomain
.
getDepart
Name
());
detail
.
setDeptNo
(
settleDomain
.
getDepartNo
());
detail
.
setDeptId
(
settleDomain
.
getId
());
detail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
detail
.
setEmpName
(
library
.
getEmpName
());
detail
.
setUnitNo
(
settleDomain
.
getCustomerNo
());
detail
.
setUnitId
(
library
.
getUnit
Id
());
detail
.
setUnitName
(
library
.
getUnit
Name
());
detail
.
setUnitId
(
settleDomain
.
getCustomer
Id
());
detail
.
setUnitName
(
settleDomain
.
getCustomer
Name
());
detail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
detail
.
setSourceId
(
library
.
getId
());
detail
.
setSourceType
(
CommonConstants
.
TWO_STRING
);
detail
.
setCreateMonth
(
createMonth
);
detail
.
setPayMonth
(
createMonth
);
detail
.
setCreateMonth
(
library
.
getProvidentCreateMonth
());
detail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
detail
.
setMoney
(
money
);
detail
.
setFeeType
(
feeType
);
detail
.
setFeeMode
(
feeMode
);
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setMoney
(
BigDecimalUtils
.
safeAdd
(
library
.
getUnitFundSum
(),
library
.
getPersonalFundSum
()));
//管理费和风险金收取
managemeRisk
(
settleDomain
,
detail
);
}
public
void
managemeRisk
(
TSettleDomain
settleDomain
,
TIncomeDetail
detail
)
{
//管理费和风险金是否收取
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
detail
.
setFeeType
(
CommonConstants
.
ONE_STRING
);
detail
.
setFeeMode
(
settleDomain
.
getManagementType
());
detail
.
setCharges
(
settleDomain
.
getManagementFee
().
toString
());
detail
.
setId
(
CommonConstants
.
NULL
);
detailMapper
.
insert
(
detail
);
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
detail
.
setFeeType
(
CommonConstants
.
TWO_STRING
);
detail
.
setFeeMode
(
settleDomain
.
getRiskFundType
());
detail
.
setCharges
(
settleDomain
.
getRiskFundFee
().
toString
());
detail
.
setId
(
CommonConstants
.
NULL
);
detailMapper
.
insert
(
detail
);
}
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setId
(
CommonConstants
.
NULL
);
incomeService
.
saveDetail
(
detail
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
f50328f2
...
...
@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
...
...
@@ -1553,11 +1554,21 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
baseMapper
.
deleteById
(
library
.
getId
());
}
//删除停缴月以后的收入数据
detailService
.
remove
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
().
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
List
<
TIncomeDetail
>
updateList
=
detailService
.
list
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
library
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TIncomeDetail:
:
getPayMonth
,
library
.
getSocialPayMonth
()));
if
(
Common
.
isNotNull
(
updateList
))
{
for
(
TIncomeDetail
upd
:
updateList
)
{
TIncomeDetail
detail
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
upd
,
detail
);
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail
.
setMoney
(
detail
.
getMoney
().
negate
());
incomeService
.
saveDetail
(
detail
);
}
}
}
private
void
calculateFundType
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
...
...
@@ -1581,10 +1592,21 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
//删除停缴月以后的收入数据
detailService
.
remove
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
().
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
List
<
TIncomeDetail
>
updateList
=
detailService
.
list
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
library
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
library
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
TWO_STRING
)
.
eq
(
TIncomeDetail:
:
getPayMonth
,
library
.
getSocialPayMonth
()));
if
(
Common
.
isNotNull
(
updateList
))
{
for
(
TIncomeDetail
upd
:
updateList
)
{
TIncomeDetail
detail
=
new
TIncomeDetail
();
BeanCopyUtils
.
copyProperties
(
upd
,
detail
);
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ONE_STRING
);
detail
.
setMoney
(
detail
.
getMoney
().
negate
());
incomeService
.
saveDetail
(
detail
);
}
}
}
/**
...
...
@@ -1790,7 +1812,23 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
isSaveAndUpdate
=
true
;
}
}
}
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
//获取所有的预估数据
List
<
TForecastLibrary
>
librarySocialInfoList
=
null
;
librarySocialInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
));
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
}
...
...
@@ -2114,12 +2152,28 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library
.
setCreateName
(
"定时生成"
);
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
//办理成功生成收入
createIncomeInfo
(
library
);
}
isSaveAndUpdate
=
true
;
}
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
//获取所有的预估数据
List
<
TForecastLibrary
>
librarySocialInfoList
=
null
;
librarySocialInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
));
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
}
}
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
}
else
{
...
...
@@ -2475,14 +2529,14 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
fundParam
.
setFd_3adfeb52a4d2e2
(
CommonConstants
.
EMPTY_STRING
);
}
//缴纳月份
if
(
Common
.
isNotNull
(
library
.
get
Social
PayMonth
()))
{
fundParam
.
setFd_3adfe8cf632700
(
dateStringInsert
(
library
.
get
Social
PayMonth
()));
if
(
Common
.
isNotNull
(
library
.
get
Provident
PayMonth
()))
{
fundParam
.
setFd_3adfe8cf632700
(
dateStringInsert
(
library
.
get
Provident
PayMonth
()));
}
else
{
fundParam
.
setFd_3adfe8cf632700
(
CommonConstants
.
EMPTY_STRING
);
}
//生成月份
if
(
Common
.
isNotNull
(
library
.
get
Social
CreateMonth
()))
{
fundParam
.
setFd_3adfe8cb96c41e
(
dateStringInsert
(
library
.
get
Social
CreateMonth
()));
if
(
Common
.
isNotNull
(
library
.
get
Provident
CreateMonth
()))
{
fundParam
.
setFd_3adfe8cb96c41e
(
dateStringInsert
(
library
.
get
Provident
CreateMonth
()));
}
else
{
fundParam
.
setFd_3adfe8cb96c41e
(
CommonConstants
.
EMPTY_STRING
);
}
...
...
@@ -2600,7 +2654,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
incomeDetail
.
setSourceType
(
sourceType
);
List
<
TIncomeDetail
>
detailList
=
detailService
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
))
{
isExist
=
true
;
BigDecimal
sumMoney
=
BigDecimal
.
ZERO
;
for
(
TIncomeDetail
income
:
detailList
)
{
sumMoney
=
BigDecimalUtils
.
safeAdd
(
income
.
getMoney
(),
sumMoney
);
}
if
(
sumMoney
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConstants
.
ONE_INT
)
{
isExist
=
true
;
}
}
//判断是否为按人次收费
...
...
@@ -2608,8 +2668,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
)))
{
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
)
)))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
...
...
@@ -2641,8 +2701,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
)))
{
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
)
)))
{
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
...
...
@@ -2704,6 +2764,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
detail
.
setFeeMode
(
feeMode
);
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setId
(
CommonConstants
.
NULL
);
incomeService
.
saveDetail
(
detail
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
f50328f2
...
...
@@ -28,12 +28,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
...
@@ -48,8 +45,6 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
...
...
@@ -64,7 +59,6 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo
;
import
lombok.extern.log4j.Log4j2
;
import
org.checkerframework.checker.units.qual.C
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -2693,24 +2687,28 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
Boolean
exitFlag
=
false
;
TIncomeDetail
exitIncome
=
new
TIncomeDetail
();
List
<
TIncomeDetail
>
exitIncome
=
new
ArrayList
<>
();
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
exitIncome
=
detailMapper
.
select
One
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
exitIncome
=
detailMapper
.
select
List
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
paymentInfo
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getPayMonth
,
paymentInfo
.
getSocialPayMonth
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
paymentInfo
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
ONE_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
ONE_STRING
));
}
else
{
exitIncome
=
detailMapper
.
select
One
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
exitIncome
=
detailMapper
.
select
List
(
Wrappers
.<
TIncomeDetail
>
query
().
lambda
()
.
eq
(
TIncomeDetail:
:
getEmpIdcard
,
paymentInfo
.
getEmpIdcard
())
.
eq
(
TIncomeDetail:
:
getPayMonth
,
paymentInfo
.
getSocialPayMonth
())
.
eq
(
TIncomeDetail:
:
getDeptId
,
paymentInfo
.
getSettleDomainId
())
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
TWO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
TIncomeDetail:
:
getSourceType
,
CommonConstants
.
TWO_STRING
));
}
if
(
Common
.
isNotNull
(
exitIncome
))
{
exitFlag
=
true
;
BigDecimal
sumMoney
=
BigDecimal
.
ZERO
;
for
(
TIncomeDetail
income
:
exitIncome
)
{
sumMoney
=
BigDecimalUtils
.
safeAdd
(
income
.
getMoney
(),
sumMoney
);
}
if
(
sumMoney
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConstants
.
ONE_INT
)
{
exitFlag
=
true
;
}
}
//判断是否为按人次收费
...
...
@@ -2821,6 +2819,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
detail
.
setCharges
(
charges
);
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
incomeService
.
saveDetail
(
detail
);
}
...
...
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