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
97a278ba
Commit
97a278ba
authored
Dec 12, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.2:推送优化--预估
parent
e3f29ac5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
43 deletions
+80
-43
TSettleDomainListVo.java
...u/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
+1
-1
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+5
-0
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+1
-0
Common.java
.../com/yifu/cloud/plus/v1/yifu/common/core/util/Common.java
+4
-0
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+69
-42
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
View file @
97a278ba
...
...
@@ -14,7 +14,7 @@ public class TSettleDomainListVo {
*/
private
List
<
TSettleDomainSelectVo
>
listSelectVO
;
private
Map
<
String
,
TSettleDomainSelectVo
>
mapSlectVo
;
private
Map
<
String
,
TSettleDomainSelectVo
>
mapS
e
lectVo
;
private
Map
<
String
,
TSettleDomain
>
mapVO
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
97a278ba
...
...
@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TDepartSettlementInfoService
import
com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
...
...
@@ -42,6 +43,7 @@ import java.io.UnsupportedEncodingException;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -169,6 +171,9 @@ public class TSettleDomainController {
List
<
TSettleDomainSelectVo
>
list
=
tSettleDomainService
.
selectAllSettleDomainSelectVos
();
TSettleDomainListVo
listVo
=
new
TSettleDomainListVo
();
listVo
.
setListSelectVO
(
list
);
if
(
Common
.
isNotNull
(
list
)){
listVo
.
setMapSelectVo
(
list
.
stream
().
collect
(
Collectors
.
toMap
(
TSettleDomain:
:
getDepartNo
,
k
->
k
)));
}
return
listVo
;
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
97a278ba
...
...
@@ -505,4 +505,5 @@ public interface CommonConstants {
// 权限使用的
public
static
final
String
A_DEPT_ID
=
"a.dept_id"
;
public
static
final
String
A_CREATE_BY
=
"a.CREATE_BY"
;
String
SETTLE_DOMAIN_GET_ERROR
=
"获取结算主体信息失败!"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/Common.java
View file @
97a278ba
...
...
@@ -62,6 +62,10 @@ public class Common {
return
null
==
obj
||
""
.
equals
(
obj
)
||
"null"
.
equals
(
obj
);
}
public
static
boolean
isEmpty
(
Map
obj
)
{
return
(
null
==
obj
||
obj
.
size
()
==
0
);
}
public
static
boolean
isEmpty
(
List
obj
)
{
return
(
null
==
obj
||
obj
.
size
()
==
0
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
97a278ba
...
...
@@ -2337,25 +2337,63 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
@Override
public
void
createForecastInfo
()
{
//获取所有未推送的社保预估明细数据
List
<
TForecastLibrary
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
count
>
0
)
{
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
=
this
.
getSelectVoMap
();
//获取所有未推送的社保预估明细数据
List
<
TForecastLibrary
>
unPushInfo
=
null
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
last
(
" limit 0, 10000"
));
if
(
Common
.
isNotNull
(
unPushInfo
)){
//推送数据封装并推送
initEkpPushSocialParam
(
unPushInfo
,
true
);
initEkpPushSocialParam
(
unPushInfo
,
true
,
selectVoMap
);
}
}
unPushInfo
.
clear
();
selectVoMap
.
clear
();
}
}
private
Map
<
String
,
TSettleDomainSelectVo
>
getSelectVoMap
()
{
R
<
TSettleDomainListVo
>
settleDomainR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
null
;
if
(
Common
.
isNotNull
(
settleDomainR
)
&&
Common
.
isNotNull
(
settleDomainR
.
getData
())){
mapSelectVo
=
settleDomainR
.
getData
().
getMapSelectVo
();
}
if
(
Common
.
isEmpty
(
mapSelectVo
)){
ServiceUtil
.
runTimeExceptionDiy
(
CommonConstants
.
SETTLE_DOMAIN_GET_ERROR
);
}
return
mapSelectVo
;
}
@Override
public
void
createForecastFundInfo
()
{
//获取所有未推送的公积金预估明细数据
List
<
TForecastLibrary
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
count
>
0
)
{
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
=
this
.
getSelectVoMap
();
//获取所有未推送的公积金预估明细数据
List
<
TForecastLibrary
>
unPushInfo
=
null
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
last
(
" limit 0, 10000"
));
if
(
Common
.
isNotNull
(
unPushInfo
)){
//推送数据封装并推送
initEkpPushFundParam
(
unPushInfo
,
true
);
initEkpPushFundParam
(
unPushInfo
,
true
,
selectVoMap
);
}
}
unPushInfo
.
clear
();
selectVoMap
.
clear
();
}
}
...
...
@@ -2363,7 +2401,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public
void
pushForecastInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
)
{
if
(
Common
.
isNotNull
(
library
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
library
,
synFlag
);
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
=
this
.
getSelectVoMap
();
initEkpPushSocialParam
(
library
,
synFlag
,
selectVoMap
);
selectVoMap
.
clear
();
}
}
...
...
@@ -2371,33 +2411,26 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
public
void
pushForecastFundInfo
(
List
<
TForecastLibrary
>
library
,
boolean
synFlag
)
{
if
(
Common
.
isNotNull
(
library
))
{
//推送数据封装并推送
initEkpPushFundParam
(
library
,
synFlag
);
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
=
this
.
getSelectVoMap
();
initEkpPushFundParam
(
library
,
synFlag
,
selectVoMap
);
selectVoMap
.
clear
();
}
}
public
void
initEkpPushSocialParam
(
List
<
TForecastLibrary
>
unPushInfo
,
boolean
synFlag
)
{
R
<
TSettleDomainListVo
>
listVo
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
public
void
initEkpPushSocialParam
(
List
<
TForecastLibrary
>
unPushInfo
,
boolean
synFlag
,
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
)
{
TSettleDomain
settleDomain
;
EkpPushSocialParam
socialParam
;
for
(
TForecastLibrary
library
:
unPushInfo
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
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
.
isEmpty
(
listVo
)
||
CommonConstants
.
SUCCESS
!=
listVo
.
getCode
()){
settleDomain
=
selectVoMap
.
get
(
library
.
getDeptNo
());
if
(
Common
.
isEmpty
(
settleDomain
)){
ServiceUtil
.
runTimeExceptionDiy
(
"获取结算主体异常,请检查传参和档案服务状态!"
);
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getSocialType
()))
{
continue
;
}
EkpPushSocialParam
socialParam
=
new
EkpPushSocialParam
();
socialParam
=
new
EkpPushSocialParam
();
//员工姓名
socialParam
.
setFd_3adfe8c79989d4
(
library
.
getEmpName
());
//员工身份证
...
...
@@ -2619,26 +2652,20 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
public
void
initEkpPushFundParam
(
List
<
TForecastLibrary
>
unPushInfo
,
boolean
synFlag
)
{
R
<
TSettleDomainListVo
>
listVo
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
public
void
initEkpPushFundParam
(
List
<
TForecastLibrary
>
unPushInfo
,
boolean
synFlag
,
Map
<
String
,
TSettleDomainSelectVo
>
selectVoMap
)
{
TSettleDomain
settleDomain
;
EkpPushFundParam
fundParam
;
for
(
TForecastLibrary
library
:
unPushInfo
)
{
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
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
);
}
}
settleDomain
=
selectVoMap
.
get
(
library
.
getDeptNo
());
if
(
Common
.
isEmpty
(
settleDomain
)){
ServiceUtil
.
runTimeExceptionDiy
(
"获取结算主体异常,请检查传参和档案服务状态!"
);
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getFundType
()))
{
continue
;
}
EkpPushFundParam
fundParam
=
new
EkpPushFundParam
();
fundParam
=
new
EkpPushFundParam
();
//员工姓名
fundParam
.
setFd_3adfe8c79989d4
(
library
.
getEmpName
());
//员工身份证
...
...
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