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
a06adabf
Commit
a06adabf
authored
Mar 05, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
明细接口改造
parent
d64aab7d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
125 deletions
+122
-125
EkpPushSocialParam.java
...om/yifu/cloud/plus/v1/yifu/ekp/vo/EkpPushSocialParam.java
+4
-0
OTAStrategyShardingAlgorithm.java
...loud/plus/v1/ekp/config/OTAStrategyShardingAlgorithm.java
+12
-12
EkpSocialInfoServiceImpl.java
...ud/plus/v1/ekp/service/impl/EkpSocialInfoServiceImpl.java
+75
-52
EkpSocialInfoMapper.xml
...ekp-biz/src/main/resources/mapper/EkpSocialInfoMapper.xml
+1
-1
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+30
-60
No files found.
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpPushSocialParam.java
View file @
a06adabf
...
@@ -265,4 +265,8 @@ public class EkpPushSocialParam implements Serializable {
...
@@ -265,4 +265,8 @@ public class EkpPushSocialParam implements Serializable {
* 社保ids
* 社保ids
**/
**/
private
String
socialIds
;
private
String
socialIds
;
/**
* 是否为预估
**/
private
String
ygFlag
;
}
}
\ No newline at end of file
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/config/OTAStrategyShardingAlgorithm.java
View file @
a06adabf
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
config
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
ekp
.
config
;
import
com.google.common.collect.Range
;
import
com.google.common.collect.Range
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm
;
import
org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
@Component
@Component
public
class
OTAStrategyShardingAlgorithm
implements
StandardShardingAlgorithm
<
LocalDateTime
>
{
public
class
OTAStrategyShardingAlgorithm
implements
StandardShardingAlgorithm
<
String
>
{
private
static
final
DateTimeFormatter
yyyy
=
DateTimeFormatter
.
ofPattern
(
"yyyy"
);
private
static
final
DateTimeFormatter
yyyy
=
DateTimeFormatter
.
ofPattern
(
"yyyy"
);
...
@@ -24,10 +24,10 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
...
@@ -24,10 +24,10 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
* @return
* @return
*/
*/
@Override
@Override
public
String
doSharding
(
Collection
<
String
>
collection
,
PreciseShardingValue
<
LocalDateTime
>
preciseShardingValue
)
{
public
String
doSharding
(
Collection
<
String
>
collection
,
PreciseShardingValue
<
String
>
preciseShardingValue
)
{
LocalDateTime
value
=
preciseShardingValue
.
getValue
();
String
value
=
preciseShardingValue
.
getValue
();
String
tableSuffix
=
value
.
format
(
yyyy
);
String
tableSuffix
=
value
.
substring
(
0
,
4
);
String
logicTableName
=
preciseShardingValue
.
getLogicTableName
();
String
logicTableName
=
preciseShardingValue
.
getLogicTableName
();
String
table
=
logicTableName
.
concat
(
"_"
).
concat
(
tableSuffix
);
String
table
=
logicTableName
.
concat
(
"_"
).
concat
(
tableSuffix
);
return
collection
.
stream
().
filter
(
s
->
s
.
equals
(
table
)).
findFirst
().
orElseThrow
(()
->
new
RuntimeException
(
"逻辑分表不存在"
));
return
collection
.
stream
().
filter
(
s
->
s
.
equals
(
table
)).
findFirst
().
orElseThrow
(()
->
new
RuntimeException
(
"逻辑分表不存在"
));
...
@@ -42,12 +42,12 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
...
@@ -42,12 +42,12 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
* @return
* @return
*/
*/
@Override
@Override
public
Collection
<
String
>
doSharding
(
Collection
<
String
>
collection
,
RangeShardingValue
<
LocalDateTime
>
rangeShardingValue
)
{
public
Collection
<
String
>
doSharding
(
Collection
<
String
>
collection
,
RangeShardingValue
<
String
>
rangeShardingValue
)
{
// 逻辑表名
// 逻辑表名
String
logicTableName
=
rangeShardingValue
.
getLogicTableName
();
String
logicTableName
=
rangeShardingValue
.
getLogicTableName
();
// 范围参数
// 范围参数
Range
<
LocalDateTime
>
valueRange
=
rangeShardingValue
.
getValueRange
();
Range
<
String
>
valueRange
=
rangeShardingValue
.
getValueRange
();
Set
<
String
>
queryRangeTables
=
extracted
(
logicTableName
,
valueRange
.
lowerEndpoint
(),
valueRange
.
upperEndpoint
());
Set
<
String
>
queryRangeTables
=
extracted
(
logicTableName
,
valueRange
.
lowerEndpoint
(),
valueRange
.
upperEndpoint
());
ArrayList
<
String
>
tables
=
new
ArrayList
<>(
collection
);
ArrayList
<
String
>
tables
=
new
ArrayList
<>(
collection
);
tables
.
retainAll
(
queryRangeTables
);
tables
.
retainAll
(
queryRangeTables
);
...
@@ -63,12 +63,12 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
...
@@ -63,12 +63,12 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
* @Date 2022-07-21
* @Date 2022-07-21
* @return 物理表名集合
* @return 物理表名集合
*/
*/
private
Set
<
String
>
extracted
(
String
logicTableName
,
LocalDateTime
lowerEndpoint
,
LocalDateTime
upperEndpoint
)
{
private
Set
<
String
>
extracted
(
String
logicTableName
,
String
lowerEndpoint
,
String
upperEndpoint
)
{
Set
<
String
>
rangeTable
=
new
HashSet
<>();
Set
<
String
>
rangeTable
=
new
HashSet
<>();
while
(
lowerEndpoint
.
isBefore
(
upperEndpoint
))
{
while
(
DateUtil
.
stringToDate
(
lowerEndpoint
+
"01"
).
before
(
DateUtil
.
stringToDate
(
upperEndpoint
+
"01"
)
))
{
String
str
=
getTableNameByDate
(
lowerEndpoint
,
logicTableName
);
String
str
=
getTableNameByDate
(
lowerEndpoint
,
logicTableName
);
rangeTable
.
add
(
str
);
rangeTable
.
add
(
str
);
lowerEndpoint
=
lowerEndpoint
.
plusYears
(
1
);
lowerEndpoint
=
DateUtil
.
dateToString
(
DateUtil
.
dateIncreaseByYear
(
DateUtil
.
stringToDate
(
lowerEndpoint
+
"01"
),
1
),
DateUtil
.
DATETIME_YYYYMM
);
}
}
// 获取物理表明
// 获取物理表明
String
tableName
=
getTableNameByDate
(
upperEndpoint
,
logicTableName
);
String
tableName
=
getTableNameByDate
(
upperEndpoint
,
logicTableName
);
...
@@ -84,8 +84,8 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
...
@@ -84,8 +84,8 @@ public class OTAStrategyShardingAlgorithm implements StandardShardingAlgorithm<L
* @Date 2022-07-21
* @Date 2022-07-21
* @return 物理表名
* @return 物理表名
*/
*/
private
String
getTableNameByDate
(
LocalDateTime
dateTime
,
String
logicTableName
)
{
private
String
getTableNameByDate
(
String
dateTime
,
String
logicTableName
)
{
String
tableSuffix
=
dateTime
.
format
(
yyyy
);
String
tableSuffix
=
dateTime
.
substring
(
0
,
4
);
return
logicTableName
.
concat
(
"_"
).
concat
(
tableSuffix
);
return
logicTableName
.
concat
(
"_"
).
concat
(
tableSuffix
);
}
}
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpSocialInfoServiceImpl.java
View file @
a06adabf
...
@@ -8,6 +8,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
...
@@ -8,6 +8,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo
;
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.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentSocialPush
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentSocialPush
;
...
@@ -18,20 +19,20 @@ import java.util.*;
...
@@ -18,20 +19,20 @@ import java.util.*;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
*
社保明细表
//
社保明细表
*
*
*
@author huyc
//
@author huyc
*
@date 2024-02-29 11:21:56
//
@date 2024-02-29 11:21:56
*/
*/
@Log4j2
@Log4j2
@Service
@Service
public
class
EkpSocialInfoServiceImpl
extends
ServiceImpl
<
EkpSocialInfoMapper
,
EkpSocialInfo
>
implements
EkpSocialInfoService
{
public
class
EkpSocialInfoServiceImpl
extends
ServiceImpl
<
EkpSocialInfoMapper
,
EkpSocialInfo
>
implements
EkpSocialInfoService
{
/**
/**
*
@Description: 社保明细推送至ekp
//
@Description: 社保明细推送至ekp
*
@Author: huyc
//
@Author: huyc
*
@Date: 2024-2-29
//
@Date: 2024-2-29
*
@return: void
//
@return: void
**/
**/
public
EkpSocialPushInfoVo
pushSocialInfoToEkp
(
List
<
EkpPushSocialParam
>
unPushList
)
{
public
EkpSocialPushInfoVo
pushSocialInfoToEkp
(
List
<
EkpPushSocialParam
>
unPushList
)
{
...
@@ -76,14 +77,32 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
...
@@ -76,14 +77,32 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
}
}
//获取社保订单明细合计
//获取社保订单明细合计
socialSumInfo
=
baseMapper
.
getCostSumInfo
(
socialInfo
.
getFd_3adfe8c7e4cf7a
(),
socialInfo
.
getFd_3adfe8cb96c41e
());
socialSumInfo
=
baseMapper
.
getCostSumInfo
(
socialInfo
.
getFd_3adfe8c7e4cf7a
(),
socialInfo
.
getFd_3adfe8cb96c41e
());
//预估合计
Double
ygSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgSum
();
//预估个人合计
Double
ygPersonSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgPersonSum
();
//实缴合计
Double
sjSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjSum
();
//预估单位合计
Double
ygDwSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYgDwSum
();
//实缴单位合计
Double
sjDwSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjDwSum
();
//实缴个人合计
Double
sjPersonSum
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getSjPersonSum
();
//应收
Double
ys
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getYs
();
//个人应收
Double
personYs
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getPersonYs
();
//单位应收
Double
dwYs
=
Common
.
isEmpty
(
socialSumInfo
)
?
0
:
socialSumInfo
.
getDwYs
();
//单位差异
//单位差异
if
(
"是"
.
equals
(
socialInfo
.
getFd_3add9de0be85e4
())
&&
"实缴"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
if
(
"是"
.
equals
(
socialInfo
.
getFd_3add9de0be85e4
())
&&
"实缴"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
//单位差异
//单位差异
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(预估单位合计)$)
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(预估单位合计)$)
socialInfo
.
setFd_3adfeb53c70f72
(
Double
.
sum
(
Double
.
sum
(
s
ocialSumInfo
.
getSjDwSum
(),
socialInfo
.
getFd_3af9f2e9208e4e
()),-
socialSumInfo
.
getYgDwSum
()
));
socialInfo
.
setFd_3adfeb53c70f72
(
Double
.
sum
(
Double
.
sum
(
s
jDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),-
ygDwSum
));
//个人差异
//个人差异
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(预估个人合计)$)
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(预估个人合计)$)
socialInfo
.
setFd_3adfeb5413fb44
(
Double
.
sum
(
Double
.
sum
(
s
ocialSumInfo
.
getSjPersonSum
(),
socialInfo
.
getFd_3af9f303037214
()),-
socialSumInfo
.
getYgPersonSum
()
));
socialInfo
.
setFd_3adfeb5413fb44
(
Double
.
sum
(
Double
.
sum
(
s
jPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),-
ygPersonSum
));
}
}
//Fd_3adfeb7b624f06应收;Fd_3b35a57aee1428个人应收;fd_3b35a57b6e9d0a单位应收
//Fd_3adfeb7b624f06应收;Fd_3b35a57aee1428个人应收;fd_3b35a57b6e9d0a单位应收
...
@@ -98,13 +117,13 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
...
@@ -98,13 +117,13 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
if
(
"实缴"
.
equals
(
deptInfo
.
getSettleType
())){
if
(
"实缴"
.
equals
(
deptInfo
.
getSettleType
())){
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
socialSumInfo
.
getYgSum
(),
socialInfo
.
getFd_3af9f2883941b4
()),-
socialSumInfo
.
getYs
()
));
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
ygSum
,
socialInfo
.
getFd_3af9f2883941b4
()),-
ys
));
//$列表.求总和$($社保订单明细*总数(预估个人合计)$) + $预估个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
//$列表.求总和$($社保订单明细*总数(预估个人合计)$) + $预估个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
socialSumInfo
.
getYgPersonSum
(),
socialInfo
.
getFd_3af9f285ee1e38
()),-
socialSumInfo
.
getPersonYs
()
));
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
ygPersonSum
,
socialInfo
.
getFd_3af9f285ee1e38
()),-
personYs
));
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
socialSumInfo
.
getYgDwSum
(),
socialInfo
.
getFd_3adfeb4e8064a8
()),-
socialSumInfo
.
getDwYs
()
));
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
ygDwSum
,
socialInfo
.
getFd_3adfeb4e8064a8
()),-
dwYs
));
}
else
{
}
else
{
if
(
socialSumInfo
.
getYgSum
()>
0
){
if
(
ygSum
>
0
){
//应收
//应收
socialInfo
.
setFd_3adfeb7b624f06
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
socialInfo
.
setFd_3adfeb7b624f06
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
//个人应收
//个人应收
...
@@ -113,28 +132,28 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
...
@@ -113,28 +132,28 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
socialInfo
.
setFd_3b35a57b6e9d0a
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
socialInfo
.
setFd_3b35a57b6e9d0a
(
CommonConstants
.
ZERO_INTEGER
.
doubleValue
());
}
else
{
}
else
{
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
s
ocialSumInfo
.
getSjSum
(),
socialInfo
.
getFd_3af9f3059e5b9c
()),-
socialSumInfo
.
getYs
()
));
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
s
jSum
,
socialInfo
.
getFd_3af9f3059e5b9c
()),-
ys
));
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
s
ocialSumInfo
.
getSjPersonSum
(),
socialInfo
.
getFd_3af9f303037214
()),-
socialSumInfo
.
getPersonYs
()
));
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
s
jPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),-
personYs
));
//列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
//列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
s
ocialSumInfo
.
getSjDwSum
(),
socialInfo
.
getFd_3af9f2e9208e4e
()),-
socialSumInfo
.
getDwYs
()
));
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
s
jDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),-
dwYs
));
}
}
}
}
}
else
{
}
else
{
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
if
(
"预估"
.
equals
(
socialInfo
.
getFd_3add9dd7833db8
())){
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$-$列表.求总和$($社保订单明细*总数(应收)$)
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$-$列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
socialSumInfo
.
getYgSum
(),
socialInfo
.
getFd_3af9f2883941b4
()),-
socialSumInfo
.
getYs
()
));
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
ygSum
,
socialInfo
.
getFd_3af9f2883941b4
()),-
ys
));
//$列表.求总和$( $社保订单明细*总数(预估个人合计)$) + $预估个人合计$-$列表.求总和$($社保订单明细*总数(个人应收)$)
//$列表.求总和$( $社保订单明细*总数(预估个人合计)$) + $预估个人合计$-$列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
socialSumInfo
.
getYgPersonSum
(),
socialInfo
.
getFd_3af9f285ee1e38
()),-
socialSumInfo
.
getPersonYs
()
));
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
ygPersonSum
,
socialInfo
.
getFd_3af9f285ee1e38
()),-
personYs
));
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$-$列表.求总和$($社保订单明细*总数(单位应收)$)
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$-$列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
socialSumInfo
.
getYgDwSum
(),
socialInfo
.
getFd_3adfeb4e8064a8
()),-
socialSumInfo
.
getDwYs
()
));
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
ygDwSum
,
socialInfo
.
getFd_3adfeb4e8064a8
()),-
dwYs
));
}
else
{
}
else
{
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
s
ocialSumInfo
.
getSjSum
(),
socialInfo
.
getFd_3af9f3059e5b9c
()),-
socialSumInfo
.
getYs
()
));
socialInfo
.
setFd_3adfeb7b624f06
(
Double
.
sum
(
Double
.
sum
(
s
jSum
,
socialInfo
.
getFd_3af9f3059e5b9c
()),-
ys
));
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
s
ocialSumInfo
.
getSjPersonSum
(),
socialInfo
.
getFd_3af9f303037214
()),-
socialSumInfo
.
getPersonYs
()
));
socialInfo
.
setFd_3b35a57aee1428
(
Double
.
sum
(
Double
.
sum
(
s
jPersonSum
,
socialInfo
.
getFd_3af9f303037214
()),-
personYs
));
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
s
ocialSumInfo
.
getSjDwSum
(),
socialInfo
.
getFd_3af9f2e9208e4e
()),-
socialSumInfo
.
getDwYs
()
));
socialInfo
.
setFd_3b35a57b6e9d0a
(
Double
.
sum
(
Double
.
sum
(
s
jDwSum
,
socialInfo
.
getFd_3af9f2e9208e4e
()),-
dwYs
));
}
}
}
}
}
}
...
@@ -160,7 +179,11 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
...
@@ -160,7 +179,11 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
a
.
setPaymentIds
(
socialParam
.
getSocialIds
());
a
.
setPaymentIds
(
socialParam
.
getSocialIds
());
a
.
setId
(
socialParam
.
getFd_3b0afbe1f94a08
());
a
.
setId
(
socialParam
.
getFd_3b0afbe1f94a08
());
socialPushList
.
add
(
a
);
socialPushList
.
add
(
a
);
paymentIds
.
add
(
socialParam
.
getSocialIds
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialParam
.
getYgFlag
()))
{
paymentIds
.
add
(
socialParam
.
getSocialIds
());
}
else
{
paymentIds
.
add
(
socialParam
.
getFd_3b0afbe1f94a08
());
}
}
}
boolean
flag
=
this
.
saveBatch
(
socialInfoList
);
boolean
flag
=
this
.
saveBatch
(
socialInfoList
);
if
(
flag
)
{
if
(
flag
)
{
...
@@ -215,63 +238,63 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
...
@@ -215,63 +238,63 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
//社保合集ID
//社保合集ID
socialInfo
.
setFd_3b6495a5ad6e10
(
socialParam
.
getSocialIds
());
socialInfo
.
setFd_3b6495a5ad6e10
(
socialParam
.
getSocialIds
());
//预估单位养老
//预估单位养老
socialInfo
.
setFd_3af9f257b1b586
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ec80a9de7a
()));
socialInfo
.
setFd_3af9f257b1b586
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ec80a9de7a
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ec80a9de7a
()));
//预估单位医疗
//预估单位医疗
socialInfo
.
setFd_3af9f25b851e94
(
Double
.
valueOf
(
socialParam
.
getFd_3af9eba5899c90
()));
socialInfo
.
setFd_3af9f25b851e94
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba5899c90
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ec80a9de7a
()));
//预估单位失业
//预估单位失业
socialInfo
.
setFd_3af9f25f5e9cc4
(
Double
.
valueOf
(
socialParam
.
getFd_3af9eba5f6e19e
()));
socialInfo
.
setFd_3af9f25f5e9cc4
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba5f6e19e
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9eba5f6e19e
()));
//预估单位工伤
//预估单位工伤
socialInfo
.
setFd_3af9f2617e530a
(
Double
.
valueOf
(
socialParam
.
getFd_3af9eba684f592
()));
socialInfo
.
setFd_3af9f2617e530a
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba684f592
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9eba684f592
()));
//预估单位生育
//预估单位生育
socialInfo
.
setFd_3af9f263e094c6
(
Double
.
valueOf
(
socialParam
.
getFd_3af9eba71c0138
()));
socialInfo
.
setFd_3af9f263e094c6
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba71c0138
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9eba71c0138
()));
//预估单位补缴利息
//预估单位补缴利息
socialInfo
.
setFd_3af9f267a03bd6
(
Double
.
valueOf
(
socialParam
.
getFd_3af9eba7c3da5e
()));
socialInfo
.
setFd_3af9f267a03bd6
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba7c3da5e
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9eba7c3da5e
()));
//预估单位大病救助
//预估单位大病救助
socialInfo
.
setFd_3af9f26a3cae94
(
Double
.
valueOf
(
socialParam
.
getFd_3af9eba863c0ee
()));
socialInfo
.
setFd_3af9f26a3cae94
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9eba863c0ee
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9eba863c0ee
()));
//预估单位合计
//预估单位合计
socialInfo
.
setFd_3adfeb4e8064a8
(
Double
.
valueOf
(
socialParam
.
getFd_3adfeb4e8064a8
()));
socialInfo
.
setFd_3adfeb4e8064a8
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3adfeb4e8064a8
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3adfeb4e8064a8
()));
//预估个人养老
//预估个人养老
socialInfo
.
setFd_3af9f27a3974e6
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbd791662
()));
socialInfo
.
setFd_3af9f27a3974e6
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ebbd791662
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbd791662
()));
//预估个人医疗
//预估个人医疗
socialInfo
.
setFd_3af9f27ce947ac
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbdd9797e
()));
socialInfo
.
setFd_3af9f27ce947ac
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ebbdd9797e
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbdd9797e
()));
//预估个人失业
//预估个人失业
socialInfo
.
setFd_3af9f27efdd912
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbe29ce1c
()));
socialInfo
.
setFd_3af9f27efdd912
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ebbe29ce1c
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbe29ce1c
()));
//预估个人补缴利息
//预估个人补缴利息
socialInfo
.
setFd_3af9f281651734
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbecc4aa8
()));
socialInfo
.
setFd_3af9f281651734
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ebbecc4aa8
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbecc4aa8
()));
//预估个人大病救助
//预估个人大病救助
socialInfo
.
setFd_3af9f283a6f288
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbf3e8be2
()));
socialInfo
.
setFd_3af9f283a6f288
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ebbf3e8be2
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ebbf3e8be2
()));
//预估个人合计
//预估个人合计
socialInfo
.
setFd_3af9f285ee1e38
(
Double
.
valueOf
(
socialParam
.
getFd_3adfeb52a4d2e2
()));
socialInfo
.
setFd_3af9f285ee1e38
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3adfeb52a4d2e2
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3adfeb52a4d2e2
()));
//预估合计
//预估合计
socialInfo
.
setFd_3af9f2883941b4
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ed7e813b86
()));
socialInfo
.
setFd_3af9f2883941b4
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ed7e813b86
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ed7e813b86
()));
//实缴单位养老
//实缴单位养老
socialInfo
.
setFd_3af9f2d8df88c0
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3938170a
()));
socialInfo
.
setFd_3af9f2d8df88c0
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3938170a
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3938170a
()));
//实缴单位医疗
//实缴单位医疗
socialInfo
.
setFd_3af9f2db1e5e16
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee39dea6a8
()));
socialInfo
.
setFd_3af9f2db1e5e16
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee39dea6a8
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee39dea6a8
()));
//实缴单位失业
//实缴单位失业
socialInfo
.
setFd_3af9f2dd5d8fb8
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3a46b7e6
()));
socialInfo
.
setFd_3af9f2dd5d8fb8
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3a46b7e6
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3a46b7e6
()));
//实缴单位工伤
//实缴单位工伤
socialInfo
.
setFd_3af9f2e03295dc
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3aa9c84a
()));
socialInfo
.
setFd_3af9f2e03295dc
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3aa9c84a
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3aa9c84a
()));
//实缴单位生育
//实缴单位生育
socialInfo
.
setFd_3af9f2e237f794
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3afb34c2
()));
socialInfo
.
setFd_3af9f2e237f794
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3afb34c2
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3afb34c2
()));
//实缴单位补缴利息
//实缴单位补缴利息
socialInfo
.
setFd_3af9f2e45a5d78
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3b5ddae8
()));
socialInfo
.
setFd_3af9f2e45a5d78
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3b5ddae8
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3b5ddae8
()));
//实缴单位合计
//实缴单位合计
socialInfo
.
setFd_3af9f2e9208e4e
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3c0bf286
()));
socialInfo
.
setFd_3af9f2e9208e4e
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3c0bf286
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3c0bf286
()));
//实缴个人养老
//实缴个人养老
socialInfo
.
setFd_3af9f2ec516c30
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3e513962
()));
socialInfo
.
setFd_3af9f2ec516c30
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3e513962
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3e513962
()));
//实缴个人医疗
//实缴个人医疗
socialInfo
.
setFd_3af9f2f8290f24
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3e066d48
()));
socialInfo
.
setFd_3af9f2f8290f24
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3e066d48
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3e066d48
()));
//实缴个人失业
//实缴个人失业
socialInfo
.
setFd_3af9f2fa79ee72
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3db44d96
()));
socialInfo
.
setFd_3af9f2fa79ee72
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3db44d96
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3db44d96
()));
//实缴个人补缴利息
//实缴个人补缴利息
socialInfo
.
setFd_3af9f2fcde9158
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3d634946
()));
socialInfo
.
setFd_3af9f2fcde9158
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3d634946
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3d634946
()));
//实缴个人大病救助
//实缴个人大病救助
socialInfo
.
setFd_3af9f2ff2c9f42
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3d0ba3b6
()));
socialInfo
.
setFd_3af9f2ff2c9f42
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3d0ba3b6
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3d0ba3b6
()));
//实缴个人合计
//实缴个人合计
socialInfo
.
setFd_3af9f303037214
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3cb6d4fa
()));
socialInfo
.
setFd_3af9f303037214
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3cb6d4fa
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3cb6d4fa
()));
//实缴合计
//实缴合计
socialInfo
.
setFd_3af9f3059e5b9c
(
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3c6bfc74
()));
socialInfo
.
setFd_3af9f3059e5b9c
(
CommonConstants
.
EMPTY_STRING
.
equals
(
socialParam
.
getFd_3af9ee3c6bfc74
())
?
null
:
Double
.
valueOf
(
socialParam
.
getFd_3af9ee3c6bfc74
()));
//结算状态
//结算状态
socialInfo
.
setFd_3add9ea428879a
(
socialParam
.
getFd_3add9ea428879a
());
socialInfo
.
setFd_3add9ea428879a
(
socialParam
.
getFd_3add9ea428879a
());
//收款状态
//收款状态
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpSocialInfoMapper.xml
View file @
a06adabf
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
round(sum(ifnull(fd_3b35a57b6e9d0a,0)),2) as dwYs,
round(sum(ifnull(fd_3b35a57b6e9d0a,0)),2) as dwYs,
round(sum(ifnull(fd_3adfeb7bd97464,0)),2) as yzc,
round(sum(ifnull(fd_3adfeb7bd97464,0)),2) as yzc,
round(sum(ifnull(fd_3b35a5b03100c4,0)),2) as personYzc,
round(sum(ifnull(fd_3b35a5b03100c4,0)),2) as personYzc,
round(sum(ifnull(fd_3b35a5b0b04d54,0)),2) as dwYzc
,
round(sum(ifnull(fd_3b35a5b0b04d54,0)),2) as dwYzc
from ekp_9264ea0160848a681328
from ekp_9264ea0160848a681328
where fd_3adfe8c7e4cf7a = #{card} and DATE_FORMAT(fd_3adfe8cb96c41e,'%Y-%m') = #{month}
where fd_3adfe8c7e4cf7a = #{card} and DATE_FORMAT(fd_3adfe8cb96c41e,'%Y-%m') = #{month}
</select>
</select>
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
a06adabf
...
@@ -667,6 +667,8 @@ public class DoJointSocialTask {
...
@@ -667,6 +667,8 @@ public class DoJointSocialTask {
// 薪酬申请编号
// 薪酬申请编号
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
socialParam
.
setSocialIds
(
library
.
getIds
());
socialParam
.
setSocialIds
(
library
.
getIds
());
//实缴
socialParam
.
setYgFlag
(
CommonConstants
.
ZERO_STRING
);
insertList
.
add
(
socialParam
);
insertList
.
add
(
socialParam
);
}
}
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushSocialInfoToEkp
(
insertList
);
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushSocialInfoToEkp
(
insertList
);
...
@@ -921,9 +923,10 @@ public class DoJointSocialTask {
...
@@ -921,9 +923,10 @@ public class DoJointSocialTask {
log
.
info
(
"推送社保预估费用到EKP-线程开始"
);
log
.
info
(
"推送社保预估费用到EKP-线程开始"
);
TSettleDomain
settleDomain
;
TSettleDomain
settleDomain
;
EkpPushSocialParam
socialParam
;
EkpPushSocialParam
socialParam
;
List
<
EkpPushSocialParam
>
paramList
=
new
ArrayList
<>();
for
(
TForecastLibrary
library
:
unPushInfo
)
{
List
<
EkpPushSocialParam
>
insertList
=
new
ArrayList
<>();
try
{
try
{
for
(
TForecastLibrary
library
:
unPushInfo
)
{
//获取项目信息
//获取项目信息
settleDomain
=
selectVoMap
.
get
(
library
.
getDeptNo
());
settleDomain
=
selectVoMap
.
get
(
library
.
getDeptNo
());
if
(
Common
.
isEmpty
(
settleDomain
))
{
if
(
Common
.
isEmpty
(
settleDomain
))
{
...
@@ -1145,72 +1148,39 @@ public class DoJointSocialTask {
...
@@ -1145,72 +1148,39 @@ public class DoJointSocialTask {
socialParam
.
setFd_3b0afbe1f94a08
(
library
.
getId
());
socialParam
.
setFd_3b0afbe1f94a08
(
library
.
getId
());
// 薪酬申请编号
// 薪酬申请编号
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
//预估
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
socialParam
.
setYgFlag
(
CommonConstants
.
ONE_STRING
);
paramList
.
add
(
socialParam
);
insertList
.
add
(
socialParam
);
}
}
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
R
<
EkpSocialPushInfoVo
>
info
=
ekpDaprUtil
.
pushSocialInfoToEkp
(
insertList
);
library
.
setDataPush
(
CommonConstants
.
ONE_INT
);
if
(
Common
.
isNotNull
(
info
)
&&
Common
.
isNotNull
(
info
.
getData
()))
{
forecastLibraryMapper
.
updateById
(
library
);
EkpSocialPushInfoVo
vo
=
info
.
getData
();
}
else
{
List
<
String
>
idList
=
vo
.
getPaymentIds
();
TSendEkpError
error
=
new
TSendEkpError
();
forecastLibraryMapper
.
updatePushStatus
(
idList
);
error
.
setCreateTime
(
new
Date
());
}
else
{
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setLinkId
(
unPushInfo
.
get
(
0
)
.
getId
());
error
.
setTitle
(
e
.
getMessage
()
);
error
.
setTitle
(
"社保预估明细批量保存失败"
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送社保预估费用到EKP错误"
,
e
);
}
}
//推送失败的数据重新推送
if
(!
paramList
.
isEmpty
())
{
for
(
EkpPushSocialParam
s:
paramList
)
{
try
{
String
body
=
ekpSocialUtil
.
sendToEKP
(
s
);
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
TForecastLibrary
library
=
forecastLibraryMapper
.
selectById
(
s
.
getFd_3b0afbe1f94a08
());
library
.
setDataPush
(
CommonConstants
.
ONE_INT
);
forecastLibraryMapper
.
updateById
(
library
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
s
.
getFd_3b0afbe1f94a08
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
s
.
getFd_3b0afbe1f94a08
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送社保预估费用到EKP错误"
,
e
);
}
}
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
unPushInfo
.
get
(
0
).
getId
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送社保预估费用到EKP错误"
,
e
);
}
}
log
.
info
(
"推送社保预估费用到EKP结束"
);
log
.
info
(
"推送社保预估费
预估
用到EKP结束"
);
}
}
/**
/**
...
...
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