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
ae53bd82
Commit
ae53bd82
authored
Dec 16, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
cad93bb2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
64 deletions
+55
-64
TForecastLibraryService.java
.../plus/v1/yifu/social/service/TForecastLibraryService.java
+4
-2
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+50
-61
DoSocialTask.java
...com/yifu/cloud/plus/v1/yifu/social/util/DoSocialTask.java
+1
-1
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TForecastLibraryService.java
View file @
ae53bd82
...
...
@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
...
...
@@ -30,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 预估费用
...
...
@@ -128,8 +130,8 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
void
createForecastInfo
();
void
createForecastFundInfo
();
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
);
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
,
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
);
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
);
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
,
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
ae53bd82
...
...
@@ -33,8 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
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.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
...
...
@@ -48,13 +46,11 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper;
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.service.TSendEkpErrorService
;
import
com.yifu.cloud.plus.v1.yifu.social.util.DoJointSocialTask
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -83,18 +79,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private
final
SysBaseSetInfoMapper
sysBaseSetInfoMapper
;
private
final
EkpFundUtil
ekpFundUtil
;
private
final
EkpSocialUtil
ekpSocialUtil
;
private
final
TIncomeDetailService
detailService
;
private
final
TIncomeService
incomeService
;
private
final
ArchivesDaprUtil
archivesDaprUtil
;
private
final
TSendEkpErrorService
tSendEkpErrorService
;
@Autowired
private
DoJointSocialTask
doJointSocialTask
;
...
...
@@ -326,6 +316,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List
<
TForecastLibrary
>
libraryFundInfoListSocial
=
new
ArrayList
<>();
List
<
TForecastLibrary
>
libraryFundInfoListFund
=
new
ArrayList
<>();
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
this
.
getSelectVoMap
();
for
(
TForecastLibrary
library
:
saveLibraryMap
.
values
())
{
if
(
Common
.
isEmpty
(
library
.
getSocialId
())
&&
Common
.
isEmpty
(
library
.
getProvidentId
()))
{
continue
;
...
...
@@ -350,7 +341,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())))
{
//办理成功生成收入
createIncomeInfo
(
library
,
true
);
createIncomeInfo
(
library
,
true
,
mapSelectVo
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListSocial
.
add
(
library
);
}
...
...
@@ -363,7 +354,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
socialFundInfoF
)
&&
(
Common
.
isNotNull
(
socialFundInfoF
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfoF
.
getFundStatus
())))
{
//办理成功生成收入
createIncomeInfo
(
library
,
true
);
createIncomeInfo
(
library
,
true
,
mapSelectVo
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListFund
.
add
(
library
);
}
...
...
@@ -371,11 +362,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
,
true
);
pushForecastInfo
(
libraryFundInfoListSocial
,
true
,
mapSelectVo
);
}
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
,
true
);
pushForecastFundInfo
(
libraryFundInfoListFund
,
true
,
mapSelectVo
);
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
...
...
@@ -1575,11 +1566,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
,
false
);
pushForecastInfo
(
libraryFundInfoListSocial
,
false
,
null
);
}
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
,
false
);
pushForecastFundInfo
(
libraryFundInfoListFund
,
false
,
null
);
}
}
return
R
.
ok
();
...
...
@@ -1895,15 +1886,16 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
));
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
this
.
getSelectVoMap
();
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
,
synFlag
);
createIncomeInfo
(
library
,
synFlag
,
mapSelectVo
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
librarySocialInfoList1
.
add
(
library
);
}
}
if
(
Common
.
isNotNull
(
librarySocialInfoList1
))
{
this
.
pushForecastInfo
(
librarySocialInfoList1
,
synFlag
);
this
.
pushForecastInfo
(
librarySocialInfoList1
,
synFlag
,
mapSelectVo
);
}
}
}
...
...
@@ -2228,6 +2220,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
List
<
TForecastLibrary
>
libraryFundInfoListSocial
=
new
ArrayList
<>();
List
<
TForecastLibrary
>
libraryFundInfoListFund
=
new
ArrayList
<>();
//社保收入
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
this
.
getSelectVoMap
();
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
...
...
@@ -2242,7 +2235,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
librarySocialInfoList
))
{
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
,
true
);
createIncomeInfo
(
library
,
true
,
mapSelectVo
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListSocial
.
add
(
library
);
}
...
...
@@ -2264,7 +2257,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
libraryFundInfoList
))
{
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
,
true
);
createIncomeInfo
(
library
,
true
,
mapSelectVo
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListFund
.
add
(
library
);
}
...
...
@@ -2273,11 +2266,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
,
true
);
pushForecastInfo
(
libraryFundInfoListSocial
,
true
,
mapSelectVo
);
}
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
,
true
);
pushForecastFundInfo
(
libraryFundInfoListFund
,
true
,
mapSelectVo
);
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
...
...
@@ -2396,24 +2389,40 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
@Override
public
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
)
{
public
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
,
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
)
{
if
(
Common
.
isNotNull
(
library
))
{
//推送数据封装并推送
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
=
this
.
getSelectVoMap
();
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
;
if
(
Common
.
isNotNull
(
mapSelectVo
))
{
selectVoMap
=
mapSelectVo
;
}
else
{
selectVoMap
=
this
.
getSelectVoMap
();
}
initEkpPushSocialParam
(
library
,
synFlag
,
selectVoMap
);
if
(
null
!=
selectVoMap
)
{
selectVoMap
.
clear
();
}
}
}
@Override
public
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
)
{
public
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
,
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
)
{
if
(
Common
.
isNotNull
(
library
))
{
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
;
if
(
Common
.
isNotNull
(
mapSelectVo
))
{
selectVoMap
=
mapSelectVo
;
}
else
{
selectVoMap
=
this
.
getSelectVoMap
();
}
//推送数据封装并推送
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
=
this
.
getSelectVoMap
();
initEkpPushFundParam
(
library
,
synFlag
,
selectVoMap
);
if
(
null
!=
selectVoMap
)
{
selectVoMap
.
clear
();
}
}
}
public
void
initEkpPushSocialParam
(
List
<
TForecastLibrary
>
unPushInfo
,
boolean
synFlag
,
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
)
{
...
...
@@ -2425,20 +2434,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
public
void
createIncomeInfo
(
TForecastLibrary
library
,
boolean
synFlag
)
{
public
void
createIncomeInfo
(
TForecastLibrary
library
,
boolean
synFlag
,
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomainId
());
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
for
(
TSettleDomainSelectVo
vo
:
settleDomainR
)
{
BeanUtils
.
copyProperties
(
vo
,
settleDomain
);
}
}
if
(
Common
.
isNotNull
(
mapSelectVo
))
{
settleDomain
=
mapSelectVo
.
get
(
library
.
getDeptNo
());
}
//判断是否存在当月的社保或公积金收入数据
...
...
@@ -2474,25 +2474,21 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
))))
{
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
)))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
//预估模式
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
(),
sourceType
,
synFlag
);
}
settleDomain
.
getManagementFee
(),
sourceType
,
synFlag
);
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
))))
{
//预估模式
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
())
&&
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
)))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
//预估模式
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
(),
sourceType
,
synFlag
);
}
settleDomain
.
getRiskFundFee
(),
sourceType
,
synFlag
);
}
}
}
...
...
@@ -2539,11 +2535,4 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
detail
.
setId
(
CommonConstants
.
NULL
);
incomeService
.
saveDetail
(
detail
,
synFlag
);
}
public
String
dateStringInsert
(
String
month
)
{
StringBuilder
sb
=
new
StringBuilder
(
month
);
sb
.
insert
(
4
,
"-"
);
return
sb
.
toString
();
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoSocialTask.java
View file @
ae53bd82
...
...
@@ -89,7 +89,7 @@ public class DoSocialTask {
}
}
}
forecastLibraryService
.
pushForecastFundInfo
(
libs
,
false
);
forecastLibraryService
.
pushForecastFundInfo
(
libs
,
false
,
null
);
}
// 获取预估库数据并推送
if
(
type
==
CommonConstants
.
THREE_INT
){
...
...
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